Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. int measuredDistance;
  2. int distanceThreshold = 1; // 1 meter
  3.  
  4. void * sensor_thread(void * threadid) {
  5. // measure distance
  6. // update measuredDistance
  7. }
  8.  
  9. int main () {
  10. while(1){
  11. // do image processing
  12. if (measuredDistance < distanceThreshold)
  13. stopTheCar();
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement