This file contains hidden or 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
| @route('/flash') | |
| def flash(): | |
| # import flash | |
| # flash.flashLed() | |
| return template('templates/flash.tpl') | |
| @route('/c_flash') | |
| def c_flash(): | |
| return template('templates/c_flash.tpl') |
This file contains hidden or 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
| <!-- | |
| You are free to copy and use this sample in accordance with the terms of the | |
| Apache license (http://www.apache.org/licenses/LICENSE-2.0.html) | |
| --> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <title>Raspberry Pi GPIO control</title> | |
| <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap-combined.min.css" rel="stylesheet"> |
This file contains hidden or 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
| @route('/gpio', method="GET") | |
| def gpio(): | |
| import os | |
| from quick2wire.gpio import Pin, exported | |
| colour1 = 'white' | |
| colour2 = 'white' | |
| colour3 = 'white' | |
| #GET for when the LEDs are toggled or flashed |
This file contains hidden or 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
| # Client Program | |
| import socket | |
| import threading | |
| import os | |
| import sys | |
| import select | |
| from time import sleep | |
| class Transmit(threading.Thread): | |
| def run(self): |