검색결과 리스트
글
Using BeagleBone Black GPIOs read by c
from : https://gist.github.com/ajmontag/4013192
C program that listens for button presses on a Beaglebone GPIO pin and reports the press duration.
| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
|
| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
|
| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
|
일단 컴파일 혀서 타겟에다가 옮겨 놓습니다.
그러고
# ./filename 60 실행
P9의 12번 핀과 2번핀 사이에 스위치나 저항을 달아서 확인 합니다.
실행화면은 아래와 같이...
root@beaglebone:~# ./press 60
rising edge!
falling edge!
button pressed for 0 ms.
rising edge!
falling edge!
button pressed for 2320 ms.
rising edge!
falling edge!
button pressed for 0 ms.
rising edge!
falling edge!
button pressed for 1 ms.
rising edge!
falling edge!
button pressed for 2226 ms.
rising edge!
falling edge!
button pressed for 0 ms.
rising edge!
falling edge!
button pressed for 1 ms.
rising edge!
falling edge!
button pressed for 1 ms.
rising edge!
falling edge!
button pressed for 0 ms.
rising edge!
falling edge!
button pressed for 0 ms.
rising edge!
falling edge!
button pressed for 1 ms.
rising edge!
falling edge!
button pressed for 2937 ms.
rising edge!
timeout while waiting for falling edge
Button still pressed
timeout while waiting for falling edge
Button still pressed
timeout while waiting for falling edge
Button still pressed
timeout while waiting for falling edge
Button still pressed
timeout while waiting for falling edge
Button still pressed
일단 성공~~~~~~~ 분석은 나중에....
'board > beaglebone Black' 카테고리의 다른 글
| beagle bone can access the internet by using usb connection of host (0) | 2013.09.07 |
|---|---|
| BeagleBone Black – Controlling user LEDs using C/C++ (0) | 2013.09.05 |
| Using BeagleBone Black GPIOs by bash script (0) | 2013.09.05 |
| Using Eclipse to Cross-compile Applications for Embedded Systems 4 (0) | 2013.09.05 |
| Using Eclipse to Cross-compile Applications for Embedded Systems 3 (0) | 2013.09.05 |
