Simultaneous multiple mechanical operations
neosurreal
Posts: 7
hi,
i would like some clarification on this. is it possible to have multiple mechanical operations, motors, leds, etc, functioning all simultaneously with only one board? what i mean is that if a pin is programmed for a certain duration, that operation has to end in order to move onto the next one, no? so it's a linear process? or is there to order one's programming in a different way that one pin doesn't have to wait until the other pin finishes.
hope that makes sense...
Thanks!
i would like some clarification on this. is it possible to have multiple mechanical operations, motors, leds, etc, functioning all simultaneously with only one board? what i mean is that if a pin is programmed for a certain duration, that operation has to end in order to move onto the next one, no? so it's a linear process? or is there to order one's programming in a different way that one pin doesn't have to wait until the other pin finishes.
hope that makes sense...
Thanks!
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Thanks in advance!
Post Edited (neosurreal) : 8/1/2007 5:20:28 AM GMT
- 2 motors (external I2C motor controller)
- 3 pan/tilt sensor turrets (Parallax Servo Controller)
- 2 PING sonar units
- 2 IR rangers (using external I2C ADC)
- 2 CDS light sensors (using external I2C ADC)
- LED "running" lights (using external I2C PWM out)
- 12x5 LED matrix display (using MAX 7221 display driver)
- 2 RC receiver channels
- misc. boolean sensors (low voltage, battery charger, etc.)
- DS1307 real-time clock (I2C)
- Emic text-to-speech
I set the code up so that it cycles through all the routines, but certain routines get run more often than others. In pseudo code it looks something like this:
Of course, it's all a bit more complex, and I set up my subsumption engine so that some sensors (like the RC receiver) are not checked when reacting to obstacles (this cuts the time through the loop to make reflex actions more responsive), but under ideal circumstances I'm getting 7-12 hz for the 5 tick cycle, which isn't bad for a Stamp (BS2p40). Again, none of this would be possible if I didn't have the "set it and forget it" advantage of the PSC handling servo pulses (though the serout overhead is a bit stiff) and the external I2C chip for PWM and ADC.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
Post Edited (Zoot) : 8/1/2007 5:34:29 AM GMT