Week 6 Labs
October 18, 2020
Getting On Board Accelerometer
It took me a bit to get the on board accelerometer to work. I tried following the first library, and was having difficulties. I tried using this second tutorial and had issues with using both the Serial
and IMU
parts of the library. After more soul searching, I found this other tutorial which actually used the first library. As it turns out, however, I didn’t need this at all for the first lab…
Intro to Asynchronous Serial Communications
The first lab brought little trouble.
Serial Input to P5.js
The second lab
Following the tutorial I was able to get the sensor value printing to the screen. It took me a few tries — I was using the wrong input value for my analog read, my output wire was connected to ground instead of the output, and I had problems with the code (I restarted and went through more carefully). After all this, I finally printed out the sensor value:
And with the addition of the graphing function I was able to get the pentiometer graph working as well!
Serial output from P5.js
The third lab
a blog by sam heckle class of itp 2022. doing shit. twitter.