OLED display met SSD1306

Hardware die niet past in bovenstaande onderwerpen
Berichten: 25
Geregistreerd: 24 Jan 2018, 17:03

OLED display met SSD1306

Berichtdoor Est29 » 10 Jan 2019, 17:32

Goed nieuwjaar 2019
Heb een aantal OLED-display's gekocht met I2C aansturing met SSD1306 chip.
Nu wil ik die aansturen met een UNO of NANO.
Heb allerlei programmaatjes van internet gehaald, maar die willen niet werken. Zijn niet te compileren
Heb de specificatie van de SSD1306 proberen te lezen, maar dat is een hele klus om die om te zetten naar een I2C aansturing.
Ik zoek een programmaatje waar ik mee kan opstarten en enige leven op het schermpje kan waarnemen.
Wie kan mij helpen?
Eric.

Advertisement

Gebruikers-avatar
Berichten: 270
Geregistreerd: 30 Dec 2012, 11:42

Re: OLED display met SSD1306

Berichtdoor Rudi » 11 Jan 2019, 09:38

Omschrijf "niet te compileren". Krijg je foutmeldingen?
Toon hier eens zulk een sketch.
Arduinows!
Why do computer programmers confuse Halloween with Christmas? Because Oct 31 = Dec 25
I got 01100011 problems but a bit ain't 00000001

Berichten: 25
Geregistreerd: 24 Jan 2018, 17:03

Re: OLED display met SSD1306

Berichtdoor Est29 » 12 Jan 2019, 12:21

Arduino: 1.8.3 (Windows 10), Board:"Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Eric\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Eric\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Eric\Arduino EST\libraries -fqbn=arduino:avr:uno -ide-version=10803 -build-path C:\Users\Eric\AppData\Local\Temp\arduino_build_193636 -warnings=default -build-cache C:\Users\Eric\AppData\Local\Temp\arduino_cache_153382 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.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.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Eric\AppData\Local\Temp\Temp1_E18-OLED-I2C-SSD1306-128X64.zip\OLED-I2C-SSD1306-128X64\OLED-I2C-SSD1306-128X64.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Eric\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Eric\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Eric\Arduino EST\libraries -fqbn=arduino:avr:uno -ide-version=10803 -build-path C:\Users\Eric\AppData\Local\Temp\arduino_build_193636 -warnings=default -build-cache C:\Users\Eric\AppData\Local\Temp\arduino_cache_153382 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.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.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Eric\AppData\Local\Temp\Temp1_E18-OLED-I2C-SSD1306-128X64.zip\OLED-I2C-SSD1306-128X64\OLED-I2C-SSD1306-128X64.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 -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10803 -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\Eric\AppData\Local\Temp\arduino_build_193636\sketch\OLED-I2C-SSD1306-128X64.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 -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10803 -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\Eric\AppData\Local\Temp\arduino_build_193636\sketch\OLED-I2C-SSD1306-128X64.ino.cpp" -o "C:\Users\Eric\AppData\Local\Temp\arduino_build_193636\preproc\ctags_target_for_gcc_minus_e.cpp"
C:\Users\Eric\AppData\Local\Temp\Temp1_E18-OLED-I2C-SSD1306-128X64.zip\OLED-I2C-SSD1306-128X64\OLED-I2C-SSD1306-128X64.ino:51:21: fatal error: U8g2lib.h: No such file or directory

#include <U8g2lib.h>

^

compilation terminated.

Dit is een voorbeeld van een sketch die niet wil compileren. Loopt vast op U8g2lib
Een andere sketch ssd1306_128x32_I2c loop vast op <Adafruit_GFT.h>
Hoe ik om moet gaan met die bibliotheken weet ik niet.
ERic


exit status 1
Fout bij het compileren van board Arduino/Genuino Uno

Gebruikers-avatar
Berichten: 270
Geregistreerd: 30 Dec 2012, 11:42

Re: OLED display met SSD1306

Berichtdoor Rudi » 12 Jan 2019, 19:14

Je hebt de nodige library ofwel niet geïnstalleerd of geïnstalleerd op een locatie die niet door de IDE is gekend.
Makkelijkst is om de library manager te gebruiken om een library te installeren:
Klik in de IDE op Schets > Bibliotheek gebruiken > Bibliotheek beheren (ofwel Sketch > Include Library > Manage Libraries) of nog makkelijker <ctrl><shift>i
De library manager wordt geopend en in het zoekveld type je de naam van de gewenste library (bv. u8g2) en kan je de library binnenhalen en installeren.
Arduinows!
Why do computer programmers confuse Halloween with Christmas? Because Oct 31 = Dec 25
I got 01100011 problems but a bit ain't 00000001

Berichten: 25
Geregistreerd: 24 Jan 2018, 17:03

Re: OLED display met SSD1306

Berichtdoor Est29 » 14 Jan 2019, 13:11

Bedankt Rudi,
De Libary was het probleem. Ik wist niet hoe ik daar mee om moest gaan. Dat is nu gelukt. Heb nu een programmaatje aangepast voor mijn metertje. Het werkt.
Eric.

Terug naar Overige hardware

Wie is er online?

Gebruikers in dit forum: Geen geregistreerde gebruikers en 8 gasten