annotate service/busyboxArduino/busybox.py @ 964:6c31b682a7d7

busybox client can send IR codes Ignore-this: 181177e12841989b40fc2263fe7aea8 darcs-hash:20150121075009-312f9-97ae97117b2928365257a574914840e8d0facfe1
author drewp <drewp@bigasterisk.com>
date Tue, 20 Jan 2015 23:50:09 -0800
parents 70fd4c07a326
children 4b0f221d790c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
962
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
1 from __future__ import division
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
2 import serial, struct, json, sys
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
3
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
4 from rdflib import Namespace, Literal
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
5 sys.path.append("/my/site/magma")
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
6 from stategraph import StateGraph
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
7 import klein
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
8 from twisted.internet import task
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
9 import random, time
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
10
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
11 import restkit
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
12 reasoning = restkit.Resource("http://bang:9071/", timeout=1)
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
13 ROOM = Namespace("http://projects.bigasterisk.com/room/")
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
14
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
15 def sendOneShot(stmt):
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
16 try:
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
17 t1 = time.time()
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
18 print "post to reasoning", stmt
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
19 p = reasoning.post("oneShot",
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
20 headers={"content-type": "text/n3"},
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
21 payload=("%s %s %s ." %
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
22 tuple(n.n3() for n in stmt)))
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
23 except restkit.errors.RequestFailed:
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
24 print "oneShot failed"
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
25 return
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
26 print "posted in %.04f sec. %r" % (time.time() - t1,
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
27 p.body_string())
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
28
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
29
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
30 class Busybox(object):
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
31 def __init__(self, port='/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A4001lVK-if00-port0'):
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
32 self.serial = serial.Serial(port, baudrate=115200, timeout=.2)
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
33
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
34 def poll(self):
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
35 for tries in range(5):
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
36 self.serial.write('\x60\x00')
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
37 line = self.serial.readline()
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
38 if not line.startswith('{'):
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
39 continue
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
40 if tries > 0:
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
41 print "after %s tries" % tries
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
42 return json.loads(line)
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
43 return {'error': 'invalid response'}
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
44
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
45 def writeMessage(self, row, col, text):
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
46 msg = struct.pack('BBBBB', 0x60, 0x01, row, col, len(text)) + text
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
47 self.serial.write(msg)
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
48
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
49 def setBacklight(self, level):
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
50 self.serial.write(struct.pack('BBB', 0x60, 0x02, level))
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
51
964
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
52 def sendIr(self, remote, command):
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
53 code = {
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
54 'led_22_key': {
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
55 # LED618 remote command byte (addr is ff)
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
56 # see https://github.com/alistairallan/RgbIrLed/blob/master/RgbIrLed.cpp#L44
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
57 'ON': 0xE0,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
58 'OFF': 0x60,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
59 'BRIGHTNESS_UP': 0xA0,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
60 'BRIGHTNESS_DOWN': 0x20,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
61 'FLASH': 0xF0,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
62 'STROBE': 0xE8,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
63 'FADE': 0xD8,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
64 'SMOOTH': 0xC8,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
65 'RED': 0x90, 'GREEN': 0x10, 'BLUE': 0x50, 'WHITE': 0xD0,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
66 'ORANGE': 0xB0, 'YELLOW_DARK': 0xA8, 'YELLOW_MEDIUM': 0x98, 'YELLOW_LIGHT': 0x88,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
67 'GREEN_LIGHT': 0x30, 'GREEN_BLUE1': 0x28, 'GREEN_BLUE2': 0x18, 'GREEN_BLUE3': 0x08,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
68 'BLUE_RED': 0x70, 'PURPLE_DARK': 0x68, 'PURPLE_LIGHT': 0x58, 'PINK': 0x48,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
69 },
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
70 'led_44_key': {
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
71 # 44 key remote. command chart: http://blog.allgaiershops.com/2012/05/
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
72 'up': 0x3A, 'down': 0xBA, 'play': 0x82, 'power': 0x02,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
73 'red0': 0x1A, 'grn0': 0x9A, 'blu0': 0xA2, 'wht0': 0x22,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
74 'red1': 0x2A, 'grn1': 0xAA, 'blu1': 0x92, 'wht1': 0x12,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
75 'red2': 0x0A, 'grn2': 0x8A, 'blu2': 0xB2, 'wht2': 0x32,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
76 'red3': 0x38, 'grn3': 0xB8, 'blu3': 0x78, 'wht3': 0xF8,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
77 'red4': 0x18, 'grn4': 0x98, 'blu4': 0x58, 'wht4': 0xD8,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
78 'RUp': 0x28, 'GUp': 0xA8, 'BUp': 0x68,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
79 'RDn': 0x08, 'GDn': 0x88, 'BDn': 0x48,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
80 'Quick': 0xE8, 'Slow': 0xC8,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
81 'DIY1': 0x30, 'DIY2': 0xB0, 'DIY3': 0x70, 'DIY4': 0x10, 'DIY5': 0x90, 'DIY6': 0x50,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
82 'AUTO': 0xF0,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
83 'Flash': 0xD0,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
84 'JMP3': 0x20, 'JMP7': 0xA0,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
85 'Fade': 0x60, 'Fade7': 0xE0,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
86 }
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
87 }
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
88
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
89 address = {
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
90 'led_22_key': 0x00,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
91 'led_44_key': 0x00,
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
92 }[remote]
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
93 self.serial.write(struct.pack('BBBB', 0x60, 0x03, address, code[remote][command]))
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
94 time.sleep(.2)
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
95
962
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
96
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
97 bb = Busybox()
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
98 words = open('/usr/share/dict/words').readlines()
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
99
964
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
100 class Poller(object):
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
101 def __init__(self):
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
102 self.lastWordTime = 0
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
103 self.last = None
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
104 self.s1 = []
962
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
105
964
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
106 def poll(self):
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
107 try:
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
108 self.tryPoll()
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
109 except Exception as e:
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
110 print "poll failed: %r" % e
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
111
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
112 def tryPoll(self):
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
113 now = time.time()
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
114 if now - self.lastWordTime > 1:
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
115 msg = '%15s' % random.choice(words).strip()[:15]
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
116 bb.writeMessage(1, 1, msg)
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
117 self.lastWordTime = now
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
118 self.last = bb.poll()
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
119 print self.last
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
120 if 'slider1' in self.last:
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
121 self.s1 = self.s1[-5:] + [self.last['slider1']]
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
122 if len(self.s1) > 4:
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
123 median = sorted(self.s1)[2]
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
124 bb.setBacklight(min(255, median // 4))
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
125 if 'keyDown' in self.last:
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
126 keyNum = self.last['keyDown']
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
127 sendOneShot((ROOM['ariBed/button%s' % keyNum],
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
128 ROOM['change'],
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
129 ROOM['down']))
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
130 if self.last['motion']:
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
131 bb.sendIr('ON')
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
132 else:
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
133 bb.sendIr('OFF')
962
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
134
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
135
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
136 @klein.route('/graph', methods=['GET'])
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
137 def getGraph(request):
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
138 g = StateGraph(ROOM.busybox)
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
139 g.add((ROOM.busybox, ROOM.localHour, Literal('x')))
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
140 for attr in ['slider1', 'slider2', 'slider3', 'slider4']:
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
141 # needs: smoothing, exp curve correction
964
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
142 g.add((ROOM['busybox/%s' % attr], ROOM.value, Literal(round(poller.last[attr] / 1021, 3))))
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
143 g.add((ROOM['busybox/motion'], ROOM.value, Literal(poller.last['motion'])))
962
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
144 request.setHeader('Content-type', 'application/x-trig')
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
145 return g.asTrig()
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
146
964
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
147 poller = Poller()
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
148 task.LoopingCall(poller.poll).start(.05)
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
149
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
150 # todo: watch reasoning graph. put lines on display. send updated ir codes.
6c31b682a7d7 busybox client can send IR codes
drewp <drewp@bigasterisk.com>
parents: 962
diff changeset
151
962
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
152 klein.run('0.0.0.0', port=9056)
70fd4c07a326 busybox py and arduino
drewp <drewp@bigasterisk.com>
parents:
diff changeset
153