Reply to comment

user warning: Unknown column 'i18n.language' in 'where clause' query: SELECT DISTINCT b.* FROM blocks b LEFT JOIN blocks_roles r ON b.module = r.module AND b.delta = r.delta LEFT JOIN i18n_blocks i18n ON (b.module = i18n.module AND b.delta = i18n.delta) WHERE (i18n.language ='en' OR i18n.language ='' OR i18n.language IS NULL) AND ( b.theme = 'garland' AND b.status = 1 AND (r.rid IN (1) OR r.rid IS NULL) )ORDER BY b.region, b.weight, b.module in /var/alternc/html/o/orangeseeds/usr/drupal-6/modules/block/block.module on line 456.

Poorman's oscilloscope (with Arduino + Processing)

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
  4. The program "with zoom" (below) gives the extra option of "zooming" using the "+" and "-" keys

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.

AttachmentSize
Original Processing code1.88 KB
Arduino code as an include file2.92 KB
Processing code with zoom option2.64 KB

Reply

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.