Go Down

Topic: problem with Leonardo and firmata (Read 1 time) previous topic - next topic

bryan2

Jun 08, 2013, 02:38 pm Last Edit: Jun 09, 2013, 10:05 am by bryan2 Reason: 1
Hello,

I can't make Firmata test (firmata_test.exe) work with my leonardo board.
I works fine with and Uno, but with the Leonardo, I try picking up any serial port number, but the switch don't appear!
I have updated the library from http://sourceforge.net/projects/firmata/files/Firmata/Firmata_v2.3.5.zip/download . I just copy pasted the files in the arduino folder...but it didn't solve the problem

Thanks for your help

PaulS

What is talking to the Arduino? The Leonardo needs to have DTR enabled to get serial communications to work. I'm guessing that the PC doesn't set that flag.

bryan2

I can do other basic operation (download etc...) with the board.
Thanks for your answer, but I have no idea what DTR is, I can't find relevant info on google  :smiley-fat:

Grumpy_Mike

Has the Firmata sketch got a
Code: [Select]
while ( ! Serial ){ }; in the setup function?

bryan2

Nope

here is it:
Quote

void setup()
{
  Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);

  Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
  Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback);
  Firmata.attach(REPORT_ANALOG, reportAnalogCallback);
  Firmata.attach(REPORT_DIGITAL, reportDigitalCallback);
  Firmata.attach(SET_PIN_MODE, setPinModeCallback);
  Firmata.attach(START_SYSEX, sysexCallback);
  Firmata.attach(SYSTEM_RESET, systemResetCallback);

  Firmata.begin(57600);
  systemResetCallback();  // reset to default config
}


PaulS

Quote
Thanks for your answer, but I have no idea what DTR is, I can't find relevant info on google

The proper ratio of answers to questions is 1.0 or higher. You have not achieved that target.

Grumpy_Mike

Then go to the Leonardo page, read what it says about the serial and then add the line it tells you on that page at the very start of setup. I might have the syntax wrong butit gives you the idea.

bryan2


Quote
Thanks for your answer, but I have no idea what DTR is, I can't find relevant info on google

The proper ratio of answers to questions is 1.0 or higher. You have not achieved that target.

and what about the ratio of your sens of humor?


Then go to the Leonardo page, read what it says about the serial and then add the line it tells you on that page at the very start of setup. I might have the syntax wrong butit gives you the idea.

thanks, I found:
Code: [Select]
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }

I added it but doesn't work better  =(

PaulS

Quote
and what about the ratio of your sens of humor?

I've never found it funny when I ask questions and I don't get answers. I guess I'm just weird that way.

bryan2

if you talk about the question "What is talking to the Arduino?", I answered "I can do other basic operation (download etc...) with the board"
it seems it's not the good answer, I probably miss understood
could you ask again please, and could be more "basic" in your speaking, I am french
thanks

PaulS

Look at your Arduino. There is a USB cable attached to it. The other end goes somewhere. I'm guessing that it does not go to a chicken coop. I'm guessing that it does go to a PC.

I'm guessing that there is some application running on the PC that is trying, and failing, to use the firmata protocol to talk to the Arduino. What I am not able to do is guess what that application is. So, I'm asking you, and you are dancing around not answering that simple question.

sonnyyu

#11
Jun 10, 2013, 02:16 pm Last Edit: Jun 10, 2013, 02:28 pm by sonnyyu Reason: 1
@OP

Have you try this?

Quote
To use firmata with the Arduino Leonardo you must update the firmata library in the Arduino application to firmata version 2.3.2 or greater.


http://firmata.org/wiki/Main_Page

Upgrade Arduino IDE (even could try Beta version), then open the code with the File > Examples > Firmata > StandardFirmata menu, and then upload it to your Leonardo.

http://arduino.cc/en/main/software

bryan2

I done it, Arduino ver 1.5.2 and firmata ver2.3.5

at  PaulS
Sure I am the one who don't want to solve the problem
first, I saw some ardware are found as arduino, but I can't diable them:

also, I tried a software to control the usb connexions,

but I couldn't enable or disable things, even as administrator

thanks for the help

Go Up