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
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 |
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
""" | |
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 |
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 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 |
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 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]) |