Random Light Finder v3
In this version, I added the function to use the ultrasonic sensor to detect approaching objects and let the NXT avoid them. It works, though there are still some “bugs,” partly because of the limitations of the sensor (it can’t detect objects that don’t reflect ultrasonic waves well and can’t detect objects that are too close).
Following are the photos to show how to build the Random Light Finder v3 and the setup:
Notably, the facing direction (looking up/down) of the ultrasonic sensor can be controlled by Motor B. I didn’t alter the direction in this version, but I will probably explore the possibility in future versions.
The program can be downloaded here.
This post is licensed under CC BY 4.0 by the author.