# HG changeset patch # User drewp # Date 1379835020 25200 # Node ID e4069a2cfcc857457062837de2b7cb1cd7079a2a # Parent 22c29940a67f7567ad8356087f11cecfcf2175d6 bedroomarduino updates Ignore-this: eeb3e527e652601b04ddd1d18f0f15f3 darcs-hash:20130922073020-312f9-13483a3790ad5fbbe75ad2345760993f4c5c1b92 diff -r 22c29940a67f -r e4069a2cfcc8 service/bedroomArduino/bedroomArduino.py --- a/service/bedroomArduino/bedroomArduino.py Thu Sep 19 23:14:09 2013 -0700 +++ b/service/bedroomArduino/bedroomArduino.py Sun Sep 22 00:30:20 2013 -0700 @@ -69,7 +69,7 @@ self.settings.arduino.ping() self.set_header("Content-Type", "application/xhtml+xml") - self.write(open("index.html").read()) + self.write(open("index.xhtml").read()) class SpeakerChoice(PrettyErrorHandler, cyclone.web.RequestHandler): def put(self): @@ -77,6 +77,10 @@ self.write(ret) class Brite(PrettyErrorHandler, cyclone.web.RequestHandler): + def get(self, which): + self.set_header("Content-Type", "text/plain") + self.write(hexFromRgb(self.settings.brites[int(which)])) + def put(self, which): which = int(which) brites = self.settings.brites @@ -166,7 +170,7 @@ ard = ArduinoBedroom(port=config['arduinoPort']) - period = 1/config['pollFrequency'] + period = 1 / config['pollFrequency'] p = Poller(config, ard, period) task.LoopingCall(p.poll).start(period) diff -r 22c29940a67f -r e4069a2cfcc8 service/bedroomArduino/index.xhtml --- a/service/bedroomArduino/index.xhtml Thu Sep 19 23:14:09 2013 -0700 +++ b/service/bedroomArduino/index.xhtml Sun Sep 22 00:30:20 2013 -0700 @@ -11,6 +11,14 @@ padding: 10px; border: 1px solid black; } +.swatch { +background: hsl(0, 0%, 13%); +display: inline-block; +padding: 4px; +margin: 3px; +border-radius: 9px; +font-size: 24px; +} /* ]]> */ @@ -55,28 +63,58 @@
Lights: - Tower LED: - Headboard 1: - Headboard 2: - Headboard 3: - Headboard 4: - Corner: - Red ball: - Ceiling: +
Tower LED: + + +
+
Headboard 1: + + +
+
Headboard 2: + + +
+
Headboard 3: + + +
+
Headboard 4: + + +
+
Corner:
+
Red ball:
+
Ceiling:
- - \ No newline at end of file +