Have you seen how easy it is to program with Bitbloq? Do you want to program Zowi even more? Keep reading to find out how to make smart programs!
Until now, we have only programmed direct orders to Zowi, but how can we tell him to dance the moonwalk whenever you put your hand in front of his eyes? Find out in this project!
Sensors and actuators
You’re bound to have heard the word sensors, but do you know what it means? Robots have 4 types of components:
Experiment: Smart eyes
In the Bitbloq I project we only programmed actuators, but we will now use sensors, Zowi’s eyes, to be exact. Go to Bitbloq, connect Zowi and turn it on, and…
- Choose Robot Zowi in the hardware tab
- Go to the software tab
- Look for the block “If…run” which is in the “Control” tab
- Drag it to the (Loop)
- Now look for the “Zowi, measure distance” block and put it in the “If…run” block
- Next, fill the gap with a “number” block which you will find in the “Mathematics” tab
- Change the number of the block by clicking it and entering “10”
- Click the = symbol and change it to <
- Now look for the emotion block you want and put it in the “If…run” block
- End by connecting your Zowi (turned on) to the computer using the cable, and hitting the load button.
The “If…run” block is a special block which performs an action whenever a certain condition is present.
The “<” symbol means “less than”, and the “>” symbol means “greater than”.
The “Zowi, measure distance” block is one of Zowi’s sensor blocks. These blocks give the circuit board a number depending on what has been measured. This specific block tells the board the number of centimetres between Zowi and an obstacle.
The “Zowi, measure distance < 10” block is one of Zowi’s sensor blocks. These blocks give the circuit board a number depending on what has been measured. This block in particular works as follows:
Did you know?
There are countless types of sensors: to detect colours, temperature, light, and so on. They all return numbers to the circuit board. Basically, they are very similar to Zowi’s sensors.