Skip to content

Instantly share code, notes, and snippets.

View gregpayne's full-sized avatar

Greg gregpayne

View GitHub Profile
@gregpayne
gregpayne / test.py
Created October 29, 2012 08:18
test code to see how to use blogger
@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')
@gregpayne
gregpayne / GPIO.html
Created October 29, 2012 09:20
GPIO HTML template
<!--
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">
@gregpayne
gregpayne / GPIO.py
Created October 29, 2012 09:21
GPIO function from main index.py
@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
@gregpayne
gregpayne / button_ISR.c
Created December 12, 2012 11:14
TI LaunchPad button
//******************************************************************************
// December 2012
// Built with Code Composer Studio v4
//******************************************************************************
#include <msp430.h>
unsigned int i;
int main(void)
{
@gregpayne
gregpayne / TCPCommunicatorClient.py
Created September 2, 2013 07:09
Raspberry Pi TCP/IP client for communications to a LabVIEW server
# Client Program
import socket
import threading
import os
import sys
import select
from time import sleep
class Transmit(threading.Thread):
def run(self):