Skip to content

Instantly share code, notes, and snippets.

View thomasmacpherson's full-sized avatar

Thomas Macpherson-Pope thomasmacpherson

View GitHub Profile
How to get an app onto your badge
Update your own fork of the repo with your app:
1. Fork the emfcamp/Mk4-Apps repo to your GitHub account
2. Clone your repo
3. Add your app to the root of your cloned repo
4. git add .
5. git commit -m "message"
6. git push origin master
@thomasmacpherson
thomasmacpherson / simplewebcontrolcad.py
Created March 18, 2014 13:41
Controls PiFace Control And Display through a web browser. Returns the status of the switches and the LCD text in a JSON string. Set the text with GET variables and send various commands.
"""
simplewebcontrolcad.py
Controls PiFace Control And Display through a web browser. Returns the status of the switches and the LCD text in a JSON string. Set the text with GET
variables and send various commands.
Copyright (C) 2013 Thomas Preston <thomas.preston@openlx.org.uk> simplewebcontrol.py
Copyright (C) 2014 Thomas Macpherson-Pope <thomas.macpherson-pope@openlx.org.uk> simplewebcontrolcad.py
This program is free software: you can redistribute it and/or modify
@thomasmacpherson
thomasmacpherson / adventCalendarCAD.py
Last active July 6, 2019 04:09
Advent Calendar for the PiFace Control And Display
#!/usr/bin/env python3
import datetime
import pifacecad
from datetime import timedelta
now = datetime.date.today()
print(now)
# if you need to change the date to test your code, then add a number of days to the date by uncommenting the line below
@thomasmacpherson
thomasmacpherson / drwho.py
Last active December 29, 2015 08:29
PiFace Control And Display Doctor Who anniversary message.
import pifacecad
cad = pifacecad.PiFaceCAD()
cad.lcd.backlight_on()
# the bit map for the 4 characters that make up the tardis, in hex
tardis0 = pifacecad.LCDBitmap([0x1, 0x7, 0xF, 0xF, 0x9, 0x9, 0x9, 0xF])
tardis1 = pifacecad.LCDBitmap([0x10, 0x1c, 0x1e, 0x1e, 0x12, 0x12, 0x12, 0x1e])
tardis2 = pifacecad.LCDBitmap([0xf, 0x9, 0x9, 0x9, 0xf, 0xf, 0xf, 0x1f])
tardis3 = pifacecad.LCDBitmap([0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1f])