Skip to content

Instantly share code, notes, and snippets.

/test.c Secret

Created May 27, 2014 00:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/fad89c013c30a9794ff1 to your computer and use it in GitHub Desktop.
Save anonymous/fad89c013c30a9794ff1 to your computer and use it in GitHub Desktop.
#include <wiringPi.h>
#include <stdio.h>
int main(void)
{
wiringPiSetup();
pinMode(1, INPUT);
while(1==1)
{
int a = digitalRead(1);
printf("Gas detected: %d\n", a);
delay(100);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment