boarduino + firmata

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

Moderators: adafruit_support_bill, adafruit

boarduino + firmata

Postby bobulisk » Tue May 01, 2012 3:43 pm

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);
}
bobulisk
 
Posts: 82
Joined: Tue Nov 02, 2010 6:29 am

Re: boarduino + firmata

Postby adafruit_support_bill » Tue May 01, 2012 3:54 pm

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?
User avatar
adafruit_support_bill
 
Posts: 16023
Joined: Sat Feb 07, 2009 9:11 am

Re: boarduino + firmata

Postby bobulisk » Tue May 01, 2012 4:05 pm

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: 82
Joined: Tue Nov 02, 2010 6:29 am

Re: boarduino + firmata

Postby bobulisk » Tue May 01, 2012 4:26 pm

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.
bobulisk
 
Posts: 82
Joined: Tue Nov 02, 2010 6:29 am

Re: boarduino + firmata

Postby adafruit_support_bill » Tue May 01, 2012 4:43 pm

The Boarduino is probably getting assigned a different COM port than the UNO. Are you connecting to the right one?
User avatar
adafruit_support_bill
 
Posts: 16023
Joined: Sat Feb 07, 2009 9:11 am

Re: boarduino + firmata

Postby bobulisk » Tue May 01, 2012 4:46 pm

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.
bobulisk
 
Posts: 82
Joined: Tue Nov 02, 2010 6:29 am

Re: boarduino + firmata

Postby adafruit_support_bill » Tue May 01, 2012 6:11 pm

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.
User avatar
adafruit_support_bill
 
Posts: 16023
Joined: Sat Feb 07, 2009 9:11 am

Re: boarduino + firmata

Postby bobulisk » Tue May 01, 2012 6:26 pm

I'm currently using 0022.
bobulisk
 
Posts: 82
Joined: Tue Nov 02, 2010 6:29 am

Re: boarduino + firmata

Postby bobulisk » Tue May 01, 2012 9:07 pm

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: 82
Joined: Tue Nov 02, 2010 6:29 am

Re: boarduino + firmata

Postby bobulisk » Wed May 02, 2012 9:15 am

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?
bobulisk
 
Posts: 82
Joined: Tue Nov 02, 2010 6:29 am

Re: boarduino + firmata

Postby adafruit_support_bill » Wed May 02, 2012 9:42 am

Yes, that is possible. Check the examples in "File->Examples->Communication".
User avatar
adafruit_support_bill
 
Posts: 16023
Joined: Sat Feb 07, 2009 9:11 am


Return to Arduino

Who is online

Users browsing this forum: No registered users and 15 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [103]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[109]
 
Wireless[14]
Cables[61]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]