Skip to content

Instantly share code, notes, and snippets.

View hbradio's full-sized avatar

Brady Hurlburt hbradio

View GitHub Profile
chip@chip:/dev$ cd /proc/timer_list
-bash: cd: /proc/timer_list: Not a directory
chip@chip:/dev$ cat proc/timer_list
cat: proc/timer_list: No such file or directory
chip@chip:/dev$ cat /proc/timer_list
Timer List Version: v0.8
HRTIMER_MAX_CLOCK_BASES: 4
now at 3304971823597 nsecs
cpu: 0
/*
Copyright (c) 2016 Robert Wolterman
Original BBIO Author Justin Cooper
Modified for CHIP_IO Author Robert Wolterman
This file incorporates work covered by the following copyright and
permission notice, all modified code adopts the original license:
Copyright (c) 2013 Adafruit
/*
Copyright (c) 2016 Robert Wolterman
Original BBIO Author Justin Cooper
Modified for CHIP_IO Author Robert Wolterman
This file incorporates work covered by the following copyright and
permission notice, all modified code adopts the original license:
Copyright (c) 2013 Adafruit
Command "C:\Users\blhurlburt\AppData\Local\Continuum\Anaconda3\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\BLHURL~1\\AppData\\Local\\Temp\\pip-build-nqhsg46o\\pycryptodomex\\setup.
py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\BLHURL~1\AppData\Local\Temp\pip-ihgf_d52-record\install-record.tx
t --single-version-externally-managed --compile" failed with error code 1 in C:\Users\BLHURL~1\AppData\Local\Temp\pip-build-nqhsg46o\pycryptodomex
class Parser:
def grouped(self, iterable, n):
"s -> (s0,s1,s2,...sn-1), (sn,sn+1,sn+2,...s2n-1), (s2n,s2n+1,s2n+2,...s3n-1), ..."
return izip(*[iter(iterable)]*n)
def parse(self, filename):
print ">> Parsing " + filename
with open(filename, 'r') as f:
@hbradio
hbradio / app.py
Created September 21, 2016 17:56
# A very simple Flask Hello World app for you to get started with...
from flask import Flask
app = Flask(__name__)
current_status = 'uninitialized'
@app.route('/')
@hbradio
hbradio / app.py
Created September 22, 2016 13:26
from flask import Flask, request, render_template, Response, json
app = Flask(__name__)
import gevent
from gevent.pywsgi import WSGIServer
from gevent import monkey
from numpy import random
monkey.patch_all()
current_status = 'uninitialized'
@hbradio
hbradio / app.py
Created September 22, 2016 13:34
from flask import Flask, request, render_template, Response, json
app = Flask(__name__)
import gevent
from gevent.pywsgi import WSGIServer
from gevent import monkey
from numpy import random
monkey.patch_all
class OurStatus:
def __init__(self, default):
diff --git a/www/app.py b/www/app.py
index f1aba9d..94198b2 100644
--- a/www/app.py
+++ b/www/app.py
@@ -3,12 +3,15 @@ from os import listdir
from os.path import isfile, join
from flask_cors import CORS, cross_origin
import xml.etree.ElementTree
+import Adafruit_GPIO.PWM as pwmLib
diff --git a/www/js/mission-control.js b/www/js/mission-control.js
index 9a4ce1d..c272521 100644
--- a/www/js/mission-control.js
+++ b/www/js/mission-control.js
@@ -18,6 +18,7 @@ var eventQueue = [];
var sensorStateCache = new Array();
sensorStateCache["SENSORS_leftIr"] = false;
sensorStateCache["SENSORS_rightIr"] = false;
+$.ajaxSetup({ contentType: "application/json; charset=utf-8", });^M