0

so I have set out on a progect to program something to where whenever I get an E-mail it toggles a GPIO to turn on a LED can someone please help me figure out how to toggle the GPIO on my Raspberry Pi. here is what i have so far

import imaplib

mail = imaplib.IMAP4_SSL('imap.gmail.com')

mail.login('mygmail@gmail.com','mypassword')
karthikr
  • 97,368
  • 26
  • 197
  • 188

1 Answers1

0

According to work with GPIO, there is a project raspberry-gpio-python, a python library that provides access to raspberry-pi GPIO, Find examples here: https://code.google.com/p/raspberry-gpio-python/wiki/BasicUsage

According to check your email inbox, you can find duplicate questions on StackOverflow, for example have a look at this simple question: Check unread count of Gmail messages with Python

Community
  • 1
  • 1
MostafaR
  • 3,547
  • 1
  • 17
  • 24