Skip to content

Instantly share code, notes, and snippets.

@kimondo
kimondo / gist:ba648912c64179e7b8b8
Created May 1, 2015 13:13
Raspberry Pi Swingometer
import RPi.GPIO as GPIO
import time
from BeautifulSoup import BeautifulSoup
import urllib2
#change this bit
url="http://www.kimondo.co.uk/swingometer-control/"
page=urllib2.urlopen(url)
soup = BeautifulSoup(page.read())
@kimondo
kimondo / gist:42c39f9cc6d6f9c18b2d
Created February 10, 2015 15:47
EduBoard RSS ticker
<?php
$rss = new DOMDocument();
#feed info here
$rss->load('http://feeds.bbci.co.uk/news/rss.xml');
$feed = array();
foreach ($rss->getElementsByTagName('item') as $node) {
$item = array (
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
#I'm just using the title
#'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,
@kimondo
kimondo / Raspberry Pi Pi-Lite web counter
Created November 19, 2013 23:09
Raspberry Pi Pi-Lite web counter - grabs some stats off the wordpress stats API and then sends them to the serial port to be picked up by an arduino based LED display (ciseco.co.uk Pi-Lite or wharfe-education.com BelleVue)
import serial
import time
import urllib2
from BeautifulSoup import BeautifulSoup
# Configure Pi serial port
s = serial.Serial()
s.baudrate = 9600
s.timeout = 0
@kimondo
kimondo / email to LEDborg script for Raspberry PI
Created February 4, 2013 21:50
email to LEDborg script for Raspberry Pi
import imaplib
import email
#connect to gmail
mail = imaplib.IMAP4_SSL('imap.gmail.com')
mail.login('your_email_address@gmail.com','your_password')
mail.select('inbox')
mail.list()