Created
March 23, 2013 01:43
-
-
Save biskandar/5226025 to your computer and use it in GitHub Desktop.
Integration between Raspberry Pi and Arduino
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "arduPi.h" | |
int main () { | |
setup() ; | |
while(1) { | |
loop() ; | |
} | |
return 0; | |
} | |
int led = 13; | |
void setup() { | |
pinMode(led, OUTPUT); | |
} | |
void loop() { | |
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) | |
delay(1000); // wait for a second | |
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW | |
delay(1000); // wait for a second | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment