Skip to content

Instantly share code, notes, and snippets.

@biskandar
Created March 23, 2013 01:43
Show Gist options
  • Save biskandar/5226025 to your computer and use it in GitHub Desktop.
Save biskandar/5226025 to your computer and use it in GitHub Desktop.
Integration between Raspberry Pi and Arduino
#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