Question: Hardware: Sensor 1: Light sensor Sensor 2: Touch sensor OUT_C : Left motor OUT_A : Right motor Write a NXC program for the NXT to
Hardware:
Sensor 1: Light sensor
Sensor 2: Touch sensor
OUT_C : Left motor
OUT_A : Right motor
Write a NXC program for the NXT to continuously wait for a Bluetooth wireless message and perform the task once according to the table below:
| Message | Tasks |
| 1 | Go Forward for 0.5 sec |
| 2 | Go Backward for 0.5 sec |
| 3 | Turn Left for 0.5 sec |
| 4 | Turn Right for 0.5 sec |
| 5 | Play a tone: Note A for 0.5 sec. |
| 6 | If Light SENSOR_1 is on black, increment variable cnt, and display cnt value on the LCD. cnt is initially 0. (Use NumOut function to display the cnt value.) |
| 7 | Go forward until touch (SENSOR_2 hits something). |
| 8 | Go forward from white space, cross a black strip, and stop |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
