Can you help me... I have been trying to create this notifier wherein the led would light up once there is an unread mail in my gmail account. The C# code seems to be working but it seems that it doesn't communicate well with my arduino.. Not sure exactly what the problem is... I would really appreciate it if someone gives me a hand here... Thanks...
The C# script, i think works just fine... It shows how many unread message I have and all.. But it doesn't seem to trigger the led in the arduino (lights up if there is an unread mail). Let me try your suggestion.
its just an infinite loop... it constantly checks the mail if there are any updates ...
Then, why are there no comments to that effect? The code looks like a mistake, the way it's written.
You write m to the part on every pass through that loop, whether there is mail or not. Why? How is the Arduino supposed to distinguish between an m that means no mail and one that means mail?
Please help guys.. Or if u know an easier method to do a gmail notification like this.. . Badly need.. any help would do.. . I tried several methods i found googling but having no luck.. Im pretty much a beginner to this
The code you're running on the PC is obviously broken. Have you read the comments about it and tried addressing them? If so, where's your updated code?
void loop()
{
/* loop gmail check mails */
if (Serial.available() > 0)
{
int val = Serial.read();
Serial.write(val, DEC);
if (val == 'n')
{
digitalWrite(ledPin, LOW);
}
else if (val == 'm')
{
digitalWrite(ledPin, HIGH);
}
}
delay(5000);
}
Tried this one but I am getting some error:
sketch_aug28a.ino: In function 'void loop()':
sketch_aug28a:15: error: invalid conversion from 'int' to 'const uint8_t*'
sketch_aug28a:15: error: initializing argument 1 of 'virtual size_t Print::write(const uint8_t*, size_t)'