Skip navigation

Category Archives: Processing

This is where all the work is done to read an interpret the values from the servo and the sensor. If the readings are to erratic then you won’t have nice shapes. Also if you don’t allow enough time to the signals to be sent back then you’ll get false distance readings. So this code is only as good as your Arduino code and sensor setup.

Took me a few evenings to work this out to get it how I wanted, the hardest bit is the trigonometry involved which isn’t that difficult, everything else is done by loops and a few IF statements. I use the FOR loops alot because the all the elements can be displayed programmatically without having to write each rectangle, cirle and line to the screen with their own statement.

Arduino + Processing: Make a Radar Screen to Visualise Sensor Data from SRF-05 – Part 2: Visualising the Data

First things first, we need to build our circuit. This is the easy bit! We’ll be using the Arduino to control a servo that will rotate our sensor around 180 degrees. The Arduino will then send the value from the sensor along with the current angle of the servo to the serial port.

Before proceeding please take a moment to check out some of my other work with the SRF-05 and servos if you’re unfamiliar with either.
Stuff with SRF-05
Stuff with Servos

I’m building this with the SRF-05 ultrasound range finder, but because this has a fairly wide field of detection it’s not very precise – I think I’ll end up trying a different range finder maybe an IR one as the SRF-05 works best as a static sensor/ detector, anyway…

Arduino + Processing: Make a Radar Screen to Visualise Sensor Data from SRF-05 – Part 1: Setting up the Circuit and Outputting Values

My last theremin involved a small speaker. Now I’ve replaced the speaker with my PC, using processing to pick up the values from the SRF05 ultrasound sonar thingy and play different notes accordingly – which gives multiple possibilities and far better sounds.

So to start with check out my previous theremin, the circuit is the same except for removing the speaker and the Arduino code now prints values to the serial port instead of outputing directly to a speaker. The only thing that I’m doing here that is really new is using the minim libary for processing, built by this chap (thankyou). What this allows us is to assign a sound file to a variable in processing and then gives us functions to start/stop the sound.

Arduino: Basic Theremin meets Processing!

I’ve started to delve into Processing and passing values between Processing and Arduino. If you’re wondering what Processing is, basically its an open source programming language for vizualising data that can interface with Arduino either by reading values/ pins or by setting them. Just remember that they are 2 very different things and require 2 different sketches!

This is very cool if you want to display information from Arduino in a graphical way, or if you want to have a physical input device for your computer, for instance a Flash application that takes inputs from switches and potentiometers.

Arduino + Processing: Getting values from SRF05 ultrasound sensor & serial port

Follow

Get every new post delivered to your Inbox.