| 전자부품 데이터시트 검색엔진 |
|
DEV-13044 데이터시트(PDF) 8 Page - SparkFun Electronics |
|
|
|||||||||||||||||||||||||||||
DEV-13044 데이터시트(HTML) 8 Page - SparkFun Electronics |
|
8 / 11 page ![]() /*********************************************************** ***** Example file for SparkFun Pi Block Support 14 Jul 2015 Mike Hord, SparkFun Electronics Code developed in Intel's Eclipse IOTDK Modified on July 30, 2015 by Shawn Hymel, SparkFun Electroni cs This code requires the Intel mraa library to function; for m ore information see https://github.com/inteliotdevkit/mraa This code is beerware; if you use it, please buy me (or any other SparkFun employee) a cold beverage next time you run into on e of us at the local. ************************************************************ ****/ #include "mraa.hpp" #include <iostream> #include <unistd.h> using namespace mraa; using namespace std; int main() { // Oddly, GPIO pin assignment numbers when using the MRAA li braries are not // the same as those inside the operating system. Thus, whi le we're using // pin 46 as far as the OS is concerned to drive the LED, w e're using pin 32 // as far as MRAA is concerned. The cheat sheet for that ca n be found here: // https://github.com/inteliotdevkit/mraa/blob/master/doc s/edison.md Gpio LEDPin(45); LEDPin.dir(DIR_OUT); // Now do a quick little flicker. LEDPin.write(0); usleep(100000); LEDPin.write(1); usleep(100000); LEDPin.write(0); // Alternatively, we can declare the pin in "raw" mode, whic h has a slightly // different and more unwieldy constructor. Gpio buttonPin(32, true, true); buttonPin.dir(DIR_IN); // In this infinite loop, we'll blink the LED once whenever someone presses // the button. while (1) { Page 8 of 11 |
|
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |