Guest User

Untitled

a guest
Jan 13th, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #define threshold 512
  2.  
  3. int main() {
  4. while(1){ // do this until we are killed
  5. if(analog10(0) > threshold) {
  6. // what to do when the sensor sees light
  7. } else (mav(0,1000); sleep(5); {
  8. // what to do when the sensor sees dark
  9. }
  10. sleep(1.0); // check every 1 second
  11. }
  12. }
Add Comment
Please, Sign In to add comment