I made third party extension, related to OLED I2C.
But it isn’t uploaded under mblock5.
This is message from m block5.
start processing code…
processing code by middleware of pinMode
avr-toolchain/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"/Applications/Makeblock/mBlock.app/Contents/Resources/app/mlink-v1/external/arduino/avr-library/variants/standard" -I"avr-library/cores/arduino" -I"arduino-libraries/makeblock/src" -I"arduino-libraries/makeblock/src/utility/avr" -I"avr-library/libraries/Wire/src/utility" -I"avr-library/libraries/Wire/src/" -I"avr-library/libraries/EEPROM/src/" -I"avr-library/libraries/SPI/src/" -I"avr-library/libraries/SoftwareSerial/src/" -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/" -I"arduino-libraries/arduino/Adafruit_Circuit_Playground/" -I"arduino-libraries/arduino/Adafruit_Circuit_Playground/utility/" -I"arduino-libraries/arduino/Esplora/src/" -I"arduino-libraries/arduino/Firmata/" -I"arduino-libraries/arduino/Firmata/utility/" -I"arduino-libraries/arduino/Keyboard/src/" -I"arduino-libraries/arduino/Mouse/src/" -I"arduino-libraries/arduino/Robot_Control/src/" -I"arduino-libraries/arduino/Robot_Motor/src/" -I"arduino-libraries/arduino/RobotIRremote/src/" -I"arduino-libraries/arduino/Stepper/src/" “/Users/newmac/mblock-avr/temp/build/OLED_I2C.cpp” -o “/Users/newmac/mblock-avr/temp/build/OLED_I2C.o”
avr-toolchain/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"/Applications/Makeblock/mBlock.app/Contents/Resources/app/mlink-v1/external/arduino/avr-library/variants/standard" -I"avr-library/cores/arduino" -I"arduino-libraries/makeblock/src" -I"arduino-libraries/makeblock/src/utility/avr" -I"avr-library/libraries/Wire/src/utility" -I"avr-library/libraries/Wire/src/" -I"avr-library/libraries/EEPROM/src/" -I"avr-library/libraries/SPI/src/" -I"avr-library/libraries/SoftwareSerial/src/" -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/" -I"arduino-libraries/arduino/Adafruit_Circuit_Playground/" -I"arduino-libraries/arduino/Adafruit_Circuit_Playground/utility/" -I"arduino-libraries/arduino/Esplora/src/" -I"arduino-libraries/arduino/Firmata/" -I"arduino-libraries/arduino/Firmata/utility/" -I"arduino-libraries/arduino/Keyboard/src/" -I"arduino-libraries/arduino/Mouse/src/" -I"arduino-libraries/arduino/Robot_Control/src/" -I"arduino-libraries/arduino/Robot_Motor/src/" -I"arduino-libraries/arduino/RobotIRremote/src/" -I"arduino-libraries/arduino/Stepper/src/" “/Users/newmac/mblock-avr/temp/build/code.cpp” -o “/Users/newmac/mblock-avr/temp/build/code.o”
avr-toolchain/bin/avr-gcc -w -Os -Wl,–gc-sections -mmcu=atmega328p -o “/Users/newmac/mblock-avr/temp/build/out.elf” “/Users/newmac/mblock-avr/temp/build/OLED_I2C.o” “/Users/newmac/mblock-avr/temp/build/code.o” “/Applications/Makeblock/mBlock.app/Contents/Resources/app/mlink-v1/external/arduino/mbot/libmbot.a” -lm
Command failed: avr-toolchain/bin/avr-gcc -w -Os -Wl,–gc-sections -mmcu=atmega328p -o “/Users/newmac/mblock-avr/temp/build/out.elf” “/Users/newmac/mblock-avr/temp/build/OLED_I2C.o” “/Users/newmac/mblock-avr/temp/build/code.o” “/Applications/Makeblock/mBlock.app/Contents/Resources/app/mlink-v1/external/arduino/mbot/libmbot.a” -lm /Users/newmac/mblock-avr/temp/build/code.o: In function setup': /Users/newmac/mblock-avr/temp/build/code.cpp:32: undefined reference to
SmallFont’ /Users/newmac/mblock-avr/temp/build/code.cpp:32: undefined reference to `SmallFont’ collect2: error: ld returned 1 exit status
arduino build failed.
This is copied cord from mblock, made by me.
// generated by mBlock5 for
// codes make you happy
#include “OLED_I2C.h”
#include <Arduino.h>
#include <Wire.h>
#include <SoftwareSerial.h>
OLED myOLED(SDA, SCL, 8);
extern uint8_t TinyFont[];
extern uint8_t SmallFont[];
extern uint8_t MediumNumbers[];
extern uint8_t BigNumbers[];
void _delay(float seconds) {
long endTime = millis() + seconds * 1000;
while(millis() < endTime) _loop();
}
void setup() {
myOLED.begin();
myOLED.setFont(SmallFont);
myOLED.printNumI(100, RIGHT,0);
myOLED.update();
}
void _loop() {
}
void loop() {
_loop();
}
This cord working under Arduino IDE. but it doesn’t work under mblock.
Help me, please. !!