Page 2
Firefighting Manual for CODIBOT In this activity, we will give CODI the tools and program him in such a way that he will be able to extinguish fires. STEP 1: Attach the infrared sensor and the fan to the CODIBOT as shown in the picture. STEP 2: Make the connections between the motors and the Arduino.
Page 3
STEP 4: Once the connections have been made startup ArduBlock via Arduino. (for setup and installation see Getting Started Manual). Make the Code as follows: 1. Drag and drop a do loop panel from the control tab. 2. Select a Set Digital Variable panel from the Variables/Constants Tab and snap it as shown. 3.
Page 4
4. Change the digital variable name to Fire and change the digital pin # to 2. 5. Snap a SerialPrintIN panel, replace the message panel with the glue panel, clone the Fire Panel (Right click and select clone) and snap it as shown in the picture.
Page 5
6. Snap an if/else loop below the Serial PrintIN panel. 7. Select a “= = “ panel from the Test Tab and snap it in the test slot of the if/else panel.
Page 6
8. Insert the Fire panel (Clone it by right clicking in it and selecting clone) and the LOW panel as shown. 9. Snap five set digital pin panels and two Analog Pin panels in the then slot and change their values as shown.
Page 7
10. Select a delay MILLIS milliseconds panel from the control tab, snap it as shown and change its value to 5000.
Page 8
11. Snap another set of five set digital pin panels and two analog pin panels in the else slot and change their values as shown in the figure. 12. Upload the code into Arduino. 13. Now your CODIBOT is a firefighter. It will move forward until it encounters a flame, once it finds a fire it will stop and will turn on its fan to extinguish the fire, once the fire is extinguished the fan will stop and the CODI will move forward.
Need help?
Do you have a question about the Firebot CODI and is the answer not in the manual?
Questions and answers