MBLOCK 5.0.0 RC failing to compile


#1

Please some help with the latest version of Mblock 5.0, we installed it and it looks great more intuitive.
We were able to successfully connect our Ranger via USB cable.
But a even simple code did not make it through the compiler.

Building code…
Use middleware arduino
avr-toolchain\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I"C:\ProgramData\mBlock5\IdeServicePlus\app\external\arduino\avr-library\variants\mega" -I"avr-library/cores/arduino" -I"arduino-libraries/makeblock/src" -I"arduino-libraries/makeblock/src/utility/avr" -I"avr-library/libraries/Wire/utility" -I"avr-library/libraries/Wire" -I"avr-library/libraries/SoftwareSerial" -I"arduino-libraries/arduino/WiFi/src/" -I"arduino-libraries/arduino/SD/src/" -I"arduino-libraries/arduino/Bridge/src/" -I"arduino-libraries/arduino/Temboo/src/" -I"arduino-libraries/arduino/Servo/src/" -I"arduino-libraries/arduino/Ethernet/src/" -I"arduino-libraries/arduino/TFT/src/" -I"arduino-libraries/arduino/SpacebrewYun/src/" -I"arduino-libraries/arduino/LiquidCrystal/src/" -I"arduino-libraries/arduino/GSM/src/" “C:\Users\bramp\mblock-avr\temp\build\code.cpp” -o “C:\Users\bramp\mblock-avr\temp\build\code.o”
Command failed: avr-toolchain\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I"C:\ProgramData\mBlock5\IdeServicePlus\app\external\arduino\avr-library\variants\mega" -I"avr-library/cores/arduino" -I"arduino-libraries/makeblock/src" -I"arduino-libraries/makeblock/src/utility/avr" -I"avr-library/libraries/Wire/utility" -I"avr-library/libraries/Wire" -I"avr-library/libraries/SoftwareSerial" -I"arduino-libraries/arduino/WiFi/src/" -I"arduino-libraries/arduino/SD/src/" -I"arduino-libraries/arduino/Bridge/src/" -I"arduino-libraries/arduino/Temboo/src/" -I"arduino-libraries/arduino/Servo/src/" -I"arduino-libraries/arduino/Ethernet/src/" -I"arduino-libraries/arduino/TFT/src/" -I"arduino-libraries/arduino/SpacebrewYun/src/" -I"arduino-libraries/arduino/LiquidCrystal/src/" -I"arduino-libraries/arduino/GSM/src/" “C:\Users\bramp\mblock-avr\temp\build\code.cpp” -o “C:\Users\bramp\mblock-avr\temp\build\code.o” C:\Users\bramp\mblock-avr\temp\build\code.cpp: In function ‘void _delay(float)’: C:\Users\bramp\mblock-avr\temp\build\code.cpp:10:25: error: ‘millis’ was not declared in this scope long endTime = millis() + seconds * 1000; ^
Failed to compile file code.cpp
arduino build failed.

regards,
Frank


#2

Can you post your code? This looks similar to another user’s issue where he was trying to compile a standalone program (robot not connected via USB) and had not replaced the When Clicked block with the mBot Program block. The Ranger will have a similar block and will cause the code generator to create the necessary code.


#3

here it is ,


#4

Yup, the error you’re seeing has to do with using the When Clicked hat block. Try the following:

  1. Click the Upload mode button towards the bottom left of the screen.
  2. Replace the When Clicked hat block with the when mBot Ranger(Auriga) starts up hat block from the Events palette.

Let me know if that corrects the compilation error. :slight_smile:

Best regards,

Chuck


#5

Hi Chuck,

that worked ! thanks,
I have another question though, how do we revert to the original standard program in the ranger with the Block 5.0?
Another question I have, we purchased the robot grip to install on the ranger, where can I find the commands to operate it?

Frank


#6

Hi Frank,

mBlock 5 only lets you reinstall the firmware. @tech_support would need to answer how to install any other default program.

With regard to the gripper, I believe it is servo-operated (I don’t have one), you might want to look at this project (link). Otherwise, it’s a question for @tec_support. :frowning:

Sorry


#7

Many thx chuck.
you were a great help !


#8

Thanks for your suggestion. MBlock 5 changed frequently during a short time and the user manual for it may not be in same speed. Now mBlock 5 is probably stable and few changes will be added to it and now we are making a specific manual for mBlock 5. Hope it will come soon.


#9

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.