Mercurial > code > home > repos > homeauto
comparison service/frontDoorArduino/frontDoorArduino.py @ 18:84af13435de7
move more ports to use /dev/serial/by-id/
Ignore-this: 4d9bc18902dfe08897c3e03579c87b23
author | drewp@bigasterisk.com |
---|---|
date | Sat, 03 Dec 2011 19:03:20 -0800 |
parents | d6c2b9b87f7b |
children | 0cffbf171a97 |
comparison
equal
deleted
inserted
replaced
17:d6c2b9b87f7b | 18:84af13435de7 |
---|---|
179 def reportError(self, msg, *args): | 179 def reportError(self, msg, *args): |
180 print "post error", msg, args | 180 print "post error", msg, args |
181 | 181 |
182 if __name__ == '__main__': | 182 if __name__ == '__main__': |
183 | 183 |
184 port = '/dev/ttyUSB0' | |
185 if not os.path.exists(port): | |
186 port = '/dev/ttyUSB1' | |
187 | |
188 config = { # to be read from a file | 184 config = { # to be read from a file |
189 'arduinoPort': port, | 185 'arduinoPort': '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A6004bUG-if00-port0', |
190 'servePort' : 9080, | 186 'servePort' : 9080, |
191 'pollFrequency' : 1, | 187 'pollFrequency' : 1, |
192 'boardName' : 'frontDoor', # gets sent with updates | 188 'boardName' : 'frontDoor', # gets sent with updates |
193 'doorChangePost' : 'http://bang.bigasterisk.com:9069/inputChange', | 189 'doorChangePost' : 'http://bang.bigasterisk.com:9069/inputChange', |
194 # todo: need options to preset inputs/outputs at startup | 190 # todo: need options to preset inputs/outputs at startup |