Physcial Computing Blog

Week 7 - Serial Communication

I had skimmed the surface of this week's material before, when I was helping another student figure out how to connect her slider to her p5 sketch. But I spent a little extra time fiddling around with the bare bones of serial communication. I noticed when I tried to read the serial data directly with a node script and logged it to the console it would get printed as a buffer object, no matter which parser I used I only received buffer objects. I'm still a little confused as to why this is happening.

But the p5.webserial library is extremely useful and makes the whole process a lot easier. A serial communication can be set up and be ready to go in seconds. I just wish my input were a little less noisy, I had the idea of controlling a dot with a potentiometer.

And using the serial communication the other way around was as easy. These basic building blocks can really spark the imagination.

Nima Niazi