Author Options:

HELP with Basic Stamp 2 programming!!! Answered

I am working on a project which involves usage of a Basic Stamp 2 module. I need your help because I'm a newbie and I don't know hot to program it yet to do the job. I want every time the right (or the left, it doesn't matter) built-in touch sensor is pressed, the right (or the left, it doesn't matter) motor to be given power for 5 times with a pause of aprox. 1 second between each time (see picture), and then stop.
I would really appreciate that if you could help me. Please post your program, or pm it to me.

P.S. Be careful! I DO NOT use servos! I use simple DC motors with a driving module!
Here are the microcontroller ports for each motor and touch sensor:

Left motor: ports 3 and 5 of the X7 extension bus
Right motor: ports 14 and 15 of the X7 extension bus
Left touch sensor: port 4 of the microcontroller
Right touch port: port 6 of the microcontroller


The forums are retiring in 2021 and are now closed for new topics and comments.