My goal with this code was to make something that would measure temperature and light using a thermistor sensor and a photo sensor. I then coded in a servo motor whose rotational speed would vary based on light/temperature. I was thinking of this as a sort of electric fan that varies in speed based on the conditions of the room it is placed in. I used the code we went over in class, with adjustments, to “accomplish” this. My issue is that it’s not actually accomplished.
The code compiles, and it “uploads” to my board via my computer, but the sensors don’t respond and I keep getting error messages from my computer ex. (every time I upload)
and which I’ve never seen before,
and apparently the internet is as confused as I am.
I then tried taking the servo code out, and just running for the two sensors using the on-board neopixel as an output, with the same results. And apparently my computer has the same problem with the code we went over in class. Seeing as the deadline is about 15 min. away, and I’m not sure if my code or my wiring is wrong or if my computer is just being weird, I figured I’d upload the code and the wiring and re-upload past the deadline when I figure out what went wrong.
The servo one (with diagram): photo_servo
The neo pixel one: photo_therm
One thought on “Assignment 1”
Not only did I have this problem, I fixed it and posted about it in my nerd blog: