I have never done any programming of serial communication between Picaxes or anything else, for that matter. There is a lot of info around but it is not organized, so I'm not sure where to start. I've looked around for a beginner tutorial to serial coms on Picaxe with a number of well-explained examples, but haven't found that. The posts in the forum seem to be by people who know a bit about what they are doing already.
Here's the outline of a project I want to build. I will have a main program on a 14M2 talking to upwards of ten or more 08m2 Picaxes spaced up to several feet away from each other. Each of those, ID numbered 1 to 10 in their program, will be able to control several things such as an LED, a motor, a servo, music, AC lighting through a Solid State Relay, etc.
(This is for a proposed Christmas display for next year involving various lights and moving characters and objects all sequenced/choreographed by the 14M2 or modified by observers pushing interactive buttons. Dozens of things might be running at any time.)
Let's say I want to tell 08M2 chip #6 to turn on an LED. I want to send a signal to all ten chips that would contain the chip ID number 6 and another number to tell the appropriate chip which function it should control at that time. The others, of course, would ignore the instruction. Then, at a later time, I want to tell chip #9 to turn its motor off. Then chip #3 to play a tune. Etc, etc. This way I can control numerous devices with minimal wiring from the 14m2 to each 08M2.
First, I imagine this can be done? Second, what serin, serout, or other statements do I need to make it happen? I can't imagine it to be too complicated since the 14M2 will just keep sending different pairs of numbers the exact same way for each action. All I need are those few serial code lines to get me going. Third, are there any input or output pins to be avoided?
Finally, will interrupts from the buttons (to the 14M2) interfere with the serial coms?
This year's small, simple display is up and running, but needs some tuning up in terms of what is on at what time. I might even be able to rewire it if I can figure out how to run it by serial. I will get a video up soon on this thread.
Thanks for any help you can give me.
wardbob
Here's the outline of a project I want to build. I will have a main program on a 14M2 talking to upwards of ten or more 08m2 Picaxes spaced up to several feet away from each other. Each of those, ID numbered 1 to 10 in their program, will be able to control several things such as an LED, a motor, a servo, music, AC lighting through a Solid State Relay, etc.
(This is for a proposed Christmas display for next year involving various lights and moving characters and objects all sequenced/choreographed by the 14M2 or modified by observers pushing interactive buttons. Dozens of things might be running at any time.)
Let's say I want to tell 08M2 chip #6 to turn on an LED. I want to send a signal to all ten chips that would contain the chip ID number 6 and another number to tell the appropriate chip which function it should control at that time. The others, of course, would ignore the instruction. Then, at a later time, I want to tell chip #9 to turn its motor off. Then chip #3 to play a tune. Etc, etc. This way I can control numerous devices with minimal wiring from the 14m2 to each 08M2.
First, I imagine this can be done? Second, what serin, serout, or other statements do I need to make it happen? I can't imagine it to be too complicated since the 14M2 will just keep sending different pairs of numbers the exact same way for each action. All I need are those few serial code lines to get me going. Third, are there any input or output pins to be avoided?
Finally, will interrupts from the buttons (to the 14M2) interfere with the serial coms?
This year's small, simple display is up and running, but needs some tuning up in terms of what is on at what time. I might even be able to rewire it if I can figure out how to run it by serial. I will get a video up soon on this thread.
Thanks for any help you can give me.
wardbob