【问题标题】:Python How do I toggle a GPIO from my E-mail inboxPython 如何从我的电子邮件收件箱切换 GPIO
【发布时间】:2013-05-28 20:58:10
【问题描述】:

所以我已经着手进行一项计划,以便对某些东西进行编程,每当我收到一封电子邮件时,它就会切换 GPIO 以打开 LED,有人可以帮我弄清楚如何在我的 Raspberry Pi 上切换 GPIO。 这是我到目前为止所拥有的

import imaplib

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

mail.login('mygmail@gmail.com','mypassword')

【问题讨论】:

    标签: python gmail raspberry-pi gpio


    【解决方案1】:

    根据使用GPIO,有一个项目raspberry-gpio-python,提供访问raspberry-pi GPIO的python库,在此处查找示例:https://code.google.com/p/raspberry-gpio-python/wiki/BasicUsage

    根据查看您的电子邮件收件箱,您可以在 StackOverflow 上找到重复的问题,例如看看这个简单的问题:Check unread count of Gmail messages with Python

    【讨论】:

      猜你喜欢
      • 2013-02-01
      • 2020-03-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-01
      • 1970-01-01
      相关资源
      最近更新 更多