davidbuckley.net |
home > | Ambler < Pop-Ambler > Mom-Ambler | 16 October 2022 |
Pop - a.k.a - Sam-Ambler by David Buckley | July 2002 |
as at November 2008 |
Pop was built with a Parallax Basic-Stamp-2 (BS2) controller then in 2014 I added a PicAxe 28x2 as an auxillary controller.
The 28x2 accepts IR commands from a PicAxe Sony Infra-Red remote control. These commands allow command strings to be remembered and replayed, they also allow the Acts in BS2 DATA to be executed.
At first Pop's commands in the BS2 were token values but when the 28x2 was added they were changed to ASCII characters.
However having two processors with some Acts stored in one and other Acts stored in the other just made everyhing difficult, the BS2 is full, plus the message passing slowed things down a little which is why that although there is lots of room left in the 28x2 development stopped in favour of the Aesir using the PicAxe 40x2 with the same code space as the 28x2 but with lots more pins.
Originally Pop's electronics were supplied from a 9v battery through the BS2's 5v regulator. Probably around 2013 the 9v batter was removed and a boost regulator used to get 9v from the four AA cells.
On power on the Initialisation Act in the BS2 runs.
Then the default Act is got from the 28x2 which reads it from the Hex switch.
The current Default Act can be changed by IR commands.
If enabled the Toe Sensors are checked during every step,
toe bump will stop the step and invoke the bump reactions.
A decaying count of toe hurts is maintained and if it passes a threshold frustration reactions will be done.
If there is a 'G' command in an Act then the 28x2 will be asked to read the Sharp rangers and hurts incremented.
If there is a 'U' command in an Act then the Ultrasonic sensor will be read,
checked against Utonear and Uawareat (set in init) and US reactions done as appropriate.
The BS2 reads - the toe bump switches - toe hole detectors but these only worked well on very flat surfaces - user pot. - ultrasonic sensor - serial commands from the 28x2 controls - beeper/voice LED - pace servo - roll servo - sends messages to the 28x2 The 28x2 reads - right and left LDR eyes - right and left Sharp IR rangers for detecting holes, table edges and higher obstacles - a Hex switch to select the default BS2 Act - IR receiver for commands - serial commands from the BS2 controls - sends messages to the BS2 - left yellow LED - right yellow LED - power to Sharp rangers