Skip to content

Instantly share code, notes, and snippets.

from time import sleep
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(23,GPIO.OUT)
GPIO.output(23,GPIO.HIGH)
sleep(5)
GPIO.output(23,GPIO.LOW)
GPIO.(cleanup)
# coding: utf-8
import RPi.GPIO as GPIO
from time import sleep
GPIO.setmode (GPIO.BOARD)
GPIO.setmode(17, GPIO.OUT)
GPIO.setup(19, GPIO.OUT)
GPIO.setup(22,GPIO.OUT)
GPIO.setup(26,GPIO.OUT)
@15amccann
15amccann / s.py
Created March 7, 2017 10:38 — forked from dobrienSTJ/s.py
IR Rangefinder Rover
#Only in PYTHON2.7
import RPi.GPIO as GPIO #GPIO Libraries
from time import sleep #Sleep Functions
import readchar #keyboards
GPIO.setwarnings(False)#Blocks error warnings
GPIO.setmode(GPIO.BCM) #Setting Up
GPIO.setup(23, GPIO.OUT) #back right
GPIO.setup(24, GPIO.OUT) #front right
print("anything") #this prints it out
from time import sleep #this makes the programme pause
sleep(24)
my dog = input("daisy is my dog") #this is an input
while True: #while loop
print("doggos")
choice = input("Choose your attack: orange or finger")
if choice == "orange":
print("you hit the first monstwr with a orange")
monster1.getsHit()
elif choice == "finger":