serial and eeprom problems...please help
we are running a simple master - slave test on a modular house. basically we are trying to control a light ballast and an automated window blind to maximize the energy efficiency of the modular house. to do this, we have a master pod with a BS2p stamp that is polling information off of a slave/sensor pod. every five minutes, the master requests the temperature and light data from the slave/sensor pod. once this data is retreived, the master pod goes into its actuation routine. the recursive loop in our control is constantly trying to get the updated data from the sensor pod to provide the next step of actuation in the control. once things are stable enough to the desired light and temperature conditions, it goes back and waits five minutes. attached is the master and slave code.
we are getting some really odd numbers when we try debug the master code with what it is getting from the slave. i am wondering if we are not formatting it correctly, or if there is something we are just missing??? is there something about x-10 that screws with the data (random i know)? we seem to get a packet of info that isn't separated properly...
on another note, we are storing these values in the EEPROM of the master pod to later go back and analyze the data. we are getting some really funking data points. attached is a file of some of the data we are storing...can someone please help.
thanks.
we are getting some really odd numbers when we try debug the master code with what it is getting from the slave. i am wondering if we are not formatting it correctly, or if there is something we are just missing??? is there something about x-10 that screws with the data (random i know)? we seem to get a packet of info that isn't separated properly...
on another note, we are storing these values in the EEPROM of the master pod to later go back and analyze the data. we are getting some really funking data points. attached is a file of some of the data we are storing...can someone please help.
thanks.
Comments
SEROUT SO, Baud, [noparse][[/noparse]"!",CR,DEC4 light2,CR, DEC2 temp2,CR]
SERIN POD2data,stamp_BAUD,[noparse][[/noparse]WAIT("!"),DEC4 light2,DEC2 temp2]
Jeff T.
In the Master_6 program you use the following:
DO WHILE ((light2 > 90)&(i < 7))
I suspect you may have wanted to use this:
DO WHILE (light2 > 90) AND (i < 7)
Additionally, you are using various STORE commands to alter the program slot used for EEPROM storage. Are you sure you want to be doing that?
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔