0

How do I create a thread that continuously checks for obstacles using the ultrasonic class in nxt-python 2.2.2? I want to implement it in a way that while my robot is moving it also detects obstacles in a background process and once it detects an object it will brake and do something else

Edward
  • 93
  • 10

1 Answers1

2

You used the daemon thread instead of normal thread. because this is different to normal thread. I hope so daemon thread resolve your problem.

Ayush
  • 41,754
  • 51
  • 164
  • 239
Rajendra
  • 340
  • 1
  • 5
  • it seems that when I use the turn method in the synchronized motors class it doesn't stop until the turn method finish its execution in that means even if I use my ultrasonic sensors it still moves – Edward Oct 12 '12 at 08:21