Setup¶
User interface¶
Bulebule user interface uses as input:
A single button (differentiates between long and short press)
The IR sensors (detects when your finger passes near the sensor)
And as output:
The speaker
Blue Pill’s integrated green LED
On-board red LEDs
Right after it is turned on, Bulebule can be configured and instructed to perform different tasks following the diagram bellow:
Note
After Go!
(run/explore), the robot will end up in the Idle
state back again.
Encoders calibration¶
If you are using slightly different wheels, motors or encoders than the ones
suggested in the Building section, you will probably need to calibrate
the MICROMETERS_PER_COUNT
constant. You may need to calibrate it even if
you use the same suggested components, since little differences in the wheels’
diameter can affect its value.
IR sensors calibration¶
It is important to properly calibrate the IR sensors. Not only your sensors will behave differently than sensors in another Bulebule build, but also, readings can vary a lot from maze to maze, depending on the characteristics of the walls.
To calibrate the IR sensors, create a 2-cell closed maze like the following:
o---o
| G |
o o
| S |
o---o
Place the robot at the starting cell (S
), with its tail touching the back
wall and facing towards the goal cell (G
).
Then, using the connect_bluetooth.py
script, connect to the robot and send
the command:
run front_sensors_calibration
The robot should travel across the two cells and end up with its nose touching
the front wall at G
.
During that travel, the robot has sent information about the IR sensors readings to the console, so make sure to save it from the console with:
log save
Then run the front_sensors_calibration.ipynb
notebook to obtain the IR
configuration parameters, which you can replace in config.h
.