I
have connected LEDs to two GPIO ports (GPIO 21 and GPIO 20) and added the following net protocol commands to
turn them on/off:
- FLL - forward left light on
- FRL - forward right light on
- FLL! - forward left light off
- FRL! - forward right light off
The Python code that receives commads over net is this:
elif text ==
'FLL': GPIO.output(PORT_FLL, 1)elif text == 'FRL':
GPIO.output(PORT_FRL, 1)elif text == 'FLL!': GPIO.output(PORT_FLL,
0)elif text == 'FRL!': GPIO.output(PORT_FRL, 0) Here
is the movie in which I turn on/off lights: