Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define threshold 512
- int main() {
- while(1){ // do this until we are killed
- if(analog10(0) > threshold) {
- // what to do when the sensor sees light
- } else (mav(0,1000); sleep(5); {
- // what to do when the sensor sees dark
- }
- sleep(1.0); // check every 1 second
- }
- }
Add Comment
Please, Sign In to add comment