embeded/raspberry pi2016. 7. 10. 16:18

어딜 좀 더 수정해야하려나..


1. 거리가 짧아지면 응답이 빨리 되니 짧을때는 더 빠르게 거리 측정

2. openMP나 thread이용 병렬처리

3. 클래스화?

4. 인터럽트 사용?


$ cat temp_ss.c

/*

 *  dht11.c:

 *      Simple test program to test the wiringPi functions

 *      DHT11 test

 */


#include <wiringpi.h>


#include <stdio.h>

#include <stdlib.h>

#include <stdint.h>

#include <sys/time.h>


#define TRIG_PIN        4

#define ECHO_PIN        5


float mach = 34300.0;


void read_sr04_dat()

{

        int counter = 0;

        struct timeval start_point, end_point;

        double operating_time;

        double len;


        pinMode(TRIG_PIN, OUTPUT);

        pinMode(ECHO_PIN, INPUT);

        digitalWrite(TRIG_PIN, LOW);

//      delay(500); // 500 msec


        digitalWrite(TRIG_PIN, HIGH);

        delayMicroseconds( 10 );

        digitalWrite(TRIG_PIN, LOW);


        while ( digitalRead(ECHO_PIN) == LOW)

        {

                counter++;

                delayMicroseconds( 1 );

                if ( counter == 38000 )

                {

                        return;

                }

        }

        gettimeofday(&start_point, NULL);



        while ( digitalRead(ECHO_PIN) == HIGH)

        {

                counter++;

                delayMicroseconds( 1 );

                if ( counter == 38000 )

                {

                        return;

                }

        }

        gettimeofday(&end_point, NULL);


        operating_time = (double)(end_point.tv_sec)+(double)(end_point.tv_usec)/1000000.0-(double)(start_point.tv_sec)-(double)(start_point.tv_usec)/1000000.0;

        len = operating_time * mach / 2;


        printf("%f sec %4.2f cm %d\n",operating_time, len, counter);

}


#define MAXTIMINGS      85

#define DHTPIN          7

int dht11_dat[5] = { 0, 0, 0, 0, 0 };


void read_dht11_dat()

{

        uint8_t laststate       = HIGH;

        uint8_t counter         = 0;

        uint8_t j               = 0, i;

        float   f; /* fahrenheit */


        dht11_dat[0] = dht11_dat[1] = dht11_dat[2] = dht11_dat[3] = dht11_dat[4] = 0;


        /* pull pin down for 18 milliseconds */

        pinMode( DHTPIN, OUTPUT );

        digitalWrite( DHTPIN, LOW );

        delay( 18 );

        /* then pull it up for 40 microseconds */

        digitalWrite( DHTPIN, HIGH );

        delayMicroseconds( 40 );

        /* prepare to read the pin */

        pinMode( DHTPIN, INPUT );



        /* detect change and read data */

        for ( i = 0; i < MAXTIMINGS; i++ )

        {

                counter = 0;

                while ( digitalRead( DHTPIN ) == laststate )

                {

                        counter++;

                        delayMicroseconds( 1 );

                        if ( counter == 255 )

                        {

                                break;

                        }

                }

                laststate = digitalRead( DHTPIN );


                if ( counter == 255 )

                        break;


                /* ignore first 3 transitions */

                if ( (i >= 4) && (i % 2 == 0) )

                {

                        /* shove each bit into the storage bytes */

                        dht11_dat[j / 8] <<= 1;

                        if ( counter > 16 )

                                dht11_dat[j / 8] |= 1;

                        j++;

                }

        }


        /*

         * check we read 40 bits (8bit x 5 ) + verify checksum in the last byte

         * print it out if data is good

         */

        if ( (j >= 40) &&

             (dht11_dat[4] == ( (dht11_dat[0] + dht11_dat[1] + dht11_dat[2] + dht11_dat[3]) & 0xFF) ) )

        {

                f = dht11_dat[2] * 9. / 5. + 32;

                printf( "Humidity = %d.%d %% Temperature = %d.%d *C (%.1f *F)\n",

                        dht11_dat[0], dht11_dat[1], dht11_dat[2], dht11_dat[3], f );


                printf("%f -> ",mach);

                mach = 33150 + (60 * dht11_dat[2]);

                printf("%f\n",mach);

        }else  {


                f = dht11_dat[2] * 9. / 5. + 32;

                printf( "Humidity = %d.%d %% Temperature = %d.%d *C (%.1f *F) ",

                                                dht11_dat[0], dht11_dat[1], dht11_dat[2], dht11_dat[3], f );


                printf( "- Data not good, skip j[%d] par[%d] calc[%d]\n",

                j, dht11_dat[4], (dht11_dat[0] + dht11_dat[1] + dht11_dat[2] + dht11_dat[3]) & 0xFF

                 );

        }

}


int main( void )

{

        unsigned char tempcount = 0;


        if ( wiringPiSetup() == -1 )

                exit( 1 );


        while ( 1 )

        {

                        if(tempcount % 10 == 0)

                                read_dht11_dat();

                        tempcount++;


                        read_sr04_dat();


                delay( 1000 ); /* wait 1sec to refresh */

        }


        return(0);

}  


'embeded > raspberry pi' 카테고리의 다른 글

freeRTOS on rpi  (0) 2016.07.18
redmine 백업  (0) 2016.07.14
초음파 센서 wiring pi 버전  (0) 2016.07.10
초음파/온습도 센서 데이터 시트 복사  (0) 2016.07.10
rpi gstreamer mux  (0) 2016.06.28
Posted by 구차니
embeded/raspberry pi2016. 7. 10. 12:31

파이썬만 보여서 대충 바꿔봄.

대충.. 2cm ~ 400cm로 제한을 줘야하나..

데이터 시트는 아래 링크 참조해서 작성

[링크 : https://docs.google.com/document/d/1Y-yZnNhMYy7rwhAgyL_pfa39RsB-x2qR4vP8saG73rE/edit]


시간재는건 아래 참조

[링크 : http://hwangdo83.tistory.com/123]


$ cat sr04.c

/*

 *  dht11.c:

 *      Simple test program to test the wiringPi functions

 *      DHT11 test

 */


#include <wiringPi.h>


#include <stdio.h>

#include <stdlib.h>

#include <stdint.h>

#include <sys/time.h>


#define TRIG_PIN        4

#define ECHO_PIN        5


void read_sr04_dat()

{

        int counter = 0;

        struct timeval start_point, end_point;

        double operating_time;

        double len;


        pinMode(TRIG_PIN, OUTPUT);

        pinMode(ECHO_PIN, INPUT);

        digitalWrite(TRIG_PIN, LOW);

//      delay(500); // 500 msec


        digitalWrite(TRIG_PIN, HIGH);

        delayMicroseconds( 10 );

        digitalWrite(TRIG_PIN, LOW);



        while ( digitalRead(ECHO_PIN) == LOW)

        {

                counter++;

                delayMicroseconds( 1 );

                if ( counter == 38000 )

                {

                        return;

                }

        }

        gettimeofday(&start_point, NULL);


        while ( digitalRead(ECHO_PIN) == HIGH)

        {

                counter++;

                delayMicroseconds( 1 );

                if ( counter == 38000 )

                {

                        return;

                }

        }


        gettimeofday(&end_point, NULL);


        operating_time = (double)(end_point.tv_sec)+(double)(end_point.tv_usec)/1000000.0-(double)(start_point.tv_sec)-(double)(start_point.tv_usec)/1000000.0;

        len = operating_time * 34300 / 2;


        printf("%f sec %4.2f cm %d\n",operating_time, len, counter);

}


int main( void )

{

        if ( wiringPiSetup() == -1 )

                exit( 1 );


        while ( 1 )

        {

                read_sr04_dat();

                delay( 100 ); /* wait 1sec to refresh */

        }


        return(0);



한번 보냈는데 못 재면 이상한 값을 뱉는건 왜그럴까나..

'embeded > raspberry pi' 카테고리의 다른 글

redmine 백업  (0) 2016.07.14
초음파 거리 + 온/습도 센서  (0) 2016.07.10
초음파/온습도 센서 데이터 시트 복사  (0) 2016.07.10
rpi gstreamer mux  (0) 2016.06.28
beowulf / openMPI  (0) 2016.06.28
Posted by 구차니
embeded/raspberry pi2016. 7. 10. 10:59

백업용


초음파 센서 HC-SR04

           - Power Supply :+5V DC

           - Quiescent Current : <2mA

           - Working Currnt: 15mA

           - Effectual Angle: <15°

           - Ranging Distance : 2cm – 400 cm/1" - 13ft

           - Resolution : 0.3 cm

           - Measuring Angle: 30 degree

           - Trigger Input Pulse width: 10uS

           - Dimension: 45mm x 20mm x 15mm

[링크 : http://eleparts.co.kr/EPXF6C83]


온/습도 센서

어.. 의외로 온도 범위가 좁다?


Specifications

Temperature measuring range: 0℃~ 50℃  

Temperature tolerance: ±2℃ 

Humidity measuring range: 20% ~ 95% (0℃ ~ 50℃) 

Humidity tolerance: ±5% 

Dimension: 29.0mm * 18.0mm 

Mounting holes size: 2.0mm


Applications

Ambient temperature and humidity detection


How to Use

In the case of working with a MCU:


-VCC ↔ 3.3V ~ 5.5V 

-GND ↔ power supply ground 

-DOUT ↔ MCU.IO

[링크 : http://eleparts.co.kr/EPXF43N9]

'embeded > raspberry pi' 카테고리의 다른 글

초음파 거리 + 온/습도 센서  (0) 2016.07.10
초음파 센서 wiring pi 버전  (0) 2016.07.10
rpi gstreamer mux  (0) 2016.06.28
beowulf / openMPI  (0) 2016.06.28
redmine on raspberrypi  (9) 2016.06.23
Posted by 구차니
embeded/raspberry pi2016. 6. 28. 18:27


gst-launch-1.0 \

    v4l2src device=$VIDEO_DEVICE \

        ! $VIDEO_CAPABILITIES \

        ! mux. \

    alsasrc device=$AUDIO_DEVICE \

        ! $AUDIO_CAPABILITIES \

        ! mux. \

    avimux name=mux \

        ! filesink location=test-$( date --iso-8601=seconds ).avi


[링크 : https://www.linuxtv.org/wiki/index.php/GStreamer]


'embeded > raspberry pi' 카테고리의 다른 글

초음파 센서 wiring pi 버전  (0) 2016.07.10
초음파/온습도 센서 데이터 시트 복사  (0) 2016.07.10
beowulf / openMPI  (0) 2016.06.28
redmine on raspberrypi  (9) 2016.06.23
gsteamer rtspsink  (0) 2016.06.21
Posted by 구차니
embeded/raspberry pi2016. 6. 28. 09:26

예전에 학교 실습실 관리할때 beowulf 해보고 싶었는데..

라즈베리 슈퍼 컴퓨터가 beowulf 였네..(알고보니 이것도 찾아두고는 잊은건 아니겠지 -_-)

한번 여러 대 사서 해볼까?



Ubuntu beowulf cluster

[링크 : https://www-users.cs.york.ac.uk/~mjf/pi_cluster/src/Building_a_simple_Beowulf_cluster.html]


Raspberrypi B+ 32 node beowulf cluster

[링크 : http://coen.boisestate.edu/ece/raspberry-pi/]

[링크 : http://coen.boisestate.edu/ece/files/2013/05/Creating.a.Raspberry.Pi-Based.Beowulf.Cluster_v2.pdf]


Examples of MPI software include OpenMPI or MPICH. There are additional MPI implementations available.

[링크 : http://askubuntu.com/questions/624994/what-can-a-beowulf-cluster-help-process]

[링크 : https://en.wikipedia.org/wiki/Beowulf_cluster]

[링크 : https://en.wikipedia.org/wiki/Open_MPI]

'embeded > raspberry pi' 카테고리의 다른 글

초음파/온습도 센서 데이터 시트 복사  (0) 2016.07.10
rpi gstreamer mux  (0) 2016.06.28
redmine on raspberrypi  (9) 2016.06.23
gsteamer rtspsink  (0) 2016.06.21
라즈베리 파이 카메라(rpi cam) 렌즈 교체..  (2) 2016.06.18
Posted by 구차니
embeded/raspberry pi2016. 6. 23. 10:40

2016.06.23으로 업데이트 하고 나서 한 결과.. 이거 하나면 끝.. ㄷㄷㄷ

단, 기본은 sqlite 인듯?

mysql 이나 mariadb 쓰려면 별도로 설치를 해주어야 한다.


$ sudo apt-get install redmine

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following extra packages will be installed:

  bundler dbconfig-common fonts-droid ghostscript imagemagick-common libev4 libfcgi-ruby1.9.1

  libfcgi0ldbl libgmp-dev libgmpxx4ldbl libgs9 libgs9-common libijs-0.35 libjbig2dec0

  libjs-coffeescript libjs-jquery-ui libjs-prototype libjs-scriptaculous libjsoncpp0 liblqr-1-0

  libmagickcore-6.q16-2 rake redmine-sqlite ruby-actionmailer ruby-actionpack

  ruby-actionpack-action-caching ruby-actionview ruby-activemodel ruby-activerecord

  ruby-activesupport ruby-arel ruby-atomic ruby-awesome-nested-set ruby-blankslate ruby-builder

  ruby-celluloid ruby-coderay ruby-coffee-rails ruby-coffee-script ruby-coffee-script-source

  ruby-dev ruby-erubis ruby-execjs ruby-fcgi ruby-ffi ruby-hike ruby-hmac ruby-i18n

  ruby-jbuilder ruby-jquery-rails ruby-json ruby-listen ruby-mail ruby-mime-types ruby-minitest

  ruby-multi-json ruby-net-http-persistent ruby-net-ldap ruby-oj ruby-openid ruby-passenger

  ruby-polyglot ruby-protected-attributes ruby-rack ruby-rack-openid ruby-rack-test ruby-rails

  ruby-rails-observers ruby-railties ruby-rb-inotify ruby-redcarpet ruby-request-store

  ruby-rmagick ruby-sass ruby-sass-rails ruby-sdoc ruby-spring ruby-sprockets

  ruby-sprockets-rails ruby-sqlite3 ruby-thor ruby-thread-safe ruby-tilt ruby-timers

  ruby-treetop ruby-turbolinks ruby-tzinfo ruby-uglifier ruby-yajl ruby2.1-dev sqlite3 zip

Suggested packages:

  virtual-mysql-client mysql-client postgresql-client ghostscript-x libgmp10-doc libmpfr-dev

  coffeescript libjs-jquery-ui-docs libmagickcore-6.q16-2-extra bzr cvs darcs mercurial

  subversion ruby-builder-doc rails ruby-passenger-doc ruby-compass treetop doc-base sqlite3-doc

The following NEW packages will be installed:

  bundler dbconfig-common fonts-droid ghostscript imagemagick-common libev4 libfcgi-ruby1.9.1

  libfcgi0ldbl libgmp-dev libgmpxx4ldbl libgs9 libgs9-common libijs-0.35 libjbig2dec0

  libjs-coffeescript libjs-jquery-ui libjs-prototype libjs-scriptaculous libjsoncpp0 liblqr-1-0

  libmagickcore-6.q16-2 rake redmine redmine-sqlite ruby-actionmailer ruby-actionpack

  ruby-actionpack-action-caching ruby-actionview ruby-activemodel ruby-activerecord

  ruby-activesupport ruby-arel ruby-atomic ruby-awesome-nested-set ruby-blankslate ruby-builder

  ruby-celluloid ruby-coderay ruby-coffee-rails ruby-coffee-script ruby-coffee-script-source

  ruby-dev ruby-erubis ruby-execjs ruby-fcgi ruby-ffi ruby-hike ruby-hmac ruby-i18n

  ruby-jbuilder ruby-jquery-rails ruby-json ruby-listen ruby-mail ruby-mime-types ruby-minitest

  ruby-multi-json ruby-net-http-persistent ruby-net-ldap ruby-oj ruby-openid ruby-passenger

  ruby-polyglot ruby-protected-attributes ruby-rack ruby-rack-openid ruby-rack-test ruby-rails

  ruby-rails-observers ruby-railties ruby-rb-inotify ruby-redcarpet ruby-request-store

  ruby-rmagick ruby-sass ruby-sass-rails ruby-sdoc ruby-spring ruby-sprockets

  ruby-sprockets-rails ruby-sqlite3 ruby-thor ruby-thread-safe ruby-tilt ruby-timers

  ruby-treetop ruby-turbolinks ruby-tzinfo ruby-uglifier ruby-yajl ruby2.1-dev sqlite3 zip

0 upgraded, 93 newly installed, 0 to remove and 0 not upgraded.

Need to get 850 kB/21.7 MB of archives.

After this operation, 83.3 MB of additional disk space will be used.

Do you want to continue? [Y/n] 


db 종류 교체 등을 위해서는 설치중에 나오는 메시지를 따라 입력하면 된다.

$ sudo dpkg-reconfigure -plow redmine

  ┌────────────────────────────────────────────┤  ├────────────────────────────────────────────┐
  │                                                                                            │
  │ redmine-mysql package required                                                             │
  │                                                                                            │
  │ Redmine instance default is configured to use database type mysql, but the corresponding   │
  │ redmine-mysql package is not installed.                                                    │
  │                                                                                            │
  │ Configuration of instance default is aborted.                                              │
  │                                                                                            │
  │ To finish that configuration, please install the redmine-mysql package, and reconfigure    │
  │ redmine using:                                                                             │
  │                                                                                            │
  │ dpkg-reconfigure -plow redmine                                                             │
  │                                                                                            │
  │                                                                                        │
  │                                                                                            │
  └────────────────────────────────────────────────────────────────────────────────────────────┘


요약본?

$ sudo apt-get install apache2 mysql-server redmine redmine-mysql libapache2-mod-passenger

$ sudo ln -s /usr/share/redmine/public /var/www/redmine

$ sudo chown -R www-data:www-data /var/www/redmine

$ sudo vi /etc/apache2/sites-available/redmine.conf

DocumentRoot /var/www/

PassengerDefaultUser www-data


<Location /redmine>

RailsEnv production

RackBaseURI /redmine

Options -MultiViews

</Location>


$ sudo a2dissite 000-default

$ sudo a2ensite redmine

$ sudo /etc/init.d/apache2 reload

$ sudo /etc/init.d/apache2 restart 

[링크 : http://www.tylerforsythe.com/.../install-redmine-onto-raspberry-pi-2-this-is-the-tutorial-you-want/]


redmine은

admin/admin이 기본 아이디/패스워드임



+

2016.07.07

subURI와 virtualHost를 둘다 동시에 쓸수는 없는건가? ㅠㅠ

[링크 : http://stackoverflow.com/.../...rails-app-on-subdomain-root-with-apache-and-passenger]

'embeded > raspberry pi' 카테고리의 다른 글

rpi gstreamer mux  (0) 2016.06.28
beowulf / openMPI  (0) 2016.06.28
gsteamer rtspsink  (0) 2016.06.21
라즈베리 파이 카메라(rpi cam) 렌즈 교체..  (2) 2016.06.18
raspivid - H264 SPS PPS?  (0) 2016.06.10
Posted by 구차니
embeded/raspberry pi2016. 6. 21. 21:17

'embeded > raspberry pi' 카테고리의 다른 글

beowulf / openMPI  (0) 2016.06.28
redmine on raspberrypi  (9) 2016.06.23
라즈베리 파이 카메라(rpi cam) 렌즈 교체..  (2) 2016.06.18
raspivid - H264 SPS PPS?  (0) 2016.06.10
raspistill 빠르게 사진 찍기  (0) 2016.06.09
Posted by 구차니
embeded/raspberry pi2016. 6. 18. 15:19

회사에 굴러 다니는 것들이 있어서 바꿔보니..

은근 화각 차이가 크다는걸 느낌..

확실히 숫자가 적을 수록 광각이네


rpicam 기본 렌즈 (한.. 5~6mm 되려나?)

Camera specifications

  • CCD size : 1/4inch
  • Aperture (F) : 2.0
  • Focal Length : 6MM (adjustable)
  • Diagonal : 75.7 degree
  • Sensor best resolution : 1080p

[링크 : http://eleparts.co.kr/EPXD4BBD]


4.5mm lens 1/2.7


4.0mm lens 1/2.7


정체불명의 렌즈.. (3mm 쯤 하려나?)



표준은 S마운트 M12 0.5mm pitch 짜리

[링크 : https://en.wikipedia.org/wiki/S-mount_(CCTV_lens)]

[링크 : https://en.wikipedia.org/wiki/C_mount]



+

막상 사려니 비싸네.. 회사꺼 뽀릴까?

센서 크기가 1/4 인치래서.. 2mm 짜리 박아도(1.5만 ㅠㅠ) 화각이 122도..

3.6mm 정도는 되어야 60도 화각이 나오는구나..


[링크 : http://itempage3.auction.co.kr/DetailView.aspx?ItemNo=A700563953]

'embeded > raspberry pi' 카테고리의 다른 글

redmine on raspberrypi  (9) 2016.06.23
gsteamer rtspsink  (0) 2016.06.21
raspivid - H264 SPS PPS?  (0) 2016.06.10
raspistill 빠르게 사진 찍기  (0) 2016.06.09
라즈베리 파이 gstreamer / vlc ... 실패?  (0) 2016.05.27
Posted by 구차니
embeded/raspberry pi2016. 6. 10. 07:56

테스트 해보니 -g 1 만 i-frame으로 도배해서 좀더 빠르게 나오고

-ih는 팟플레이어 에서 영향을 주지 못한다.


무슨 옵션을 주던.. vlc에서는 안되네..

도대체 무슨 에러일까...


팟 플레이어에서 비트레이트가 0으로 뜨는거랑 연관이 있는걸까?


core error: ES_OUT_RESET_PCR called



[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] Frame num change from 37 to 0

[h264 @ 05c87c00] decode_slice_header error

[h264 @ 05c87c00] no frame!

MultiFramedRTPSource::doGetNextFrame1(): The total received frame size exceeds t

he client's buffer size (100000).  2367 bytes of trailing data will be dropped! 




---

raspivid 관련 옵션을 보니

gop 설정과 PPS/SPS 헤더를 넣는게 있는데


gop야.. i frame 이라.. 이게 많으면 화질 좋아지고 용량 넘쳐나고, 재생 바로바로 되고 하지만

PPS/SPS의 경우에는 메타데이터라.. 이걸 통해 빠르게 재생 된다는 이야기도 있네...


[링크 : http://egloos.zum.com/yajino/v/782492]



--inline,   -ih     Insert PPS, SPS headers

Forces the stream to include PPS and SPS headers on every I-frame. Needed for certain streaming cases. e.g. Apple HLS. These headers are small, so do not greatly increase file size.

[링크 : https://www.raspberrypi.org/documentation/raspbian/applications/camera.md]

[링크 : https://community.nxp.com/thread/323839]

[링크 : http://...nabble.com/waiting-for-SPS-PPS-when-sending-H-264-via-RTP-td944444.html]


Posted by 구차니
embeded/raspberry pi2016. 6. 9. 19:55

-t, --timeout   : Time (in ms) before takes picture and shuts down (if not specified, set to 5s)


기본값이 5초라서

사진 하나 받아오는데 항상 5초 걸리는 기분..

-t 0 는 안되므로

-t 1 이상은 설정을 해야 한다.



pi@raspberrypi:~/Pictures $ time raspistill -o tt.jpg -t 1


real    0m0.778s

user    0m0.010s

sys     0m0.030s


pi@raspberrypi:~/Pictures $ time raspistill -o tt.jpg -t 1000


real    0m1.948s

user    0m0.020s

sys     0m0.040s



받아오는 해상도 별로 시간 차이는 없음.



+

-tl, --timelapse        : Timelapse mode. Takes a picture every <t>ms. %d == frame number (Try: -o img_%04d.jpg)


그나저나 타임랩스 기능이 있네?


$ raspistill -tl 33 -o img_%04d.jpg

mmal: Skipping frame 2 to restart at frame 14

mmal: Skipping frame 15 to restart at frame 30

mmal: Skipping frame 31 to restart at frame 48

mmal: Skipping frame 49 to restart at frame 68

mmal: Skipping frame 69 to restart at frame 90

mmal: Skipping frame 91 to restart at frame 112

mmal: Skipping frame 113 to restart at frame 134

mmal: Skipping frame 135 to restart at frame 156


1/30초 단위로 찍게 하려고 33msec 했는데 1초에 두번 겨우 하는 정도..
$ file *
img_0001.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:03:56, width=0], baseline, precision 8, 2592x1944, frames 3
img_0014.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:03:57, width=0], baseline, precision 8, 2592x1944, frames 3
img_0030.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:03:57, width=0], baseline, precision 8, 2592x1944, frames 3
img_0048.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:03:58, width=0], baseline, precision 8, 2592x1944, frames 3
img_0068.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:03:58, width=0], baseline, precision 8, 2592x1944, frames 3
img_0090.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:03:59, width=0], baseline, precision 8, 2592x1944, frames 3
img_0112.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:04:00, width=0], baseline, precision 8, 2592x1944, frames 3
img_0134.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:04:00, width=0], baseline, precision 8, 2592x1944, frames 3
img_0156.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:04:01, width=0], baseline, precision 8, 2592x1944, frames 3


해상도별 차이는 없는 기분?

$ raspistill -tl 1 -o img_%04d.jpg -w 640 -h 480

mmal: Skipping frame 2 to restart at frame 342

mmal: Skipping frame 343 to restart at frame 868

mmal: Skipping frame 869 to restart at frame 1442

mmal: Skipping frame 1443 to restart at frame 2124

mmal: Skipping frame 2125 to restart at frame 2847

mmal: Skipping frame 2848 to restart at frame 3569

mmal: Skipping frame 3570 to restart at frame 4292

mmal: Skipping frame 4293 to restart at frame 5014



 $ file *

img_0001.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:07:01, width=0], baseline, precision 8, 640x480, frames 3

img_0342.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:07:02, width=0], baseline, precision 8, 640x480, frames 3

img_0868.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:07:02, width=0], baseline, precision 8, 640x480, frames 3

img_1442.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:07:03, width=0], baseline, precision 8, 640x480, frames 3

img_2124.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:07:03, width=0], baseline, precision 8, 640x480, frames 3

img_2847.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:07:04, width=0], baseline, precision 8, 640x480, frames 3

img_3569.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:07:05, width=0], baseline, precision 8, 640x480, frames 3

img_4292.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:07:05, width=0], baseline, precision 8, 640x480, frames 3

img_5014.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2016:06:09 11:07:06, width=0], baseline, precision 8, 640x480, frames 3



Posted by 구차니