firefly

Open full view…

Error uploading Firmata in Arduino

Tiffany Attali
Sun, 22 Nov 2015 14:14:23 GMT

Hi, I download the latest version of Firefly, I'm using Rhino 5 on Win8. When I'm trying to upload the code on the Arduino I get this error message : C:\Users\tiffany\Documents\Arduino\Firefly_Firmata\Firefly_Firmata.ino : In function 'void WriteToPin(int, int, Servo)': Firefly_Firmata:210: error: 'WriteToDAC' was not declared in this scope WriteToDAC(_pin, _value); ^ exit status 1 'WriteToDAC' was not declared in this scope I don't know what to do, if anybody has a solution for me I'll be extremely grateful. Thank you

14004966
Thu, 26 Nov 2015 00:40:35 GMT

Just fixed this exact problem. I un-installed latest IDE and reinstalled the earlier version 1.0.3 found at: https://www.arduino.cc/en/Main/OldSoftwareReleases#1.0.x in that version the firmata code verified and uploaded fine.

leehuang
Wed, 27 Jan 2016 23:16:37 GMT

Rolling back to Arduino IDE 1.6.5 woked for me, as well as several others. We all had the same problem when trying to upload the firmata with 1.6.7.

Andy Payne
Mon, 14 Mar 2016 15:31:34 GMT

Hi Everyone, My apologies for the delay here. So the issue you were running into was because there is a function called "WriteToDAC" which wasn't being declared based on the new board designations (like the Arduino Genuino). Anyway, it's a pretty easy fix. If you scroll down to the end of the Firefly Firmata, you'll find the WriteToDAC function. In the line above this, you see an #if defined line and the closing #end if is shown after the WriteToDAC function. Basically these two lines need to move inside the WriteToDAC function. So, the last part of the Firmata should look like this: void WriteToDAC(int _pin, int _value){ #if defined(__SAM3X8E__) if(_pin == 0) analogWrite(DAC0, _value); else if (_pin == 1) analogWrite(DAC1, _value); #endif } I'll make sure that in the next release of Firefly that this is corrected so you wont have to make this change manually.

richlove
Wed, 10 Jan 2018 22:36:30 GMT

i changed the last part to this and it uploaded fine on v1.6.9 void WriteToDAC(int _pin, int _value){ #if defined(__SAM3X8E__) if(_pin == 0) analogWrite(DAC0, _value); else if (_pin == 1) analogWrite(DAC1, _value); #endif }