Bambino Programming by David Buckley
Developer Programming instructions - PicAxe-20m2
Now you have built Bambino you can either just use it with the preloaded program or you can learn about robots and programming by following the programs I wrote while creating the original Bambino.
You will need the PicAxe Programming Editor
then copy from the listings below and paste each program into the editor,
or right-click and 'save link as'.
- BambinoPicAxeCommands@47.txt for kicking a ball
- BambinoPicAxeCommands@48.txt no kicking but extra sounds
- the PicAxe20m2 is now full
- Bambino-00 - All LEDs off no activity so can test board voltages
- Bambino-01 - Test eyeLEDs, whiskerLEDs and speaker
- Bambino-02 - Test PWM of eyeLEDs
- Bambino-03 - Test InfraRed input
- Bambino-04 - Test Eye light values
- Bambino-05 - Test Whisker light values
- Bambino-06 - Play the inbuilt tunes using keys 1 to 4 and beep on 5
- Bambino-07 - Set servos to mid position
- Bambino-08 - Calibrate servo mid positions and put in EEPROM
- Bambino-8+ - Adjust servo mid positions from Handset and put in EEPROM
- Bambino-09 - Introduce _iStand:- initialise with feet in mid position
- Bambino-10 - Set rollby, rollbymax for Roll Right
- Bambino-11 - Check rollby, rollbymax for Roll Left
- Bambino-12 - Check rollby and rollbymax for rollL, rollR
- Bambino-13 - Introduction of _Stand
- Bambino-14 - Investigate effect of rollspeed; watch roll for all three speeds
- Bambino-15 - Investigate effect of rollspeed; watch Roll and Stand for all three speeds
- Bambino-16 - Check paceFL paceFR; Investigate effect of pacespeed; Introduction of pulseservos:
- Bambino-17 - Check Fd
- Bambino-18 - Test Rt, Lt
- Bambino-19 - Test Bk
- Bambino-20 - Test T2l: TurntoLight: T2d: TurntoDark: Wl: Wd:
- Bambino-21 - Creation of sections ACTIONS, BEHAVIOURS, ACTS;
Introduction of ACT parameter 'Ado'
- Bambino-22 - Demo routine + example use of Start1: to flash eyes
- Bambino-23 - Walk Fd with obstacles avoidance using eyes from 04,
introduction of Default behaviour
- Bambino-24 - Walk Fd with obstacles avoidance as 23, with Act BT
- Bambino-25 - Walk Fd with drop-off avoidance using whiskers from 05
- Bambino-26 - rewritten with reading of whiskers as subroutines
- Bambino-27 - rewritten with autocalibration of down whiskers
- Bambino-28 - Test maximum PWM and hence minimum brightness of eyeLEDs,
needed in Bambino-29
- Bambino-29 - Wait for IR command then do it otherwise WANDER as B24
- Bambino-30 - rewrite to clearer code
- Bambino-31 - remember a sequence of key presses on IR-controller
- Bambino-32 - remember up to 7 sequences of key presses in RAM,
forgotten on power off.
Adjust RollC and PaceC added, easier to fine tune.
Execute subroutines from IR-controller added, RockAdo.
- Bambino-33 - remember up to 8 sequence of key presses in EEPROM,
now not forgotten.
Data can now be sent to a PC.
- Bambino-34 - obstacles memory made deeper for better obstacle avoidance,
and put in RAM, Mfrus_obs introduced
- Bambino-35 - key  can now be learned
- Bambino-36 - incorporate drop-off avoidance from B25,
remember holes and obstacles
- Bambino-37 - PicAxe SRF05 Ultrasonic sensor added
and facility to adjust
USawareAt and UStoonear from IR-handset
Adjust RollC PaceC removed to make room.
- Bambino-38 - Added code to use either PicAxe SRF05 or an HC-SR04
Ultrasonic sensor with #defines for sensor type,
cm or inches, and testUS.
- Bambino-39 - added KEY_PLUS to test Ping sensor and act on result,
can be put in learned routines.
- Bambino-40 - minor rewrites - see modified, better use of R_Ping
added poweron test of US, if <10 then disable US
- Bambino-41 - added CASE KEY_9 ' Behaviour to select behaviours
B_USxxx now write to RAM
- Bambino-42 - moved whisker testing and reaction to R_Whiskers
added KEY_MINUS to test Whiskers and act on result
removed test of US in INITIALISE:, not needed now on keys
initialise EEPROM with DUStoonear, DUSawareat, DUSconfigOK
- Bambino-43 - Act#8 made autorun
On poweron to WANDER do [f|][Power]
enter command mode do [f|][Power]
WANDER B_slow do [f|][Power]
run Act1 do [f|][Power]
do SAct1 then Act1 do [f|][f^][Power]
- Bambino-44 - moved testing of DUSvalues and updating of RAMUS to B_USuser:
 runs B_USuser: to get USuser distance values from EEPROM
- Bambino-45 - program now runs @32MHz except when pulsing Servos and Beeping
Beeping didn't sound right @32MHz
Servos pulsed @4MHz to keep 10us resolution which fits in a byte
- Bambino-46 - adjustment of sframe to fine adjust speed
- Bambino-47 - [^][<]RollL and [^][>]RollR made, SERTXD("F") etc commented
For kicking a ball
- Bambino-48 - removed RollR and RollL, added sounds squack, whee and whoa