Problems writing mBlock extension


#1

Hi,
I am trying to write an mBlock extension (project = rgbSensor) to use the Adafruit TCS34725 colour sensor board with an Arduino UNO but I am having a few problems with writing and compiling the extension.
I have read and understand the mBlock extension guide.
I am using mBlock V3.4.4 and OSX El Capitan 10.11.6
I keep getting “multiple definition of Adafruit_TCS34725:: …….” errors during the Upload to Arduino process. The errors cause the compile/upload process to halt. However, the file “project_rgbsensor_test0_0.ino” produced by mBlock will compile and run from the Arduino IDE, this would indicate that the .sb2, .h, .cpp and .s2e files are correct but somehow some library files are being read/used twice.
I later discovered that if I revert to mBlock V3.3.4 everything compiles, uploads and runs perfectly. Versions 3.4.2, and 3.4.3 rev2 also will not compile and upload, but the produced “project_rgbsensor_test0_0.ino” files will compile and run from the Arduino IDE.
The Makeblock supplied Demo extension files will compile and upload with all mBlock versions.
The mBlock extension guide gives some detail on where the extension files should be located. But no mention is made about where these files should be located in relation to the Arduino library etc. I feel that some of these multiple definition errors are related to file location.
Can anyone please help or provide some suggestions.
post.zip (44.9 KB)


#2

Hi,

Would you please paste the full log from the Arduino mode console? It may contains information about the problem’s location.


#3

Hi,
As requested, full log attached
.Arduino_mode_console_log_1.rtf.zip (762 Bytes)

Thank you


#4

Hi,
With the release of mBlock version 3.4.6 this problem no longer exists.
No mention in the release logs for 3.4.6?
Thank you for fixing.


#5

Hi Phil,
Glad to hear that.
Normally, the release note shows the main part which modified in the new version software. It won’t list all the small changes. Thanks for your feedback!


#6