Interesting. I'll make sure that I keep that in mind as I build my project. Any transient 'stuff' on my board could cause a little led to shine. I'm curious, can I pot these transistors with silicone to keep away dust, etc? If I get it all working nicely, I'll want to keep it working.
**note from my handle I went to ULowell (when it wasn't called UMass Lowell and they were the politically incorrect Chiefs instead of the River Hawks).
Thanks again for your assistance, I'm sure I'll be back before I'm done.
Also, I have two Arduino boards talking and playing very nicely when I transmit a message via serial, but not so with an integer. I can always post in the right section of the forum.
I read as an int but I get it as a char? Is that a serial thing? also, cannot seem to get more than one char in a string that I send. I think I don't understand serial and possibly declaring the message[3] improperly...
this is working, but not as expected (but I'm OK with that).
int i;
int MessageLength;
int Message[3];
//
int pwmPin = 40; //PartlyCloudy
int pwmPin2 = 41; //PartlyCloudy
int pwmPin3 = 42; //OverCast
int pwmPin4 = 43; //Overcast
int pwmPin5 = 44; //Thunderstorms
int pwmPin6 = 45; //Thunderstorms
int pwmPin7 = 46; //Sunny
int pwmPin9 = 47; //Cloudy
int pwmPin10 = 48; //Cloudy
int pwmPin11 = 49; //Rain
int pwmPin12 = 50; //Rain
int pwmPin13 = 51; //Snow
int pwmPin14 = 52; //Snow
void setup()
{
Serial.begin(19200);
}
void loop()
{
if (Serial.read() == '
)
{
for (i=0;i<3; i++)
{
delay(1);
Message[i] = Serial.read();
delay(10);
Serial.print("read a: ");Serial.println(Message[i]);
if(Message[i] =='#');
{
break;
}
}
MessageLength = i;
delay(10);
Serial.print("the message was:");
for(i=0;i<MessageLength;i++)
delay(10);
{
Serial.print(Message[i]);
delay(10);
}
Serial.println("/");
switch (Message[i])
{
case 65://an "A" was sent
Serial.println("Sunny");
Sunny();
break;
case 66://a "B" was sent
Serial.println("Partly Cloudy");
PartlyCloudy();
break;
case 67://a "C" was sent
Serial.println("Cloudy");
Cloudy();
break;
case 68://a "D" was sent
Serial.println("ThunderStorms");
ThunderStorms();
break;
case 69://a "E" was sent
Serial.println("Rain");
Rain();
break;
case 70://a "F" was sent
Serial.println("Snow");
Snow();
break;
}
}
}