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
#! /usr/bin/env python | |
# drive_in_square.py | |
import time | |
import pibot | |
import sys | |
bot = pibot.PiBot() | |
# speed = 255 | |
speed = 64 |
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
#! /usr/bin/env python | |
# monitor_ultrasonic.py | |
import time | |
import pibot | |
bot = pibot.PiBot() | |
while True: |
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
#! /usr/bin/python | |
# robot_teleop.py | |
import pibot | |
import time | |
TURN_TIME = 0.2 | |
bot = pibot.PiBot() |
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
#! /usr/bin/env python | |
# test_pibot_hardware.py | |
import time | |
import os.path | |
import sys | |
import pygame | |
import pygame.mixer |
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
#! /usr/bin/env python | |
# KCtest1.py | |
import time | |
import os.path | |
import sys | |
import pygame | |
import pygame.mixer |
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
#! /usr/bin/env python | |
# KCtest3.py - Records a video using picamera | |
import time | |
import os.path | |
import sys | |
import pygame | |
import pygame.mixer |
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
#! /usr/bin/env python | |
# KCtest4.py - All references to picamera have been removed, to allow | |
# MJPG-Streamer to be used to transmit JPEG images over WiFi network | |
import time | |
import os.path | |
import sys | |
import pygame |
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
#!/usr/bin/env python2.7 | |
# script by Sparks N Smoke based on Alex Eames at http://RasPi.tv | |
import RPi.GPIO as GPIO | |
from time import sleep | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(20, GPIO.IN, pull_up_down = GPIO.PUD_UP) # Button 0 | |
GPIO.setup(21, GPIO.IN, pull_up_down = GPIO.PUD_UP) # Button 1 | |
GPIO.setup(22, GPIO.IN, pull_up_down = GPIO.PUD_UP) # Button 2 |
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
#!/usr/bin/env python2.7 | |
# script by Sparks N Smoke for SOFTWARE control of LEDs with Pulse Width Modulation | |
import RPi.GPIO as GPIO | |
from time import sleep | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(24, GPIO.OUT) # LED Red PWM port - can use any GPIO port ! | |
GPIO.setup(25, GPIO.OUT) # LED Green PWM port | |
GPIO.setup(26, GPIO.OUT) # LED Blue PWM port |
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
#!/usr/bin/python | |
#This python program serves a web page which can be accessed via | |
#local wifi network, giving x and y rotations of the MPU-6050 | |
# Written by Andrew Birkett | |
# (http://blog.bitify.co.uk/2013/11/3d-opengl-visualisation-of-data-from.html) | |
# and modified by S&S Dec 2014 | |
import web | |
import smbus | |
import math |
OlderNewer