We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpElectronics,  Serial Library › firmata processing "arduini_input" example
Page Index Toggle Pages: 1
firmata processing "arduini_input" example (Read 2290 times)
firmata processing "arduini_input" example
Dec 27th, 2009, 9:48am
 
I'm trying to get the processing example "arduino_input" working. Some background on my question and research so far.

I'm using an Arduino Duemilanove 328 with 0017 ide and a danger shield for some i/o - pots, leds buttons...

with arduino I can write some code to read a button or blink an led and it works.

I'm particularly interested in interfacing the arduino to other languages. firmata seems like just the ticket. As I understand it I can load firmata in the arduino and then leave the arduino alone.

Then programing in processing or openFrameworks (c++) [and other languages] I can write code with libraries developed for those languages to read or write analog and digital states - without changing the code loaded into the arduino - just use firmata.

In arduino I installed the examples->Firmata->StandardFirmata from the 0017 ide.

In processing v. 1.0.9 I ran three examples found in Processing Library: processing-arduino-0017 dot zip (Updated 22 Sept. 2009)

arduino_input     does not work
arduino_output   works
arduino_pwm      works

I was having some trouble with the c++ openFrameworks so thought I would try the Processing with firmata. After obtaining the results from the three tests above I started searching with google and found a couple threads indicating that there is a problem with the StandardFirmata included with 0017.

Found this thread with some good info:
(can't post urls in my current user status) on arduino site with forum topic 1252791964

which mentioned

(this link is mentioned in above) firmata 2.1b7  The firmata here didn't fix my processing arduino_input program problem. BUT it did FIX a big problem in openFrameworks!  The processing arduino_input program still doesn't appear to be working.

Any suggestion on the processing arduino_input program problem?

and/or could someone post a simple processing program for proof of concept that would indicate the state of D7 on the arduino?

Thanks - jeffa

note: Sorry about the wird url stuff. I don't know how to include them at my current user level. I tried enclosing them in code blocks etc....
Re: firmata processing "arduini_input" example
Reply #1 - Jan 10th, 2010, 8:46pm
 
I had the same issue.

Tested using 3 Firmata's versions:
1) original Firmata from 017 of Arduino Wiring IDE
2) Firmata from Pduino website
3) Firmata from Sourceforge CVS

I hooked up one CdS sensor to Analog 0 during my testing.

Firmata #1 => arduino_input seems to be not working. Circles remain constant (very small size) even with an LED on the CdS sensor.

Firmata #2 => it seems to be working! Size of the circles vary in relation to the amount of available light.
Firmata #3 => same result as Firmata #2!

The arduino_input works for me using StandardFirmata from #2 and #3. So I suggest you download the Firmata from Pduino (easiest option, since the site provides a ZIP file already) or from Sourceforge.

Hope this helps you. If it doesn't kindly verify your schematics, you might have botched up a wire (happens to even the best).
Re: firmata processing "arduini_input" example
Reply #2 - Jan 10th, 2010, 9:41pm
 
I believe the version of Firmata included in Arduino 0017 has a bug that prevents the analog inputs from working.  This will be fixed in Arduino 0018 (which is currently in release candidate testing).
Re: firmata processing "arduini_input" example
Reply #3 - Jan 10th, 2010, 11:56pm
 
Yes it has and I see the modifications that fixed the issue in the Firmata that I am using.

What I am saying is, people can use the AnalogIn if they replace the Firmata that came with 017. No need to wait until 018 is released.
Page Index Toggle Pages: 1