This guide shows you how to use a Motor Driver and IR blocks to drive an RC car. Before starting, make sure you have an IR and Motor Driver blocks attached to your radio and they appear online.
- Add a Car Controller and an IR to your workspace:
- Click on the gear icon of the Car Controller to access the Properties Panel and select the ports of your MotorDriver where you have connected your DC Motors.
- Enter the properties panel of the Infrared block. Add 4 items by clicking on the ‘Add Item’ button 4 times.
- Click on the red record button of each code, when you see the popup window "Waiting an IR code” press one key in your remote control, the icon should then stop flashing and its colour change to green. This indicates that the code has been recognized and stored.
NOTE: You might see a message popup indicating that the IR code hasn’t been decoded properly. This means the virtual block failed to understand the protocol of your remote control. Kitsunei Creator is still able to recognise your IR command but the performance will not be optimal and you may experience scenarios where the system doesn’t react after pressing the same remote control key. As a workaround, try recording multiple items for the same command or alternatively use a different remote control. If you experience this issue, let us know the brand and type of remote control and we will try to add it in a future software update. - After recording all 4 IR codes, they should appear as green icons. Type the desired name for your IR commands; these names will become inputs in the Logic Maker. Press ‘Save’ to store the changes and close the properties panel.
- Connect the Car Controller as a ‘child’ of the IR. Do this by dragging a connection from the IR’s right output port to the Car Controller’s left input port.
- Enter the Logic Maker of the Infrared Block by double clicking on the red canvas block or clicking on its middle icon.
- Add 4 Inputs and 4 Action gates.
- From the Input gates, select each IR code you previously recorded. And from the Action gates, select the actions of the Car Controller you want to trigger.
- Connect each input to its corresponding action. Click on ‘Apply’ to save your changes.
- You should now be able to press the recorded keys on your remote control to trigger the Car Controller’s actions. If you have DC motors attached to your MotorDriver, they should start rotating as you press the remote control keys.