Networked Thermostat: Adventures in IoT

For our final project in Connected Devices, we were tasked with creating an IoT Thermostat that had a physical UI and temperature sensor built in.

This was achieved using Node and an i2c ADC on a Raspberry Pi W. This was done with lots of amazing example code from Tom Igoe, a few repos in particular:

https://github.com/tigoe/NodeExamples
https://github.com/tigoe/NodeSensorExamples
https://github.com/tigoe/MakingThingsTalk2

Our challenge was to have a device that would post the current temperature to a web server for a week. The twist being that we were going to be under attack by a red team trying to hack our devices.

Continue reading “Networked Thermostat: Adventures in IoT”

Connected Devices Homework 2

I’ve been working a lot with MIDI lately, doing many little experiments with WebMIDI.js. Our homework for this week was to make a web interface to interact with an existing IoT lighting device, so I decided to leverage my experience and make a mashup.

Here is the MIDI Phillips Hue control:

And another after the break:

Continue reading “Connected Devices Homework 2”

Connected Devices Homework 1

Our first assignment in Connected Devices was to make a basic web server with node.js and express.js, with three end points.

I had originally tried to make this a musical project, where different musical sequences played on the server. The *music* part did not pan out (a fight for another day!) But the node server with endpoints exists.

One GET request gets the main webpage: /index.html
Another GET will tell the user the current sequence: /currentSequence
And a POST method via webpage sets the sequence: /readform

All of the functionality is pretty basic right now, but I’m hoping this can be the template for something more complicated in the future.

Here is the code currently:

Continue reading “Connected Devices Homework 1”

100 Days of Making: Creative Coding Communication Protocols

Excited to start my 100 Days of Making class. I’ve decided to do 100 days of creative coding communications protocols: things like MIDI, OSC, TCP/UDP, DMX, etc. that will be used in basic creative coding sketches. I’m hoping to make small sketches that can serve as small recipes or building blocks for using these protocols in creative coding exercises.

There are a few ways I’m looking at this.

 

One: Exploring how one messaging approach could be used in different creative coding approaches. Example: a MIDI “Note On” message could be used to change the color of a Processing Sketch, but also add circles to the screen, or scoot a box across a window, and so on.

Two: Exploring the protocols themselves. Not only is there a MIDI “Note On” message, but a “Note Off”, and a “Pitch”, and a “Velocity” message. Each aspect of a communications protocol can be utilized in different ways.

Three: Exploring different applications and devices communicating with each other. Ableton Live is a music program and can send and receive MIDI messages. Processing is a Java based creative coding library and IDE. I can send and receive from both, but there might be other programs, libraries, or languages I might want to use. Max MSP, Javascript, Lemur iOS/Android app, openFrameworks, Pure Data, and so on.

Four: Variations of all of the above. I might want to use hardware and software. I might have one application speaking to another, and a third speaking to the second, in a chain type organization. I might imagine a scenario where I want to send messages from a physical button using MIDI, to Max MSP, which sends OSC messages to devices on a network running a p5 sketch. Multiple devices and multiple applications in multiple permutations of sending, receiving, translating and displaying are possible.

 

I’m thinking of each of these potential approaches can yield unique attempts at a single day’s practice. In a way, I think it might be a little broad but I’m sure as time goes on I’ll find certain aspects more appealing and then dive deeper in that direction. (I’d also prefer to start out a little broad as opposed to realize at day 20 that I have nowhere else to go…)

 

We were asked to use Instagram as our delivery method. As such, I decided to start a new Instagram account for my projects and professional work. You can find it here:

https://www.instagram.com/dominicb_itp/

And I’ll be posting under the hashtag #100days_ITP along with my colleagues.

I won’t be posting here on this blog daily, but intermittently I hope to be offering updates, thoughts and notes on my process. I think that using these communication and control protocols can be very useful in a creative coding practice, and can very much spice up what might otherwise be a run of the mill program or sketch. Specifically, live control of parameters by a performer can very much enhance a piece.

With this in mind, I’m hoping to relay some practical information about how to setup these things step by step. I’ll post these things here, as a resource for my coding colleagues. Blog posting these may be haphazard, but I’m hoping by the end of the course I can compile them into something more edited and cohesive. In the meantime, perhaps the individual tidbits of knowledge can serve as useful links for other people.

Example: want to use MIDI on macOS for a project? You will likely want to enable what is called the “IAC Driver”. Open the “Audio MIDI Setup” application, and go to Window>Show MIDI Studio. Double click the IAC Driver icon, and a window will pop up. “Device is Online” is unchecked by default. Check it to enable, and you will be able to use MIDI buses for your programs.

 

Excited to start my 100 days!