Arduino and processing

Hi,

Im starting with arduino, I know something about processing but arduino is not the same. ¿There is no way for using processing managing arduino? and if not ¿How do I manage to draw a graphic representation of the data arduino gets? ¿There is a way to use arduino with other languages?

There are a couple of ways to get Processing to control the Arduino. There is a library called Firmata that can be installed. Then, load a (hte?) firmata sketch on the Arduino, and run everything from the Processing sketch. This turns the Arduino into a dumb device.

The other way, and better in my opinion, is to send commands to the serial port that the Arduino is connected to, and program the Arduino to listen to, and respond accordingly, to commands sent to the serial port by Processing.

Do you use the word dumb in the sense of mute or stupid? What kind of problems we will have using firmata?

I dont understand well the second option. When you said to program arduino. Arduino don't have any hard disk to remember any configuration when you disconnect it, so any programation will be in the processing program. Isn't it? So I see the second option equal to the first, or I have a misconception here.

The way the Arduino works is that you write a program for it, called a sketch, and then upload this sketch to the Arduino board, via the USB port on your host computer. Once loaded on the Arduino, your sketch is run every time the Arduino is reset. (It is saved in the Arduino.)

The sketch can communicate with the host computer using serial port commands over the USB connection. So, an Arduino sketch can be receiving and transmitting data (anything you want) from and back to the host computer. Conversely, a Processing sketch (or any other program running on the host computer) can be receiving/sending data to the Arduino sketch over the USB connection.

Firmata is one program that can be installed on the Arduino (without you having to write a program) that runs and does that serial port reading/writing for you. In that sense, it is "dumb," since it doesn't do anything but the serial communications.

I use the term dump as in moronic. The Arduino is a microprocessor. With Firmata installed, the microprocessor no longer needs to think. All the decision making is done by Processing. All the Arduino does is provide the physical interface to the sensors.

The Arduino sketch is stored in non-volatile memory. The sketch is "remembered" when the power is turned off and back on. If you program it turn an LED on and off every 3 seconds, then remove the power, the LED stops flashing. Reapply power, and the LED resumes flashing.

The second option is not the same as the first option. The Arduino continues to make decisions based on sensor input.

Suppose you design an Arduino-based CNC machine. You would want to provide the instructions to move to specific locations from an external source. Stopping when you hit a limit switch is not something the Processing application should have to deal with. The Arduino should stop, and send a message to the Processing application saying that it stopped.