Embrio Forum
»
Embrio Support
»
Issues and Bugs
»
Error when adding an output to custom Arduino Agent
Rank: Member
Groups: Registered
Joined: 4/8/2015(UTC) Posts: 10
Thanks: 2 times
|
I moved this from the other forum as I think it's a bug. I created a very simple agent:  When I tried to update the communications code, i got the following error:  Here is the log: Quote: Using library Wire in folder: c:\Program Files\Arduino\hardware\arduino\avr\libraries\Wire
c:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10603 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -Ic:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -Ic:\Program Files\Arduino\hardware\arduino\avr\variants\standard -Ic:\Program Files\Arduino\hardware\arduino\avr\libraries\Wire C:\Users\ADMINI~1\AppData\Local\Temp\build6320548971441157446.tmp\ArduinoCompile.cpp -o C:\Users\ADMINI~1\AppData\Local\Temp\build6320548971441157446.tmp\ArduinoCompile.cpp.o ArduinoCompile.ino: In function 'void SendInputs5()': ArduinoCompile.ino:181:36: error: 'string0' was not declared in this scope Error compiling.
And the code lines from the INO file: Code:
void SendInputs5()
{
Serial.print("UPD:5");
Serial.print(":"); Serial.print(f[1]);
Serial.print(":"); Serial.print(string0);
Serial.print("\n");
}
|
|
|
|
Rank: Member
Groups: Registered
Joined: 4/8/2015(UTC) Posts: 10
Thanks: 2 times
|
UpdateIf I assign the output in the setup code the error goes away:  However is I declare a byte array in the declaration block, the error returns:  Changing byte to unsigned fixes the error: 
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/11/2014(UTC) Posts: 661
Thanks: 1 times Was thanked: 36 time(s) in 33 post(s)
|
Thanks for the details, sounds easy to track down.
|
|
|
|
Rank: Member
Groups: Registered
Joined: 4/8/2015(UTC) Posts: 10
Thanks: 2 times
|
BTW I just found that passing a size to the array appears to work: 
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/11/2014(UTC) Posts: 661
Thanks: 1 times Was thanked: 36 time(s) in 33 post(s)
|
Thanks again for the detailed info, this one is fixed, will be in the next release.
|
 1 user thanked EmbrioAdmin for this useful post.
|
|
|
Rank: Member
Groups: Registered
Joined: 4/8/2015(UTC) Posts: 10
Thanks: 2 times
|
|
|
|
|
Embrio Forum
»
Embrio Support
»
Issues and Bugs
»
Error when adding an output to custom Arduino Agent
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.