Basically, it looks like you guys were right on the money (Thank you ever so much) I added a delay in the C# code before sending the data and it worked. I just never had to do anything like that when using PySerial in the past… but it worked.
There is still one teensy tiny little problem I can’t wrap my head around, however.
I changed the sleep mode to SLEEP_MODE_IDLE so that the arduino could be awakened by serial data… however, when the arduino is awakened by serial data it reads it perfectly,
However, if it is not awakened (already awake) then it misses the first byte from the C# program. This is consistent behavior. Can you see any reason for this in the code? I’m seeing cross eyed at this point…
Thanks again for all your help thus far.
[EDIT]
Please allow me to pose this question in addition to the weirdness above.
My project uses a light dependent resistor in a voltage divider to act sort of like a night light. When the ambient light in the room is too high, the arduino goes to sleep.
So it seems to me that to ensure the arduino is ready to receive updates via serial, I have one of two options: use SLEEP_MODE_IDLE so that serial data awakens the arduino, or attach a physical button that the user must depress before sending the serial data (to pull the ldrPin low and make sure the arduino is awake)
Now, the device would only need to receive updates every couple of months or so… and using SLEEP_MODE_IDLE yields some weird results… for example, when the arduino is supposed to be asleep it keeps repeating over serial “going to sleep” - even though if it were truly sleeping it wouldn’t be looping anymore… also, using SLEEP_MODE_IDLE it doesn’t seem as though it always wakes up as it’s supposed to… So my question is, how bad of design practice do you think it would be for me to have a button on the device that must be pressed before you can send serial data?
I swear, working on this project has been like a lot of smoke and mirrors, a lot of things didn’t seem to work the way I originally thought they would! hah.
Thanks again
Tim