[SOLVED]Makeblock Library V3.0: Some issues on LINUX


#1

Hi folks at Makeblock,
Hi @peterlee and @Pioneer

Great to see the new makeblock library V3.0 for Arduino IDE appears on GitHub. I have installed the new library (version as of 05 Nov 2015) with the latest version of Arduino IDE (1.6.6) and it works fine in general. Please see below some issues I found.

  1. Uploading Sketches
    to Orion board is impossible when Bluetooth Module is connected to the Orion board. This has been described in a separate thread. Please fix this, as it is most annoying and creates endless confusion!
  2. Wrong include directive to “arduino.h” in all header files
    All header files in libraries/makeblock/src/ contain an error, as they attempt to include the library “arduino.h”, which does not exist. The correct include statement would be #include “Arduino.h”. This causes compilation errors with all examples and all sketches written by your users.
    LINUX is case-sensitive, thus the capital “A” matters. This should be no issue on MS-Windows when changed, as Windumb is not case-sensitive. (For those who have experienced the problem: It can temporarily be fixed by creating a copy of arduino-1.6.6/hardware/arduino/avr/cores/arduino/Arduino.h and renaming it arduino.h.)
  3. Warning when compiling MeOrion.h
    The following warning is given when compiling a sketch which includes MeOrion.h:
    arduino-1.6.6/libraries/makeblock/src/MeOrion.h:77:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
    };
    ^

I hope this input helps you to improve the library so that it also works with LINUX installations of the Arduino IDE.

Cheers, Stefanstrong text


#2

@srothe, for the first issue, I have replied in the other thread. but for the second and third issue, I am not quite understand, could you please send email to us(support@makeblock.cc) with more details? Its better if you can also attached the program, so that we can reproduce on our site.


#3

@Pioneer
No need for emailing.

  • Regarding issue 2
    To fix, replace the line #include “arduino.h” with #include “Arduino.h” in all files within the makeblock/src directory.
  • Regarding issue 3
    This happens when compiling your own example sketches. Just compile or upload one of your examples to an orion board and watch the warnings which appear.

Cheers, Stefan


#4

I just submitted a pull request via Github that corrects the issue. @Pioneer, if you can apply the pull request, you should be covered.


#5

@chuckmacknight, could you please resend us by email(support@makeblock.cc)? I will report to our developers.


#6

Hi @Pioneer and @chuckmcknight,

thanks for solving the issues 2 and 3 mentioned in my first post, above. Makeblock Library V3.0 works now without warnings and errors on LINUX and Arduino IDE V 1.6.6.

For those who do not find the library on GitHub, here is the link: https://github.com/Makeblock-official/Makeblock-Libraries. Use the download button within the right panel. At the moment this library is frequently updated with patches. It is worth checking the archive frequently for the latest modifications.


#7

Thanks, @srothe,

The readme.md on the link you provided seems specific to Microsoft; do you happen to know of any instructions specific to Linux? I would love to get mBlock working under Ubuntu 14.04 if possible.


#8

Hi @sacrophyte,

this is not about the mBlock Software (some kind of Scratch, afaik). This here is about the makeblock library for the Arduino IDE. The location of these libraries is the same for all OS’es: [Your Arduino IDE directory]\libraries\makeblock. \makeblock and its subdirectories is located in what you extract from the Zip file. You have to copy the makeblock directory and it’s content into [Your Arduino IDE directory]\libraries\ . Then everything will work correctly.

Cheers, Stefan


#9

The biggest problem with getting mBlock to run under Linux is that Adobe apparently no longer supports the AIR SDK and the Scratch offline editor which is the basis of mBlock is written in ActionScript. Next year I will be looking at what is involved in porting the format to Snap4Arduino because it is written in HTML/Javascript/CSS and Node.js which is a much more portable (and better supported) foundation for this sort of programming.


#10

Not sure if we should start a new topic here… I received my first mbot today and I like it already. We want to use it for our Coderdojo workshops, but use linux to run our Scratch programs.
I ran through the directories of mBlock on my windows machine and found some interesting .js and .s2e files. I do think we can use the linux version of scratch and load the modified extentions to communicate with mBot. Anyone else interested in having a look?


#11