Where to store Arduino libraries for customized blocks


#1

What is the best way to store e.g. the “FastLED” library in mblock version 3 when creating customized blocks?

Regards,
Marion


#2

Hi Marion,

Normally, you can find the library for extensions by clicking the View Source.


#3

Hi,
thanx for reply.

What I mean is the library you also have to install in Arduino e.g. the library of [http://fastled.io/].

It doesn’t work, if you just store them into the source file.

Regards,
Marion


#4

It works if you copy the library to C:\Program Files (x86)\mBlock\Arduino\libraries (under windows).

But may be there ist a more comfortable way to do this, because you need administration rights to do this.

Regards,
Marion


#5

I guess you are talking about writing extensions with extra .cpp or .h files from Arduino (C++) library.
As specified in the Extension Guide
These files are stored in the /src folder of the extension.


#6

May be I didn’t use the correct folder structure when I tried to store the library within the src folder. But when I store the library local in the program folder, I dont’t have to mention the copyrigts.


#7

Hello,
now I face other problems. After using my own customized extension, which refers to a spezial library deposited in “C:\Program Files (x86)\mBlock\Arduino\libraries” I reach the following error message:

9639025.tmp\demo.cpp.o
C:\Program Files (x86)\mBlock\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=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\mBlock\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\mBlock\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\mBlock\Arduino\hardware\arduino\avr\libraries\Wire -IC:\Program Files (x86)\mBlock\Arduino\hardware\arduino\avr\libraries\SoftwareSerial C:\Users\marion\AppData\Local\Temp\build5082930538019639025.tmp\project_Untitled3_3.cpp -o C:\Users\marion\AppData\Local\Temp\build5082930538019639025.tmp\project_Untitled3_3.cpp.o
C:\Program Files (x86)\mBlock\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=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\mBlock\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\mBlock\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\mBlock\Arduino\hardware\arduino\avr\libraries\Wire -IC:\Program Files (x86)\mBlock\Arduino\hardware\arduino\avr\libraries\SoftwareSerial C:\Users\marion\AppData\Local\Temp\build5082930538019639025.tmp\rainbow.cpp -o C:\Users\marion\AppData\Local\Temp\build5082930538019639025.tmp\rainbow.cpp.o
In file included from C:\Users\marion\AppData\Local\Temp\build5082930538019639025.tmp\rainbow.cpp:1:0:
C:\Users\marion\AppData\Local\Temp\build5082930538019639025.tmp\rainbow.h:5:21: fatal error: FastLED.h: No such file or directory
#include <FastLED.h>
^
compilation terminated.
Fehler beim Kompilieren.


#8

I forgot to mention, that the error message appears when mBlock tries to compile blocks which do not refer to that library.

I have no idea why?