For your final task, you need to get a Makey Makey from the Technology Cabinet and hook it up to your computer.
You need to control your mBot with Play-Doh, aluminum foil or some other conductive material.
As you know, there are six main inputs for the Makey Makey (up arrow, down arrow, left arrow, right arrow, space bar, and left click). Set up your mBot programming and your Makey Makey so that it works as follows:
You need to control your mBot with Play-Doh, aluminum foil or some other conductive material.
As you know, there are six main inputs for the Makey Makey (up arrow, down arrow, left arrow, right arrow, space bar, and left click). Set up your mBot programming and your Makey Makey so that it works as follows:
- If you touch one thing, the mBot will move forwards.
- If you touch a different thing, the mBot will move backwards.
- If you touch a third thing, the mBot will turn right.
- If you touch a fourth thing, the mBot will turn left.
- If you touch a fifth thing, the mBot will play a series of beeps.
- As long as you are touching a sixth thing, the mBot's LEDs will continually flash different colours.
You can use this code to detect when the left mouse button is clicked: