Mercurial > code > home > repos > homeauto
comparison service/arduinoNode/arduinoNode.py @ 192:6c6897a139da
support for pwm board
Ignore-this: 4bf59699c590c75c79e6ae72d719343a
author | drewp@bigasterisk.com |
---|---|
date | Sun, 30 Aug 2015 01:19:29 -0700 |
parents | ad20e5cb4feb |
children | 9c8674329a13 |
comparison
equal
deleted
inserted
replaced
191:443d562c7b39 | 192:6c6897a139da |
---|---|
185 gen = '' | 185 gen = '' |
186 else: | 186 else: |
187 raise NotImplementedError | 187 raise NotImplementedError |
188 | 188 |
189 if gen: | 189 if gen: |
190 generated[attr] += '// for %s\n%s\n' % (dev.uri, gen) | 190 generated[attr] += '// for %s\n%s\n' % (dev.uri, gen.strip()) |
191 | 191 |
192 code = ''' | 192 code = ''' |
193 %(includes)s | 193 %(includes)s |
194 | 194 |
195 %(global)s | 195 %(global)s |
204 | 204 |
205 void idle() { | 205 void idle() { |
206 // this slowdown is to spend somewhat less time PWMing, to reduce | 206 // this slowdown is to spend somewhat less time PWMing, to reduce |
207 // leaking from on channels to off ones (my shift register has no | 207 // leaking from on channels to off ones (my shift register has no |
208 // latching) | 208 // latching) |
209 if (micros() < lastFrame + 128) { | 209 if (micros() < lastFrame + 80) { |
210 return; | 210 return; |
211 } | 211 } |
212 lastFrame = micros(); | 212 lastFrame = micros(); |
213 frame++; | 213 frame++; |
214 %(idles)s | 214 %(idles)s |