Let's Make Robots!

help needed with picaxe-08m code

g'day all
i have a problem with programming i was hoping somebody could help me with.
i have the Picaxe 08m servo controler board http://www.rev-ed.co.uk/docs/axe024.pdf
and the Picaxe srf05 www.rev-ed.co.uk/docs/SRF005.pdf

i have a project for school and i have to somehow program the 08m to turn a servo to a point for 4 seconds then return to where it started,after detecting movement from the sensor.

If you want to know what i am making it is a touchfree bin that opens when you wave your hand above it and then closes

i asked my teacher but he doesnt know
any help would be greatly apreciated

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
You should check "Start Here" at the top. It has info on how to make a servo move, and on how to work with a rangefinder.

I would say it's easier and cheaper with a sharp ir sensor. With that, you would  just do an adc read and if it's within the values you expect do something with the servo. It's that simple....literally, thats  how you could write the code....I would recommend actually going through the picaxe a manuals, 1 and 3 over very valuable points and 2 of course is the ref manual.

lastly, with going through the code, use the simulator that the picaxe programming editor has, it will help you out quite a bit.

As a side, we recently had our restrooms updated with automatic water and soap dispensors....ir based because of the compactness, range, and easily made wateritght.  Just something things to consider as a trashcan could get dirty at times and compactness could be useful.


hey thank alot guys for your response i will try to do this on monday when im in class next. i will keep you posted on how it goes