This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from urllib.request import urlopen | |
from xml.dom import minidom | |
import collections | |
# extract the headlines from the feed | |
def extractString(doc): | |
str = "" | |
for node in doc.getElementsByTagName('channel'): | |
for title in node.getElementsByTagName('title'): | |
str = str + title.firstChild.data + "\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as GPIO | |
from time import sleep | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(24, GPIO.OUT) # motors setup | |
GPIO.setup(17, GPIO.OUT) | |
GPIO.setup(27, GPIO.OUT) | |
GPIO.setup(23, GPIO.OUT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as GPIO | |
from time import sleep | |
GPIO.cleanup() | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(17, GPIO.IN) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as GPIO | |
from time import sleep | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setup(11, GPIO.OUT) | |
GPIO.setup(13, GPIO.OUT) | |
GPIO.setup(16, GPIO.OUT) | |
GPIO.setup(18, GPIO.OUT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as GPIO #GPIO Libraries | |
from time import sleep #Sleep Functions | |
import readchar | |
GPIO.setmode(GPIO.BCM) #Setting Up | |
GPIO.setup(23, GPIO.OUT)#Right Motor Forwards | |
GPIO.setup(24, GPIO.OUT)# Backwards | |
GPIO.setup(17, GPIO.OUT)#Left Motor Backwards | |
GPIO.setup(27, GPIO.OUT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while True: | |
import RPi.GPIO as GPIO #GPIO Libraries | |
from time import sleep #Sleep Functions | |
GPIO.setmode(GPIO.BCM) #Setting Up | |
GPIO.setup(23, GPIO.OUT)#Right Motor Forwards | |
GPIO.setup(24, GPIO.OUT)# Backwards | |
GPIO.setup(17, GPIO.OUT)#Left Motor Backwards | |
GPIO.setup(27, GPIO.OUT)# Forwards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as GPIO | |
from time import sleep | |
import readchar | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setup(3, GPIO.OUT) #reverse | |
GPIO.setup(5, GPIO.OUT) #forward | |
GPIO.setup(8, GPIO.OUT) #left |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#the setup | |
import RPi.GPIO as GPIO #lets you use GPIO | |
from time import sleep #lets you use sleep(2) as a timer for the lights | |
GPIO.setmode(GPIO.BOARD) #tells the program what labeling system to use | |
GPIO.setup(17, GPIO.OUT) #tells the pi exactly what number pin you'll be using | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#It is done | |
from time import sleep | |
lesso = ['lesson 1', 'lesson 2', 'lesson 3', 'lesson 4', 'lesson 5', 'lesson 6', 'end task'] | |
def lesson1(): | |
print("Here you will learn the basics") |