Skip to content

Instantly share code, notes, and snippets.

@justjoheinz
Created March 17, 2012 13:41
Show Gist options
  • Save justjoheinz/2059197 to your computer and use it in GitHub Desktop.
Save justjoheinz/2059197 to your computer and use it in GitHub Desktop.
Super simple beagleboneio project
INCLUDE_PATH=/opt/local/include
LIBRARY_PATH=/opt/local/lib
CC_OPTS=-O2
all:
gcc test.c -o test $(CC_OPTS) -I$(INCLUDE_PATH) -L$(LIBRARY_PATH) -lbeagleboneio
#include <beaglebone.h>
void setup() {
pinMode(pins[P8_3], OUTPUT);
}
void loop() {
digitalWrite(pins[P8_3], LOW);
digitalWrite(pins[P8_3], HIGH);
}
int main(int argc, char **argv) {
run(&setup, &loop);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment