Hi all!,
I´m new at arduino programming. I found this link from ¨Maker Tutor¨at ¨http://www.arduinotutorialonline.com/2017/12/arduino-and-oled-display-gauge-with.HTML¨
and created a new sketch at arduino IDE with arduino uno and an I2C SSD1306 display.
I just copied and pasted the code and compiled and uploaded to the arduino uno and everything worked just fine.
Then, I ordered a ¨Digispark Kickstarter ATTINY85 General Micro USB Development Board ASS¨ from eBay to make it more compact.
but......
After have added the drivers, board compatibility, compiled and uploaded the ¨blinking led and hello world¨ with success to the ATTINY85¨
I tried to upload the same code to the ATTINY85 and got a lot of errors back.
I´ve tried migrating from u8g to u8g2 and removed some code and removed the fonts, but still have getting a lot of errors.
I had tried with the arduino uno again and everything Works just fine.
Could some one with the knowledge help me to make it work with the ATTINY85 and the SSD1306?
here is the original code:
http://www.arduinotutorialonline.com/2017/12/arduino-and-oled-display-gauge-with.htmlAnd this are the returned errors after modifications:
--------------------- BORE --------------------------
In file included from C:\Users\Multimedia\Documents\Arduino\libraries\U8g2\src/U8g2lib.h:50:0,
from C:\Users\Multimedia\Documents\Arduino\sketches\gauge\gauge.ino:1:
C:\Users\Multimedia\Documents\Arduino\libraries\U8g2\src/U8x8lib.h:282:12: error: conflicting return type specified for 'virtual size_t U8X8::write(const uint8_t*, size_t)'
size_t write(const uint8_t *buffer, size_t size) {
^
In file included from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Stream.h:24:0,
from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/TinyDebugSerial.h:31,
from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:18,
from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from sketch\gauge.ino.cpp:1:
C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Print.h:75:18: error: overriding 'virtual void Print::write(const uint8_t*, size_t)'
virtual void write(const uint8_t *buffer, size_t size);
^
In file included from C:\Users\Multimedia\Documents\Arduino\libraries\U8g2\src/U8g2lib.h:50:0,
from C:\Users\Multimedia\Documents\Arduino\sketches\gauge\gauge.ino:1:
C:\Users\Multimedia\Documents\Arduino\libraries\U8g2\src/U8x8lib.h:351:12: error: conflicting return type specified for 'virtual size_t U8X8LOG::write(const uint8_t*, size_t)'
size_t write(const uint8_t *buffer, size_t size) {
^
In file included from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Stream.h:24:0,
from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/TinyDebugSerial.h:31,
from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:18,
from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from sketch\gauge.ino.cpp:1:
C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Print.h:75:18: error: overriding 'virtual void Print::write(const uint8_t*, size_t)'
virtual void write(const uint8_t *buffer, size_t size);
^
In file included from C:\Users\Multimedia\Documents\Arduino\sketches\gauge\gauge.ino:1:0:
C:\Users\Multimedia\Documents\Arduino\libraries\U8g2\src/U8g2lib.h:277:12: error: conflicting return type specified for 'virtual size_t U8G2::write(const uint8_t*, size_t)'
size_t write(const uint8_t *buffer, size_t size) {
^
In file included from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Stream.h:24:0,
from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/TinyDebugSerial.h:31,
from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:18,
from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from sketch\gauge.ino.cpp:1:
C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Print.h:75:18: error: overriding 'virtual void Print::write(const uint8_t*, size_t)'
virtual void write(const uint8_t *buffer, size_t size);
^
In file included from C:\Users\Multimedia\Documents\Arduino\sketches\gauge\gauge.ino:1:0:
C:\Users\Multimedia\Documents\Arduino\libraries\U8g2\src/U8g2lib.h:357:12: error: conflicting return type specified for 'virtual size_t U8G2LOG::write(const uint8_t*, size_t)'
size_t write(const uint8_t *buffer, size_t size) {
^
In file included from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Stream.h:24:0,
from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/TinyDebugSerial.h:31,
from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:18,
from C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from sketch\gauge.ino.cpp:1:
C:\Users\Multimedia\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Print.h:75:18: error: overriding 'virtual void Print::write(const uint8_t*, size_t)'
virtual void write(const uint8_t *buffer, size_t size);
^
exit status 1
Error compiling for board Digispark (Default - 16.5mhz).
---------------------------- EORE ---------------------------------
I'd appreciate your help.
Thank You.