Announcement

Collapse
No announcement yet.

uOLED_160-G1 with Arduino

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • mtugnoli
    started a topic uOLED_160-G1 with Arduino

    uOLED_160-G1 with Arduino

    Hi,

    I'm trying in every way to get my old uOLED 160 G1 with arduino one.
    In all the examples I could find, an error occurs while loading the sketch.

    What can I do ?
    Is it still usable?

  • mtugnoli
    replied
    Fantastic !! RUN


    I will always buy 4d products, the customer service is great!
    in a few days I will also test with the uLCD-32PT
    maybe I will contact you again

    Leave a comment:


  • pauleilio
    replied
    Hello,

    The error from the Arduino IDE is a communication error to the UNO. If the display is connected to the UNO this will be the reason for communication failure. It would be possible to use Software Serial in your setup and this would then move the display off the UNO Tx Rx and onto UNO pins 10, 11. You could change your code to this

    //Simple Demo that demonstrates 'print' and 'println' new functionality.

    #include <SoftwareSerial.h>
    #define DisplaySerial SerialSW
    SoftwareSerial SerialSW(10, 11) ;

    #include "Goldelox_Serial_4DLib.h"
    #include "Goldelox_Const4D.h"

    //use Serial0 to communicate with the display.
    Goldelox_Serial_4DLib Display(&DisplaySerial);

    //---------END-----------------

    void setup() {
    //For handling errors
    Display.Callback4D = mycallback ;

    //5 second timeout on all commands
    Display.TimeLimit4D = 5000 ;

    DisplaySerial.begin(9600) ;

    //--------------------------------Optional reset routine-----------------------------------
    //Reset the Display using D4 of the Arduino (if using the new 4D Arduino Adaptor - Rev 2)
    //If using the old 4D Arduino Adaptor (Rev 1), change D4 to D2 below.
    //If using jumper wires, reverse the logic states below.
    //Refer to the accompanying application note for important information.
    pinMode(4, OUTPUT); // Set D4 on Arduino to Output (4D Arduino Adaptor V2 - Display Reset)
    digitalWrite(4, 0); // Reset the Display via D4
    delay(100);
    digitalWrite(4, 1); // unReset the Display via D4
    //-----------------------------------------END---------------------------------------------

    delay (5000); //let the display start up

    Display.gfx_ScreenMode(LANDSCAPE);
    Display.SSTimeout(0) ;
    Display.SSSpeed(0) ;
    Display.SSMode(0) ;

    //Display.gfx_BGcolour(WHITE) ; //change background color to white
    Display.gfx_Cls(); //clear the screen

    char a = 'A';
    char a2 = 'B';
    int b = 1234;
    int b2 = -1234;
    long c = 123456;
    long c2 = -123456;
    String string = "This is string class";
    char charr[30] = "This is const char array";
    float d = 123.456789;
    float d2 = -123.456789;
    float nan = NAN;
    float inf = INFINITY;
    float ovf1 = 5294967040.0;
    float ovf2 = -5294967040.0;

    Display.print(a); Display.print(' ');
    Display.println(a2);
    Display.print(b); Display.print(' ');
    Display.println(b2);
    Display.print(c); Display.print(' ');
    Display.println(c2);
    Display.println("This is String");
    Display.println(F("This is Flashstring")); // COMMENT OUT FOR ARDUINO DUE, NOT SUPPORTED
    Display.println(string);
    Display.println(charr);
    Display.println(d,6);
    Display.println(d2, 3);
    Display.println(nan);
    Display.println(inf);
    Display.println(ovf1);
    Display.println(ovf2);

    }

    void loop()
    {

    }

    void mycallback(int ErrCode, unsigned char Errorbyte)
    {
    // Pin 13 has an LED connected on most Arduino boards. Just give it a name
    int led = 13;
    pinMode(led, OUTPUT);
    while(1)
    {
    digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
    delay(200); // wait for 200 ms
    digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
    delay(200); // wait for 200 ms
    }
    }

    I hope this helps

    Best regards

    Paul

    Leave a comment:


  • mtugnoli
    replied
    Arduino:1.8.7 (Windows 10), Scheda:"Arduino/Genuino Uno"

    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Marco\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10807 -build-path C:\Users\... -warnings=none -build-cache C:\Users\Marco\...\arduino_cache_484795 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose D:\HOBBIES\Iot\Arduino\Projects\GOLDELOX\Display_print\Display_print.ino
    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Marco\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10807 -build-path C:\Users\... -warnings=none -build-cache C:\Users\Marco\...\arduino_cache_484795 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose D:\HOBBIES\Iot\Arduino\Projects\GOLDELOX\Display_print\Display_print.ino
    Using board 'uno' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
    Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
    Detecting libraries used...
    "C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10807 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "C:\\Users\\...\\arduino_build_22701\\sketch\\Display_print.ino.cpp" -o nul
    "C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10807 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\Marco\\Documents\\Arduino\\libraries\\Goldelox_Serial_4DLib" "C:\\Users\\...\\arduino_build_22701\\sketch\\Display_print.ino.cpp" -o nul
    Using cached library dependencies for file: C:\Users\Marco\Documents\Arduino\libraries\Goldelox_Serial_4DLib\Goldelox_Serial_4DLib.cpp
    Generating function prototypes...
    "C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10807 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\Marco\\Documents\\Arduino\\libraries\\Goldelox_Serial_4DLib" "C:\\Users\\...\\arduino_build_22701\\sketch\\Display_print.ino.cpp" -o "C:\\Users\\...\\arduino_build_22701\\preproc\\ctags_target_for_gcc_minus_e.cpp"
    "C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\...\\arduino_build_22701\\preproc\\ctags_target_for_gcc_minus_e.cpp"
    Sto compilando lo sketch...
    "C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10807 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\Marco\\Documents\\Arduino\\libraries\\Goldelox_Serial_4DLib" "C:\\Users\\...\\arduino_build_22701\\sketch\\Display_print.ino.cpp" -o "C:\\Users\\...\\arduino_build_22701\\sketch\\Display_print.ino.cpp.o"
    Compiling libraries...
    Compiling library "Goldelox_Serial_4DLib"
    Uso il file: C:\Users\...\libraries\Goldelox_Serial_4DLib\Goldelox_Serial_4DLib.cpp.o
    Compiling core...
    Uso il file: C:\Users\...\core\wiring_pulse.S.o
    Uso il file: C:\Users\...\core\WInterrupts.c.o
    Uso il file: C:\Users\...\core\wiring_digital.c.o
    Uso il file: C:\Users\...\core\wiring_analog.c.o
    Uso il file: C:\Users\...\core\hooks.c.o
    Uso il file: C:\Users\...\core\wiring.c.o
    Uso il file: C:\Users\...\core\wiring_pulse.c.o
    Uso il file: C:\Users\...\core\wiring_shift.c.o
    Uso il file: C:\Users\...\core\WString.cpp.o
    Uso il file: C:\Users\...\core\HardwareSerial0.cpp.o
    Uso il file: C:\Users\...\core\USBCore.cpp.o
    Uso il file: C:\Users\...\core\HardwareSerial2.cpp.o
    Uso il file: C:\Users\...\core\PluggableUSB.cpp.o
    Uso il file: C:\Users\...\core\abi.cpp.o
    Uso il file: C:\Users\...\core\HardwareSerial.cpp.o
    Uso il file: C:\Users\...\core\WMath.cpp.o
    Uso il file: C:\Users\...\core\Tone.cpp.o
    Uso il file: C:\Users\...\core\new.cpp.o
    Uso il file: C:\Users\...\core\Print.cpp.o
    Uso il file: C:\Users\...\core\HardwareSerial1.cpp.o
    Uso il file: C:\Users\...\core\Stream.cpp.o
    Uso il file: C:\Users\...\core\main.cpp.o
    Uso il file: C:\Users\...\core\HardwareSerial3.cpp.o
    Uso il file: C:\Users\...\core\IPAddress.cpp.o
    Uso il file: C:\Users\...\core\CDC.cpp.o
    Uso il file: C:\Users\...\core\core.a
    Archivio il core (caching) compilato in: C:\Users\Marco\...\arduino_cache_484795\core\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a
    Linking everything together...
    "C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\...\\arduino_build_22701/Display_print.ino.elf" "C:\\Users\\...\\arduino_build_22701\\sketch\\Display_print.ino.cpp.o" "C:\\Users\\...\\arduino_build_22701\\libraries\\Goldelox_Serial_4DLib\\Goldelox_Serial_4DLib.cp p.o" "C:\\Users\\...\\arduino_build_22701/core\\core.a" "-LC:\\Users\\...\\arduino_build_22701" -lm
    "C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\...\\arduino_build_22701/Display_print.ino.elf" "C:\\Users\\...\\arduino_build_22701/Display_print.ino.eep"
    "C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\...\\arduino_build_22701/Display_print.ino.elf" "C:\\Users\\...\\arduino_build_22701/Display_print.ino.hex"
    Più di una libreria trovata per "Goldelox_Serial_4DLib.h"
    Usata: C:\Users\Marco\Documents\Arduino\libraries\Goldelox_Serial_4DLib
    Non usata: C:\Program Files (x86)\Arduino\libraries\Goldelox_Serial_4DLib
    Uso la libreria Goldelox_Serial_4DLib nella cartella: C:\Users\Marco\Documents\Arduino\libraries\Goldelox_Serial_4DLib (legacy)
    "C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\Users\\...\\arduino_build_22701/Display_print.ino.elf"
    Lo sketch usa 6432 byte (19%) dello spazio disponibile per i programmi. Il massimo è 32256 byte.
    Le variabili globali usano 283 byte (13%) di memoria dinamica, lasciando altri 1765 byte liberi per le variabili locali. Il massimo è 2048 byte.
    avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
    avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
    avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
    avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
    avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
    avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
    Problema di caricamento sulla scheda. Guarda http://www.arduino.cc/en/Guide/Troubleshooting#upload per suggerimenti
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

    Leave a comment:


  • mtugnoli
    replied
    Very Good !! now is running !! (with Workshop 4)

    Now I looking for the library for arduino.. in in the old version of the site is not present,
    I found it on github https://github.com/4dsystems/Goldelo...rduino-Library
    are good for uOLED-160-G1 ?

    I tried it with my arduino UNO ...

    This is my source :


    //Simple Demo that demonstrates 'print' and 'println' new functionality.

    #define DisplaySerial Serial

    #include "Goldelox_Serial_4DLib.h"
    #include "Goldelox_Const4D.h"

    //use Serial0 to communicate with the display.
    Goldelox_Serial_4DLib Display(&DisplaySerial);

    //---------END-----------------

    void setup() {
    //For handling errors
    Display.Callback4D = mycallback ;

    //5 second timeout on all commands
    Display.TimeLimit4D = 5000 ;

    DisplaySerial.begin(9600) ;

    //--------------------------------Optional reset routine-----------------------------------
    //Reset the Display using D4 of the Arduino (if using the new 4D Arduino Adaptor - Rev 2)
    //If using the old 4D Arduino Adaptor (Rev 1), change D4 to D2 below.
    //If using jumper wires, reverse the logic states below.
    //Refer to the accompanying application note for important information.
    pinMode(4, OUTPUT); // Set D4 on Arduino to Output (4D Arduino Adaptor V2 - Display Reset)
    digitalWrite(4, 1); // Reset the Display via D4
    delay(100);
    digitalWrite(4, 0); // unReset the Display via D4
    //-----------------------------------------END---------------------------------------------

    delay (5000); //let the display start up

    Display.gfx_ScreenMode(LANDSCAPE);
    Display.SSTimeout(0) ;
    Display.SSSpeed(0) ;
    Display.SSMode(0) ;

    //Display.gfx_BGcolour(WHITE) ; //change background color to white
    Display.gfx_Cls(); //clear the screen

    char a = 'A';
    char a2 = 'B';
    int b = 1234;
    int b2 = -1234;
    long c = 123456;
    long c2 = -123456;
    String string = "This is string class";
    char charr[30] = "This is const char array";
    float d = 123.456789;
    float d2 = -123.456789;
    float nan = NAN;
    float inf = INFINITY;
    float ovf1 = 5294967040.0;
    float ovf2 = -5294967040.0;

    Display.print(a); Display.print(' ');
    Display.println(a2);
    Display.print(b); Display.print(' ');
    Display.println(b2);
    Display.print(c); Display.print(' ');
    Display.println(c2);
    Display.println("This is String");
    Display.println(F("This is Flashstring")); // COMMENT OUT FOR ARDUINO DUE, NOT SUPPORTED
    Display.println(string);
    Display.println(charr);
    Display.println(d,6);
    Display.println(d2, 3);
    Display.println(nan);
    Display.println(inf);
    Display.println(ovf1);
    Display.println(ovf2);

    }

    void loop()
    {

    }

    void mycallback(int ErrCode, unsigned char Errorbyte)
    {
    // Pin 13 has an LED connected on most Arduino boards. Just give it a name
    int led = 13;
    pinMode(led, OUTPUT);
    while(1)
    {
    digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
    delay(200); // wait for 200 ms
    digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
    delay(200); // wait for 200 ms
    }
    }



    Leave a comment:


  • michael_4D
    replied
    Hello,

    Sorry if you were confused with the link that I sent.

    I assume you're getting the error message below when you click on SPE Load, right?

    Click image for larger version  Name:	1st.PNG Views:	1 Size:	4.8 KB ID:	66120

    If so, that's because you've loaded an SGC PmmC. That would also explain the red comm icon.

    Please Load uOLED-160-G1-R26.PmmC to your display.

    You should be able to find it on your PmmC folder.

    Here's a link to the PmmC file just in case it's missing on your folder.

    https://www.dropbox.com/s/e6nt0c9d8j...-R26.PmmC?dl=0

    After that, Please open the serial environment and click on SPE Load to ensure that your module is loaded with the SPE program.

    Best regards,


    Leave a comment:


  • mtugnoli
    replied
    I've download http://old.4dsystems.com.au/download...G1SGC-R17.pmmc
    but result is same, the commands seem not run correctly.

    PS: On screen1.png why comm icon now is red and not blue ?

    The communication I think is ok, because the file .pmmc is loaded correctly !

    I really don't know what is wrong
    Attached Files

    Leave a comment:


  • michael_4D
    replied
    Hello,

    uLCD-32PT runs on Picaso, if ever it is configured as GFX/SGC you'll need to Migrate to PICASO as shown in this Application Note:

    General Migrating from PICASO-SGC-GFX to PICASO
    https://www.4dsystems.com.au/appnote/4D-AN-00037/

    uOLED-160-G2 and uOLED-160-G1 have some hardware differences, and they have individual PmmCs, please use the PmmC intended for your product.

    For more information about the uOLED-160-G1, you could check its product page through this link.

    uOLED160-G1
    http://old.4dsystems.com.au/prod.php?id=201

    Best regards,

    Leave a comment:


  • mtugnoli
    replied
    PS: I have also a uLCD-32PT, I have to do the same ? (migrate to GOLDELOX ?)

    Leave a comment:


  • mtugnoli
    replied
    I have update the firmware with uOLED-160-G2-R26.PmmC
    after that on WorkShop 4 the communication seem ok. (see attached 1)
    But when open Serial Commander and try to send commands, go in timeout and the communication seem not ok (see attached 2)

    PS: I use the 4D programmable cable
    Attached Files

    Leave a comment:


  • michael_4D
    replied
    Hello,

    I'm sorry, but I'm not very familiar with this library.

    Considering that the uOLED-160-G1 is a Legacy product, I would assume that it's configured as either SGC or GFX.

    Since those are obsolete configurations, I would suggest Migrating to GOLDELOX configuration as described on this Application Note:

    General Migrating from GOLDELOX-SGC-GFX to GOLDELOX
    https://www.4dsystems.com.au/appnote/4D-AN-00040/

    After that, these application notes should hopefully guide you on connecting your uOLED-160-G1 to an Arduino as well as using our current Serial Library for Goldelox.

    Serial Connection to an Arduino Host
    https://www.4dsystems.com.au/appnote/4D-AN-00092/

    Serial Arduino How to Draw Shapes
    https://www.4dsystems.com.au/appnote/4D-AN-00123/

    I hope this helps,

    Best regards,

    Leave a comment:


  • mtugnoli
    replied
    I see this article .. http://jennylc.com/4d/

    I use this source

    #include <oled160drv.h>

    void setup() {

    Serial.begin(9600);
    pinMode(8, OUTPUT); // sets the digital pin as output

    //function from Oscar's library, using pin8 to control reset of the OLED
    OLED_Init();

    //cler screen
    OLED_Clear();

    }

    void loop() {

    //draw a nose: function from library
    //void OLED_DrawCircle(char x, char y, char radius, char filled, int color)
    OLED_DrawCircle(78, 68, 10, 1, 63488);
    delay(2000);

    //draw a hat using two rectanagles: function from library
    //void OLED_DrawRectangle(char x, char y, char width, char height, char filled, int color)
    OLED_DrawRectangle(30, 0, 80, 30, 1, 99999);
    OLED_DrawRectangle(10, 30, 120, 10, 1, 99999);
    delay(2000);

    //function from library
    //void OLED_DrawLine(char x1, char y1, char x2, char y2, int color)
    OLED_DrawLine(5, 5, 100, 5, 63488);
    OLED_DrawLine(10, 10, 100, 10, 63488);
    OLED_DrawLine(32, 82, 32, 100, 63488);

    OLED_DrawLine(101, 70, 101, 100, 63488);
    delay(5000);

    }// end loop




    And this errors occour :


    In file included from D:\HOBBIES\Iot\Arduino\Projects\oled160\oled160.ino:1:0:

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h: In function 'void OLED_Init()':

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h:77:33: error: 'printByte' was not declared in this scope

    printByte(OLED_DETECT_BAUDRATE);

    ^

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h: In function 'void OLED_Clear()':

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h:98:22: error: 'printByte' was not declared in this scope

    printByte(OLED_CLEAR); // Pixel write

    ^

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h: In function 'void OLED_PutPixel(char, char, int)':

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h:108:25: error: 'printByte' was not declared in this scope

    printByte(OLED_PUTPIXEL); // Pixel write

    ^

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h: In function 'void OLED_DrawLine(char, char, char, char, int)':

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h:124:21: error: 'printByte' was not declared in this scope

    printByte(OLED_LINE); // Line

    ^

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h: In function 'void OLED_DrawRectangle(char, char, char, char, char, int)':

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h:145:26: error: 'printByte' was not declared in this scope

    printByte(OLED_RECTANGLE);

    ^

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h: In function 'void OLED_DrawCircle(char, char, char, char, int)':

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h:165:30: error: 'printByte' was not declared in this scope

    printByte(OLED_CIRCLE);

    ^

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h: In function 'void OLED_SetFontSize(char)':

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h:188:31: error: 'printByte' was not declared in this scope

    printByte(OLED_SETFONTSIZE);

    ^

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h: In function 'void OLED_DrawText(char, char, char, char*, int)':

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h:198:16: error: 'printByte' was not declared in this scope

    printByte(0x73); // s (Formated text)

    ^

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h: In function 'void OLED_DrawSingleChar(char, char, char, char, int)':

    C:\Users\Marco\Documents\Arduino\libraries\oled160/oled160drv.h:227:29: error: 'printByte' was not declared in this scope

    printByte(OLED_TEXTFORMATED); // T (Formated)

    ^

    D:\HOBBIES\Iot\Arduino\Projects\oled160\oled160.ino: In function 'void loop()':

    D:\HOBBIES\Iot\Arduino\Projects\oled160\oled160.ino:25:43: warning: overflow in implicit constant conversion [-Woverflow]

    OLED_DrawRectangle(30, 0, 80, 30, 1, 99999);

    ^

    D:\HOBBIES\Iot\Arduino\Projects\oled160\oled160.ino:26:45: warning: overflow in implicit constant conversion [-Woverflow]

    OLED_DrawRectangle(10, 30, 120, 10, 1, 99999);

    ^

    exit status 1
    Errore durante la compilazione per la scheda Arduino/Genuino Uno.

    Leave a comment:


  • Eran
    replied
    Hi,

    Can you elaborate more? What kind of error is happening? Can you post the error here so we can help you more?
    A brief description of your setup will be helpful as well.

    Thanks and Best Regards,

    Leave a comment:

Working...
X