Poorman's oscilloscope (with Arduino + Processing)

The poorman's oscilloscope in action

This software allows you to get a visual representation of an analog signal using Arduino and Processing. The resolution is 10 bits, which is good, but the frequency is a lot lower than that of a real oscilloscope but it is still pretty useful.

It works by sending values read from the Arduino board (pin 0) to Processing through serial communication.

Note: This simple idea inspired a more powerful software which we strongly recommend if you need to read several outputs at once: the Arduinoscope.

Nice! This project has been referenced in the book Practical Arduino by Jonathan Oxer and Hugh Blemings.

Ingredients

Instructions

  1. Upload the Arduino code to your board (the code is included at the end of the .pde in attachment to this post)
  2. Preferably close the Arduino program (I think it can cause interferences during serial reading)
  3. Run the Processing code

Scope anything you want

Sometimes, you don't want to just scope the analog input: you want to scope a modified version of it, for instance. In that case, you can use include the oscilloscope.h file and send any value you want to the Processing program by using the writeOscilloscope(int) function.

Fichier attachéTaille
Oscilloscope.pde1.88 Ko
oscilloscope.h2.92 Ko

Répondre

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.