SONDER.

Interface Labs - IoT Project / Prototyping

RANT:

I really am not a fan of physical computing, I'm just not. I was never fond of using Arduino and raspberry pi in IMA during undergrad and I'm reminded of why I'm not a fan of them now. That's not to knock the professors and mentors who've taught me but more a me problem. Especially in recent years where I've been struggling with the feeling that I can only create work at a prototype level and not at an actual production level, Arduino debugging brings me the same frustrations as I have with working with backend development, a million potential reasons for why a singular error shows up. That being said I know deep inside that being capable with Arduino and physical computing will be beneficial for me, especially with the way I skirted around it in undergrad.

Project Brief:

For my IoT project I'm going to be exploring using Arduino + potentiometers to control three.js primitives. Sort of like a physical gui for changing the shape and perhaps dimensions of the primitives. To be fair the Arduino / serial communication component is quite similar to the Serial communication we did in class and in the labs w/ p5 but instead will be in more general Node.js. This prototyping is definitely more focused on the logistics, seeing how fast / much data can be sent over node when connected etc and lag more so than an exploration about innovative ways to combine Arduino + web.

A quick demo of potentiometer data interacting with vanilla JS via Node.js instead of p5.js via p5 Serial libraries.

For now I'm working with just a potentiometer but I'd like to eventually add some push buttons so that we can change the geometries and meshes that we're working with.

Three.js sketch that has particles movement and cube vertices that are dynamically changed via potentiometer data.

Three.js point cloud geometry switches between geometries via push button and changes scale based off potentiometer data.

Tools/Technologies:
  • Arduino Nano 33 IoT
  • Wires
  • Transistors
  • Potentiometer
  • Node.js
  • Websocket
  • NPM
  • Three.js

Process:

I started by malding for a while not understanding Serial.write vs Serial.println for a while not realizing Serial.write was sending byte data. Interestingly enough when googling about Serial monitors reading backward question marks and gibberish the stack-overflow answers that pop up don't immediately tell you that it's just byte data. It felt like searching on webMD all over again with all roads leading to you have a terminal illness, all roads on stackoverflow lead to broken Arduino or a more serious issue.

I struggled with making the P5.Serial libraries work correctly even while doing my utmost to follow along in class, the sketch just didn't seem to run even though I thought I had followed all the correct steps. Stumped and somewhat disinterested in re-watching the 2hr class and trying to catch mistakes I may have made, in addition to my general preference for Three.js / vanilla js over P5, I instead looked into Node.js and websockets for serial communication. So far using the potentiometer data for changing the geometries works somewhat well, it does give a rather tactile sense that otherwise wouldn't exist.

Afterthoughts:

I'm not entirely convinced that the tactile feeling is worth it's weight in this case, literally, the extra baggage of an Arduino controller seems very inefficient to be honest not necessarily the best way to precisely size things in 3D space. A natural progression in my head would be eventually  use Leap Motion or the Stereo IR 170 and to use hand tracking for scaling the 3D models, and then from there eventually move to machine learning and webcam hand tracking as to fully remove the physical part. Full disclosure of course what I'm doing is far from novel and far from even functionally efficient, however due to the nature of the assignment and the resources I have available to me, truly for the sake of having something for the assignment this is all I can do at this moment. For my own sake/artistry/creative side I do want to continue this blog post in  talking about more novel IoT ideas that I would love to explore potentially with a longer lens over the course of the program for a final project, with which I'm unable to really explore at the moment or unable to really prototype to any effective level at the moment.

Further developments: