Bumper switch help

Hi all,

So I got most of my robot parts. I still don't have any kind of sensor for the front, which is fine for the moment. I'll buy one when I have more cash.

My problem is my nephew's visiting from Norway and would like to see my robot in action, so I've rigged up a front bumper switch kind of thing (I hate it when I use my ingenuity). The device is simple, a pivoted arm on the front will swing to one side when the robot drives into something causing foil terminals to meet and complete a circuit. I'm particularly impressed with my use of elastic bands to centre the swing arm :)

So now I've made this temporary object sensor, I have no idea what to wire it upto on my picaxe28 project board and I also have no idea about the programming.

If someone could help me out, I'd be ever so grateful and so would my nephew.

See pictures below

Thanks,

 

The Bromz

 -----------------------------------------------------------------------------------------------------------

Update

Ok, so I think I've got the code figured out now. Anyone have any idea what I need to connect the switch to?

Search for ‘bump switch’ on

Search for ‘bump switch’ on this site. You’ll find lots of examples.

I have a bump switch with a Picaxe and code using an interrupt for Blind Lemon. I think the code is posted.

Thanks Ignoblegnome,As

Thanks Ignoblegnome,

As always you’re on the button.

Take a look at Picaxe Manual

Take a look at Picaxe Manual 3 on pages 25 and 26.

http://www.rev-ed.co.uk/docs/picaxe_manual3.pdf

They explain how to wire a switch and also discuss debouncing, which handles false triggering of your switch when it makes initial contact.

Thanks again Ignoblegnome.

Thanks again Ignoblegnome.