Basic Stamp np timer????
Milevithius
Posts: 4
Hello,
I`m currently building a Robot. no problems so far with motion, navigation, and interaction.
Now its is time to get it alive, here goes my question:
I want to create a continous hearth beat. Obviously without affecting its other routine/special activities. For this I was wondering if Basic stamp includes a timer, which could interrupt the program and call one subroutine at regular intervals for a quick Hearth beat in this case. So sort of code : Every 1750 gosub_Hearth once done return to previous function.
The point is that I would like to give some emotions (create dif. moods depending on inputs . ex dark) which would be translated in hearth beating pace.
For now navigation stops for each hearth beat which is quite stupid.
FYI Beat of my Robot.
PULSOUT 9, 32500 ' LED on, duration
FREQOUT 11, 50, 3000 ' Beep, duration, Frequency
PULSOUT 10, 16250 ' LED on, duration
PAUSE 25
FREQOUT 11, 25, 3000 ' Beep, duration, Frequency
PAUSE 1750
If you have any idea how I can eventually implement this in robot go ahead.
I'm also open to building a circuit from scratch. Any idea is more than welcome!
Tks for help and share of thoughts
I`m currently building a Robot. no problems so far with motion, navigation, and interaction.
Now its is time to get it alive, here goes my question:
I want to create a continous hearth beat. Obviously without affecting its other routine/special activities. For this I was wondering if Basic stamp includes a timer, which could interrupt the program and call one subroutine at regular intervals for a quick Hearth beat in this case. So sort of code : Every 1750 gosub_Hearth once done return to previous function.
The point is that I would like to give some emotions (create dif. moods depending on inputs . ex dark) which would be translated in hearth beating pace.
For now navigation stops for each hearth beat which is quite stupid.
FYI Beat of my Robot.
PULSOUT 9, 32500 ' LED on, duration
FREQOUT 11, 50, 3000 ' Beep, duration, Frequency
PULSOUT 10, 16250 ' LED on, duration
PAUSE 25
FREQOUT 11, 25, 3000 ' Beep, duration, Frequency
PAUSE 1750
If you have any idea how I can eventually implement this in robot go ahead.
I'm also open to building a circuit from scratch. Any idea is more than welcome!
Tks for help and share of thoughts
Comments
http://www.parallax.com/Store/Robots/RoboticAccessories/tabid/145/CategoryID/22/List/0/SortField/0/catpageindex/2/Level/a/ProductID/482/Default.aspx
It can produce a sound that continuously repeats until you tell it to stop. You can then give it another repeating sound to play.
although I'm interested in implementing a hearth beat with light with the opportunity to switch the sound off (for night sleep).
Do you think the sound pal can be easily modified to attach 2 LEDs ?
Regards,
Thanks again.
The sound pal is not easily modified to be anything other than what the documentation describes. It's physically very small using small, surface mount parts. There's no provision for reprogramming although the microcontroller used can be reprogrammed, there's no wiring or connection for it. Since the ATTiny13 microcontroller is used in several of Parallax's products (like the BS2pe MotherBoard), the development software and some sample code is available from Parallax as well as from the manufacturer. You could probably develop an LED heartbeat device patterned on the sound pal that would do what you want.