Joao Wilbert
How to Make (almost) Anything 2019

Thin Film Microphone


For the interfacec I programmed a openFrameworks appliccation that reads the values from serial and plots them in real time. This allowed me to create a real time visualization of the waveform. I did some work with Eyal to port the workflow for serial bit banging from Python to openframeworks.

The idea is to use is to count 1,2,3,4 bytes and read the next one and unpackc the value via bitwise operations.This is how we send the bytes from Arduino.

Here is how we unpack the bytes in openframeworks, I then use the valueSerial to update my waveform visualization. In this code we are counting for bytes that are respectively 1,2,3,4 and then after loccking them as a signature we then read 2 bytes into a char array that represent the integer of the value sent by SAMD11.

With the technique above we were able to receive an incredible fast signal and visualize it, what you see is the waveform of th mmicrophone in real time. The serial port of the SAMD11 is streaming data at 1152000 and being read into openframeworks at the same rate.

An issue I have been experiencing is that the serial locks after 5 minutes running, I suspect the microcontroller is running out of memory and loccking the port, I will do some experiments and see if I can get it fixed, worst case scenario I will need to restart it every 5 minutes