Skip to content

Instantly share code, notes, and snippets.

@amnuts
amnuts / example.py
Last active December 29, 2015 15:19
An example of making a motor spin (by ramping up and then down the speed) and sending a tweet when a button connected to the Raspberry Pi is pushed.
import RPi.GPIO as GPIO
from time import sleep
import os
from twitter import *
from random import choice
from datetime import datetime
op1 = 11
op2 = 13