Bambino Programming by David Buckley
- Developer Programming instructions - PicAxe-20m2
- Developer Programming instructions - PicAxe-20x2
- Revisions
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
available from
http://www.picaxe.com/Software/PICAXE/PICAXE-Programming-Editor
then copy from the listings below and paste each program into the editor,
or right-click and 'save link as'.
The first Bambinos used a PicAxe20m2 which with Bambino-48 was full.
Bambino can be upgraded by replacing the 20m2 with a 20x2 which has twice as much program space and twice as many variables. See below for 20x2 programs.
PicAxe20m2 programs
- Bambino-20m2_UserManual-47.txt
- BambinoPicAxeCommands@47.txt for kicking a ball
- Bambino-20m2_UserManual-48.txt
- BambinoPicAxeCommands@48.txt no kicking but extra sounds
- BambinoPicAxeCommands@49.txt set US defaults to current RAM BeHave values
- the PicAxe20m2 is now full
Programs
--------
- 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 [0] 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 '[9] Behaviour to select behaviours
B_slow,B_medium,B_fast,
B_UStimid,B_USnormal,B_USbold,
B_noWhiskers,B_noUS
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[9][8]
initialise EEPROM with DUStoonear, DUSawareat, DUSconfigOK
- Bambino-43 - Act#8 made autorun
On poweron to WANDER do [f|][8][0][Power]
enter command mode do [f|][8][Power]
WANDER B_slow do [f|][8][9][1][0][Power]
run Act1 do [f|][8][1][Power]
do SAct1 then Act1 do [f|][8][f^][1][1][Power]
etc
- Bambino-44 - moved testing of DUSvalues and updating of RAMUS to B_USuser:
[9][9] 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
- Bambino-49 - DecayMemory removed from Wander
' obstacle code revised, frust not used, obsclear set to 1% from 20%
' after react obstacle memory set to zero not decayed, frame now 12
' Set setUSawares: rewritten, added [f+][0] set user to current
' lastUSdist tested against USdist to turn away from obstacles in R_Ping [2048 bytes]
PicAxe20x2 programs
Some code changes are required because -
- some Symbol names don't work - the X2 needs port.pin names for those pins.
- there are not enough pwm pins to dim the eyes so they are blinked instead when waiting for a command.
When upgrading it is only necessary to run Bambino-8+x2.bas to set the servo values in the new chip then load Bambino-38x2.bas or later.
- BambinoPicAxeCommands@50x2.txt
- Bambino-04x2 - Test Eye light values
- Bambino-05x2 - Test Whisker light values
- Bambino-08+x2 - Adjust servo mid positions from Handset and put in EEPROM
- Bambino-38x2 - Added code to use either PicAxe SRF05 or an HC-SR04
Ultrasonic sensor with #defines for sensor type,
cm or inches, and testUS.
- Bambino-50x2 - 2022-02-27 from #49 - converted for 20x2
note some Symbol names don't work on the x2 **38x2
added turnUSnear - turn to facing an object
added turnUSfar - turn to facing an open space
added #defines for Whisker sensitivity
and for x2 normalsframe, now 12ms pause for frame
[page top]
Revisions
2022-03-03 added 20x2 programs