November 7, 2018Electronics Arduino
This isn’t a particularly labour intensive tutorial, the hardest bit, the programming has already been done for us. Once we put it together and see the results, the fun will come in tweaking and playing with the code to see what other results we can achieve! Before we get started, here’s a little about the platforms we’re going to be using. Arduino is an open source electronic platform that makes it super easy to interact with buttons, switches, and many types of input and output. Using the Arduino programming language you can tell an Arduino precisely what to do with given input. Processing is a software sketchbook and programming language designed around learning to code and programming in the context of visual arts. We can use the Processing language to draw on our computer screen based on information gathered from the Arduino! Both Arduino and Processing use the word sketch to describe the file with the written code, so we will be using two “sketches” in this tutorial, one for the Arduino, and one for Processing.
First comes the preparation. You’re going to need to collect and install some software. I’m using a Mac, but Windows and even Linux versions of the same apps exist from the appropriate developers! Also, I’ve used the word “need” for software, but I’m sure that this is an overstatement, you don’t actually need the Arduino IDE to program an Arduino, but it’s a great tool for the job. So, gather into your possession the Arduino IDE, the Processing application, the firmata sketch for Arduino (This is included with the official IDE), and the Werkstatt Monitor sketch for Processing. You will also need some hardware for this project, namely a Moog Werkstatt, an Arduino/Genuino board, some wires, and an optional breadboard.
The Wiring for this project will be fairly simple. We are sending some signals from the Werkstatt, into the Arduino where they will be processed and passed along to Processing, and finally, from Processing to our computer screen. I always prefer to set up the hardware first, possibly because I find it easier, but as long as everything is in place at the end, your order of operations should not matter too greatly. From the Arduino, connect EG Out to A0, LFO Out to A1, VCF Out to A2, and VCO Out to A3, and connect a grounding post on the Werkstatt to GND. It could be interesting to use a breadboard to integrate other circuits into this setup. I would simply route the Ground wire through the breadboard rails and build whatever kind of circuit I wanted to additionally play with. Take a look at Werkstatt Workshop for some great ideas!
Now for some software. Presumably you’ve installed the applications downloaded earlier, so now connect the Arduino to your computer using an appropriate USB cable and launch the Arduino IDE. The StandardFirmata sketch is bundled by default in the File→Examples→Firmata menu. It requires no changes or additions, so simply upload it to your Arduino. Next we’re going to load the Processing sketch I linked to. This sketch has been around for quite a while I think. It’s definitely from before Processing 3, but I believe it works without modification. You will want to check to see if Processing has the Arduino(Firmata) library installed, it probably doesn’t. Look under Sketch→Import Library…→Add Library. Use the filter to find the Library in question and install it if needed. Finally, Run the Processing sketch!
That’s it, you’re done! Power on your Werkstatt and watch the waves glide across the screen. I strongly suggest playing with the processing code to see what happens. Can you increase the resolution? Can you add a monitor for one of the other outputs? Change colours or sizes, maybe dig in to the sketches and see if you can use the information for something other than this pseudo-cilloscope!
Thanks primarily to Christopher Michaud for their work, I can’t seem to find a direct link on their webpage to the resources I used anymore, but it’s definitely where the project originates for me.
Here’s the thing up and running!