Quick hack to build a flying traffic light that is attached onto a Crazyflie 2.0 using a prototype deck. It has a red, yellow and green LED that can be controlled from the ground.
- Solder the LEDs and resistors onto the Crazyflie 2.0 prototype deck as indicated by the schematic.
- Clone the Crazyflie firmware repo.
- Create a new file named tf.c (see the code section) in the deck/drivers/src directory.
- Edit the Makefile according to the instructions (see code section) to include the tf.c file in the build and to load the driver.
- Attach the prototype board (make sure it's connected the correct way by looping at the front maker).
- Compile the code (see crazyflie firmware repository for instructions) and flash it using the wireless radio bootloader.
- Now you can change the traffic light using the parameter framework in the crazyflie python client by changing the tf.state parameter.
Comments