| Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
DEV-13044 Datasheet(PDF) 8 Page - SparkFun Electronics |
|
|
|||||||||||||||||||||||||||||
DEV-13044 Datasheet(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 |
|
|
Enlace URL |
| ¿ALLDATASHEET es útil para Ud.? [ DONATE ] |
Todo acerca de Alldatasheet | Publicidad | Contáctenos | Política de Privacidad | Enlace a la hoja de datos | Intercambio de Enlaces | Lista de Fabricantes 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 |