boarduino + firmata

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
bobulisk
 
Posts: 84
Joined: Tue Nov 02, 2010 7:29 am

boarduino + firmata

Post by bobulisk »

I am having trouble using my boarduino with the arduino firmata library - every time it needs to communicate something, no reading is shown. I have uploaded the standard_firmata that is included with arduino but consistently see analog readings of zero. The boarduino works fine - when I use arduino's serial monitor readings are displayed.

Could the problem be with using a miniusb on the boarduino vs. serial in processing? Here's the code I've tried:

Code: Select all

import processing.serial.*;
import cc.arduino.*;

Arduino arduino;
int ledPin = 13;

void setup()
{
  //println(Arduino.list());
  arduino = new Arduino(this, Arduino.list()[0], 57600);
  arduino.pinMode(ledPin, Arduino.OUTPUT);
}

void draw()
{
  arduino.digitalWrite(ledPin, Arduino.HIGH);
  delay(1000);
  arduino.digitalWrite(ledPin, Arduino.LOW);
  delay(1000);
}

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: boarduino + firmata

Post by adafruit_support_bill »

It should work just like a Duemilanove. Does your sketch work with a standard Arduino?
...consistently see analog readings of zero.
The sketch you posted only does digitalWrites. Do those work?

bobulisk
 
Posts: 84
Joined: Tue Nov 02, 2010 7:29 am

Re: boarduino + firmata

Post by bobulisk »

I've tried using only analog reads - I only get zero. I'm using a joystick that shows readings on the arduino serial monitor but not in this program:

Code: Select all

import processing.serial.*;
import cc.arduino.*;

Arduino arduino; 

void setup() {
  arduino = new Arduino(this, Arduino.list()[0], 57600);
}

void draw() {
  println(arduino.analogRead(0));
}
I've also tried it with my uno - it works perfectly.

bobulisk
 
Posts: 84
Joined: Tue Nov 02, 2010 7:29 am

Re: boarduino + firmata

Post by bobulisk »

Even if I just plug in the uno with nothing connected, processing prints bogus numbers - but not zero. The boarduino only displays readings of zero, like no arduino is connected at all.

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: boarduino + firmata

Post by adafruit_support_bill »

The Boarduino is probably getting assigned a different COM port than the UNO. Are you connecting to the right one?

bobulisk
 
Posts: 84
Joined: Tue Nov 02, 2010 7:29 am

Re: boarduino + firmata

Post by bobulisk »

I'm using a macbook air - here are the com ports with the boarduino:

[0] "/dev/tty.usbserial-AE015GI5"
[1] "/dev/cu.usbserial-AE015GI5"
[2] "/dev/tty.Bluetooth-PDA-Sync"
[3] "/dev/cu.Bluetooth-PDA-Sync"
[4] "/dev/tty.Bluetooth-Modem"
[5] "/dev/cu.Bluetooth-Modem"

Now with the uno:

[0] "/dev/tty.usbmodem411"
[1] "/dev/cu.usbmodem411"
[2] "/dev/tty.Bluetooth-PDA-Sync"
[3] "/dev/cu.Bluetooth-PDA-Sync"
[4] "/dev/tty.Bluetooth-Modem"
[5] "/dev/cu.Bluetooth-Modem"

I've set the arduino as port 0 for both.

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: boarduino + firmata

Post by adafruit_support_bill »

What version of the Arduino IDE are you using?
You might try uploading the "OldStandardFirmata", since the Boarduino is equivalent to the older Duemilanove.
You might also try posting over at Arduino.cc. We don't get many Firmata questions here and are not experts in its use.

bobulisk
 
Posts: 84
Joined: Tue Nov 02, 2010 7:29 am

Re: boarduino + firmata

Post by bobulisk »

I'm currently using 0022.

bobulisk
 
Posts: 84
Joined: Tue Nov 02, 2010 7:29 am

Re: boarduino + firmata

Post by bobulisk »

I stopped using firmata and switched to sending the data in one long string (and separating variables with commas). This sorted out my problems but it would have been nice if firmata worked (so much easier!). Still, the boarduino is great and thank you for the excellent customer support.

bobulisk
 
Posts: 84
Joined: Tue Nov 02, 2010 7:29 am

Re: boarduino + firmata

Post by bobulisk »

Now that I've done this, I am having trouble reading and writing serial data - is there a way to send and receive serial data?

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: boarduino + firmata

Post by adafruit_support_bill »

Yes, that is possible. Check the examples in "File->Examples->Communication".

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”