Morse Code Twitter Answering Machine

Quick demo of functionality Vlog is a’coming


Like my last project, my intention was to make a project that would leverage my magnetic implants, but as an output instead of an input. I took the elementary idea of converting text into electromagnetic fields resembling Morse code, and made it cool™ by hooking it up to the Twitter API.

It developed into a de-facto answering machine that outputs morse code either through a buzzer or an electromagnet, the speed of the playback can be manipulated by a dial, and there is also a button to initiate playback or trigger an API request (a minutely occurance anyway), as well as an LED to indicate the current state of the machine.

The light shows blue when there are no messages, red when there are messages to play, flashes pink when it’s making an API request, and shows pink when it’s handling the API request and during playback. The LED will turn off if the toggle is not switched to either output, but will show for API requests throughout.

Circuit diagram

I used an ESP2866 chip mounted on an Adafruit Huzzah breakout board for the microcontroller in order to have simple WiFi access alongside the ease of Arduino firmware. I went through several iterations of the circuit layout and had to compromise some features due to lack of I/O (I thought it was important for the microcontroller to be aware of the toggle switch’s state instead of just electronically guiding the output to have an ‘off state’, but it was at the expense of the green LED).

Breadboard mockup

I soldered the chip and resistors onto perma proto board, attaching the components to loose wires so I could mount them onto the enclosure more easily.

Perfboard layout

To get the data from Twitter I set up a node.js app on Glitch which grabs mentions of a particular username since a particular point in time (by way of a specific ‘since’ tweet ID). I had a lot of trouble dealing with the datastructures to parse the Twitter json on the microcontroller side so elected instead to do that on the node side of things.

Final Piece Final Piece Final Piece

It looks pretty awesome. I did design the enclosure to fit a battery pack but the machine wouldn’t work with 3 AAs, I’m waiting on a Lithium battery to solve that. For now a serial cable is adequate.

Magnetic Drawing Machine

Vlog of midterm project


The aim of this project was make serendipidous art by visualising disturbances to the magnetic field. I decided to use this method of input because I have magnets in my fingers, thereby creating a 3D drawing program that I can use with just my hands.

As well as the magnetometer I included a button to trigger/disable the drawing mechanism, and a light to indicate whether it was active or not.

Breadboard mockup

I used a piece of perfboard to make a shield for the Arduino, using wires on the back of the board to solder the components in and headpins to attach it to the Arduino.

Soldering Shield

I laser cut a custom enclosure for the piece using black and live-edge yellow acrylic, with holes for the USB port, button, LED, and an engraved cross to indicate the centre of the sensor. The enclosure slots on top of the electronics and sits flat on a table, eliminating the need for a backing.

To send the information from the sensor and button to the visualisation program I used JSON-encoded serial data. I used a node.js server to pick up and decode the data, sending it through websockets to a client-side javascript canvas renderer. buzzwords.

Each drawing normalises the magnetic field and starts in the middle of the screen. It chooses 2-5 colours from an array of pretty hues, and interpolates between them (with the help of chroma) using the Z-axis of the magnetometer. The Z-axis also determines the width of the path being drawn. The X and Y axes correspond to the X and Y of the screen (with the help of victor). To smooth drawing of the shapes I set a constant speed for the particle and directed it towards the target position.

I’m really happy with how the imagery came out. The device is quite frustrating in that it’s hard to control the final output - especially with the interference of the magnet’s polarity - but there is a very clear cause and effect.

Images