Pages: [1]   Go Down
Author Topic: Learning to use Processing with Windows 7  (Read 298 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Faraday Member
**
Karma: 100
Posts: 6090
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am an experienced arduino user but have absolutely no experience (or knowledge of) Processing.
I just downloaded the windows version here.
http://processing.org/
 
and tried to follow these instructions:
Quote
Unzip the library and copy the "arduino" folder into the "libraries" sub-folder of your Processing Sketchbook. (You can find the location of your Sketchbook by opening the Processing Preferences. If you haven't made a "libraries" sub-folder, create one.)
Run Arduino, open the Examples > Firmata > StandardFirmata sketch, and upload it to the Arduino board. 

from here:
http://playground.arduino.cc/interfacing/processing   

I was unable to follow THIS instruction:
Quote
Run Arduino, open the Examples > Firmata > StandardFirmata sketch, and upload it to the Arduino board.   
because there is no "Firmata" in any Examples menu that I can find.
In fact, I can't find "Firmata " anywhere.
I found this page but can't find
I googled it and found this:
http://firmata.org/wiki/Main_Page   


but can't find any instructions on how to use it.
At this point I don't know if I need something else.
I unzipped the Firmata archive and copied the "arduino " folder into my C:\My Documents\Arduino\Libraries" folder and it created
a bunch of folders there but there was nothing like a Readme file so I have no idea how to get it working.
I would appreciate some help figuring out how to use Processing.
Logged

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,
DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 71
Posts: 2601
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I now little about Processing or Firmata but the Arduino examples are present in 1.0.5 (See attached image)


* Clipboard-1.jpg (106.91 KB, 618x1000 - viewed 16 times.)
Logged


Offline Offline
Faraday Member
**
Karma: 100
Posts: 6090
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I found out why I couldn't find "Firmata " in the menu. The arduino IDE displays the user installed libraries on the drop down menu before the IDE Examples so because I had so many folders the menu was too long to fit on the screen. I moved all MY libraries to a different HD.,
closed the IDE and reopened it and "Firmata" appears on the menu exactly where it was in your screenshot.

I figured out the problem.
I was confusing this:
 http://playground.arduino.cc/interfacing/processing
which is only the link for the Processing Library, with this:
https://processing.org/download/?processing  
Which is the link to download the Processing Application.

The confusion comes from the fact that there is no top level instruction on any page that states
step-1: download Processing from here:
https://processing.org/download/?processing  
(Unzip it into the "Arduino "folder in C:\My Documents.
step-2: Download and install the Processing Library from here:
http://playground.arduino.cc/interfacing/processing  

This is as far as I got. I was able to download and install Processing and open the app but have not been able to get it to work yet.

I think the problem has something to do with these lines:
Code:
  String portName = Serial.list()[0];
  myPort = new Serial(this, portName, 9600);

I know the arduino is on COM3 but I don't know how to tell Processing that.
Basically, I can open the Processing  Application but that's about it. I can't figure out how to use it.
Also, I can load the StandardFirmata arduino sketch.

Also I seem to be having conflicts between the Processing and IDE with the COM port. (If one is running , I can't run the other).


* PROCESSING.png (458.96 KB, 1920x1080 - viewed 10 times.)
« Last Edit: August 24, 2014, 04:55:12 pm by raschemmel » Logged

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,
DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 71
Posts: 2601
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Below is an except from one of my processing sketches that shows how I open the serial port to the arduino.
println(Serial.list()); lists the available comm ports and I see from viewing that list the first entry in the list was my arduino comm port so to open that port I used arduinoSerial = new Serial(this, Serial.list()[0], 115200);.
I'm not sure if I could use the port name like this arduinoSerial = new Serial(this, "com3", 115200);.


Code:
import processing.serial.*;
Serial arduinoSerial;                                       // The serial port

void setup() {
  boolean haveScanner = false;                              // Assume no Scanner attached
  println(Serial.list());                                   // List all the available serial ports
  arduinoSerial = new Serial(this, Serial.list()[0], 115200);// Open the port you are using at the rate you want:
  arduinoSerial.clear();                                    // Flush serial buffers
Logged


Pages: [1]   Go Up
Jump to: