SurferTim:
Are you planning on using shiftOut? You don't need D10 for that.
http://arduino.cc/en/Reference/ShiftOut
I was able to get this all going very well with your assistance. I have attached where I am for the moment, but I have another question.
This sketch is for a weather station and this will be a slave Nano controlling the output to the weather and message portion of the project. While I was able (with the assistance of those present) to move a short message via serial from the master to the slave, I need help getting 'chunks' of data.
I would like to get the Weather, OutsideTemp, InsideTemp,Units, and MessageFlag in a format with which I can decode it and make it work for my sketch. Something like:
$A,-3,72,F,1#
$ = start of transmit
A = char
-3 = int
72 = int
F = boolean
1 = boolean
= end of transmit
I'm using this for the weather, but I can only retrieve a single char, experimenting with variable types has gotten me nowhere.
void loop()
{
//
//GO get Temp and Weather
//
if (Serial.read() == '
....
ClockSlaveWeatherSkitsFinal.ino (14 KB))
{
for (int i=0;i<3; i++)
{
delay(1);
MessageLength = i;
Message[i] = Serial.read();
delay(10);
Serial.print("read a: ");Serial.println(Message[i]);
if(Message[i] =='#');
{
break;
}
}
delay(10);
Serial.print("the message was:");
for(int i=0;i<MessageLength;i++)
delay(10);
{
Serial.print(Message[MessageLength]);
delay(10);
}
Serial.println("/");
}
switch (Message[MessageLength])
{
case 65://an "A" was sent
Serial.println("Sunny");
....
[ClockSlaveWeatherSkitsFinal.ino|attachment](upload://nqjZgq7gepNYisVkhgXVeDcUQTv.ino) (14 KB)