
The first picture shows the basic setup. Using a cobbler from Adafruit (This is NOT an endorsement, but it works and here's the link : https://www.adafruit.com/product/2028) and some generic LED circuit from I don't remember where, I added the following Python code.
On a side note, there's a gyro or a BMP280 or something, a potentiometer, and a humidity sensor also on that breakout board. We'll get to those some other day. :-D
Anyway, it's crude and ugly, but sometimes you just gotta let your hair down - metaphorically of course - and beyond here be pythons, or at least a screenshot of the useful part. I put it in as a screenshot because I like the darker theme for IDLE. I think I used this one, but it's my own hardware so I didn't document it. Link to dark theme: https://gist.github.com/dsosby/1122904 .

Remember, the Pi and our Phones are roughly comparable - typically an ARM processor running a Linux derivative at around 1GHZ.
Yeah, I'm not actually satisfied with the experiment either, and yeah it's going to bother me.
The "righter" way, of course, is to do what we have in our robotics code and let it lounge around in a do-nothing state until 50 milliseconds elapses then set a physical output and watch it jump around on an oscilloscope. Then keep shrinking the time until the error is large enough to be a pain. This might be a fun thing to do with our students in between seasons, but even with what we have, I'm a little more comfortable believing we shouldn't really trust our hardware to be both accurate and precise down to 1-2 milliseconds.
No comments:
Post a Comment