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 }

Frank M
Mon, 04 Mar 2019 00:25:58 GMT

Hi Andy. I tried changing the WriteToDAC as you mentioned in your 14 Mar 2016 post. I'm now trying to upload Firefly Firmata using Arduino 1.8.8 to run Firefly on Grasshopper, Rhino 6.0. I'm getting an error message when I move the two lines inside the WriteToDAC function. Do you have any suggestions to correct this, or is there a mistake in how I'm writing this? [Firefly_firmata_WriteToDAC error](//muut.com/u/firefly/s3/:firefly:z0DV:firefly_firmata_writetodacerror.jpg.jpg)

Frank M
Mon, 04 Mar 2019 00:44:11 GMT

actually, when I copied the example by richlove, it worked. I'm no longer getting an error when I Verify the code, but now I'm getting an error when I tried to Upload to the board. I have the correct port and arduino uno selected. is anyone else having this issue?

Jianyou Li
Thu, 16 May 2019 14:45:34 GMT

Hi, I downloaded the Firmata of Firefly 1.0.0.70 64 bit for Arduino 1.8.9, and seems WriteToDAC function is fixed as you discussed. But when I uploaded it to my Arduino Mega 2560 board, I got an error message : " expect unqualified-id before "/" token". Anyone know how to fix it?

jaysfred317
Mon, 08 Jul 2019 15:25:46 GMT

Here is my error and my solution exit status 1 'pin' was not declared in this scope So I back to program and find the "pin" to define what pin is. Then I correct "int pin=0" to " int pin0=0" and correct all of it which mention "pin"

dayyem
Mon, 26 Aug 2019 13:28:26 GMT

[Untitled](//muut.com/u/firefly/s3/:firefly:Vrxu:untitled.jpg.jpg) I am facing an issue i hope someone can help. The error is compiling for board Arduino/Genuino Uno. It says exit status 1 and error compiling for board Arduino/Genuino Uno. I'm using Rhino 6 and Arduino 1.8.9

excore
Sat, 12 Oct 2019 13:15:49 GMT

https://www.youtube.com/watch?v=RJj1U7Oqxo4 Check out this tutorial. I got rid oft the issuu by installing Arduino 1.6.5