Don't like ads? Help support the Mercs by becoming a Supporter or Auxiliary Member today!
Official Members also get to use the forum ad-free - so kit up and join us!

 electriFi tutorial: build your own OLED display

  • 63 Replies
  • 5329 Views

LightningLion


    *
  • 154
  • Electronics are my thing
Re: electriFi tutorial: build your own OLED display
« Reply #45 on: Sep 04, 2020, 08:00 AM »
You can expand the lower square (or scroll through it) to read what's causing the problem during compilation.
Maybe the required libraries are not downloaded? I think Adafruit changed recently (last months) how their library works and now you need to download the Adafruit BusIO for the Adafruit GFX/SSD1306 to work. Check that first, and if it doesn't work paste here the message you got.

« Last Edit: Sep 04, 2020, 09:15 AM by LightningLion » Logged

Matchstick1021


    *
  • *
  • 512
  • Your Daily Splash of Orange
Re: electriFi tutorial: build your own OLED display
« Reply #46 on: Sep 04, 2020, 08:44 AM »
I have the other two libraries that are required downloaded but I donít know about that third one, Iíll give it a try and see what I get! Thank you!

I also now see what you mean about scrolling through the lower box *facepalm*

Edit:
it turns out thatís exactly what I needed to do! Thank you! Just install that extra library (Adafruit  BusIO)

Works like a charm thank you for the great tutorial!

« Last Edit: Sep 04, 2020, 10:29 PM by Matchstick1021 » Logged
Sucking at something is the first step towards being sort of good at something.
MMCC#2424
Rancor Clan
Traffic Cone #38

Fi-8015


    *
  • *
  • *
  • 2916
  • Awards 40% increase or more Award for 10 official invasions.
Re: electriFi tutorial: build your own OLED display
« Reply #47 on: Sep 07, 2020, 11:46 AM »
Great that you figured it out already, thanks Lion!

I'll add that point to the tutorial.

Logged
Helmets for Sale in the Trading Station

electriFi - Mando Electronics English / German
Re: electriFi tutorial: build your own OLED display
« Reply #48 on: Sep 26, 2020, 03:22 AM »
Hey everyone. So I'm attempting to make one of these, and I have a SH1106 module, because the 1.3in size fits my gauntlet well.
I don't think the 1306 version comes in this size, so I'm trying to make what I have work. Here's the link to what I have
https://www.amazon.com/gp/product/B073VD6W1H/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1

Does anyone know how to get this to work? So far no library has made any difference, it just sits there with a blank screen.
I've been trying to troubleshoot but so far I cannot get anything to print to the screen.

I'm also using these knock off arduinos, but I have updated the drivers on them.
https://www.amazon.com/gp/product/B0713XK923/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1

Any help would be fantastic!

Logged

Fi-8015


    *
  • *
  • *
  • 2916
  • Awards 40% increase or more Award for 10 official invasions.
Re: electriFi tutorial: build your own OLED display
« Reply #49 on: Oct 01, 2020, 09:49 AM »
You'll need to use the 1306 driver library and replace all commands specific to the 1106 lib.

Logged
Helmets for Sale in the Trading Station

electriFi - Mando Electronics English / German
Re: electriFi tutorial: build your own OLED display
« Reply #50 on: Oct 01, 2020, 08:26 PM »
I did try that, but the screen remains blank.
It may have something to do with the display command I had to change. I changed it from :
Adafruit_SSD1306 display(8,9);
To
Adafruit_SH1106 display(OLED_RESET);

The example from the 1106 library I found uses that as its display, if I use the (8,9) one, it throws this error.
Arduino: 1.8.13 (Windows 10), Board: "Arduino Nano, ATmega328P"


Targeting___Target:13:28: error: no matching function for call to 'Adafruit_SH1106::Adafruit_SH1106(int, int)'

 Adafruit_SH1106 display(8,9);

                            ^

In file included from D:\Code\Mando OLED\Targeting___Target\Targeting___Target.ino:1:0:

D:\New folder (4)\Arduino\libraries\Adafruit_SH1106-master/Adafruit_SH1106.h:145:3: note: candidate: Adafruit_SH1106::Adafruit_SH1106(int8_t)

   Adafruit_SH1106(int8_t RST);

   ^~~~~~~~~~~~~~~

D:\New folder (4)\Arduino\libraries\Adafruit_SH1106-master/Adafruit_SH1106.h:145:3: note:   candidate expects 1 argument, 2 provided

D:\New folder (4)\Arduino\libraries\Adafruit_SH1106-master/Adafruit_SH1106.h:144:3: note: candidate: Adafruit_SH1106::Adafruit_SH1106(int8_t, int8_t, int8_t)

   Adafruit_SH1106(int8_t DC, int8_t RST, int8_t CS);

   ^~~~~~~~~~~~~~~

D:\New folder (4)\Arduino\libraries\Adafruit_SH1106-master/Adafruit_SH1106.h:144:3: note:   candidate expects 3 arguments, 2 provided

D:\New folder (4)\Arduino\libraries\Adafruit_SH1106-master/Adafruit_SH1106.h:143:3: note: candidate: Adafruit_SH1106::Adafruit_SH1106(int8_t, int8_t, int8_t, int8_t, int8_t)

   Adafruit_SH1106(int8_t SID, int8_t SCLK, int8_t DC, int8_t RST, int8_t CS);

   ^~~~~~~~~~~~~~~

D:\New folder (4)\Arduino\libraries\Adafruit_SH1106-master/Adafruit_SH1106.h:143:3: note:   candidate expects 5 arguments, 2 provided

D:\New folder (4)\Arduino\libraries\Adafruit_SH1106-master/Adafruit_SH1106.h:141:7: note: candidate: constexpr Adafruit_SH1106::Adafruit_SH1106(const Adafruit_SH1106&)

 class Adafruit_SH1106 : public Adafruit_GFX {

       ^~~~~~~~~~~~~~~

D:\New folder (4)\Arduino\libraries\Adafruit_SH1106-master/Adafruit_SH1106.h:141:7: note:   candidate expects 1 argument, 2 provided

D:\New folder (4)\Arduino\libraries\Adafruit_SH1106-master/Adafruit_SH1106.h:141:7: note: candidate: constexpr Adafruit_SH1106::Adafruit_SH1106(Adafruit_SH1106&&)

D:\New folder (4)\Arduino\libraries\Adafruit_SH1106-master/Adafruit_SH1106.h:141:7: note:   candidate expects 1 argument, 2 provided

Multiple libraries were found for "Adafruit_GFX.h"

 Used: D:\New folder (4)\Arduino\libraries\Adafruit_GFX_Library

 Not used: D:\New folder (4)\Arduino\libraries\ssd1306

exit status 1

no matching function for call to 'Adafruit_SH1106::Adafruit_SH1106(int, int)'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


I am using this library btw. https://github.com/wonho-maker/Adafruit_SH1106

Logged

LightningLion


    *
  • 154
  • Electronics are my thing
Re: electriFi tutorial: build your own OLED display
« Reply #51 on: Oct 01, 2020, 08:31 PM »
Past the code (at least until the setup) here. And remember to use the
{code}{ /code} tags (with [] instead of {}) in the forum to make it look better.

Logged
Re: electriFi tutorial: build your own OLED display
« Reply #52 on: Oct 01, 2020, 08:46 PM »
I'm a bit confused on how to paste it, but this is the code. I can fix the format if its wrong.
{code}
#include <Adafruit_SH1106.h>
#include <splash.h>
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>


#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels

//I2C
#define OLED_RESET 4
Adafruit_SH1106 display(OLED_RESET);
{/code}

« Last Edit: Oct 03, 2020, 02:27 AM by mikehall419 » Logged

LightningLion


    *
  • 154
  • Electronics are my thing
Re: electriFi tutorial: build your own OLED display
« Reply #53 on: Oct 02, 2020, 08:21 PM »
{code}
---Your code goes in here.
{/code}


Which library are you using? And why would you code that has (8. 9)?
Is it with (oled_reset) that you have your screen blank? Do you have anything wired to the pin 4?

As mentioned before, Adafruit changed a bit how their libraries work for these displays. If you're using wonho-maker library, maybe it's no longer compatible with Adafruit GFX.

But first things first! Maybe you don't know the address of the display. Use this sketch to find your display's address:
https://playground.arduino.cc/Main/I2cScanner/

Logged
Re: electriFi tutorial: build your own OLED display
« Reply #54 on: Oct 04, 2020, 03:33 PM »
Thanks!
So I uploaded the sketch, and the serial monitor reports
{code}
I2C Scanner
Scanning...
{/code}
But that is all it seems to do on mine. Unless it takes a long time?

Also, as a side note, I did find ONE 1306 OLED in 1.3in over on Adafruit.
https://www.adafruit.com/product/938
So in case anyone wants to avoid this hassle.

I bought one, but I still want to figure out how to make this one work.

Logged

LightningLion


    *
  • 154
  • Electronics are my thing
Re: electriFi tutorial: build your own OLED display
« Reply #55 on: Oct 04, 2020, 03:57 PM »
It shouldn't take long. Are you sure you have wired it correctly?

Logged
Re: electriFi tutorial: build your own OLED display
« Reply #56 on: Oct 04, 2020, 04:09 PM »
Okay so my breadboard is a bit wonky, so I rewired it. But now it says-
{code}
Scanning...
No I2C devices found
{/code}
-over and over again.
This means its connected right, right? Or should I solder it together to be sure?

Logged

Fi-8015


    *
  • *
  • *
  • 2916
  • Awards 40% increase or more Award for 10 official invasions.
Re: electriFi tutorial: build your own OLED display
« Reply #57 on: Oct 05, 2020, 03:12 AM »
I'm sorry for what I wrote earlier, of course you need to use the sh1106 library and replace all commands from the ssd1306 library. But it seems you already figured out that I was confused.
I don't know what the other libraries are for, but I guess you'll need the BusIO lib too.
As far as I can tell for now the rest seems fine besides that.
The errors seem to origin from the fact that the function expects to get one value but you supply two (8,9). The code including the "OLED_RESET" should be fine, what happens if you use that one?
I can't help with the I2C Scan, I never had to use it. You should be completely sure that the pins are connected, in cases like that I use a multimeter to check if the connection is the problem.

Logged
Helmets for Sale in the Trading Station

electriFi - Mando Electronics English / German
Re: electriFi tutorial: build your own OLED display
« Reply #58 on: Oct 05, 2020, 03:22 AM »
Hey! So I just tried adding the BusIO lib, but that didn't do anything. The screen remains off, and dark.
On the back of the OLED, the address does say you can use 0x7A, or 0x78, but neither of those work either.
I'm quite stumped here!

Logged

LightningLion


    *
  • 154
  • Electronics are my thing
Re: electriFi tutorial: build your own OLED display
« Reply #59 on: Oct 05, 2020, 03:36 AM »
The selectable address works this way: You solder the resistor between the center pad and the lef or right pad. That would define the address.
In the picture of the Amazon link you posted the resistor is in the right address (Can't tell if 0x7B or 0x78). In any case, I always use the I2C Scanner to make sure the address in the display is the one it says. it should find devices very quickly.

Wiring is the same it was for the 0.96" display, but double check it.

Post your full code here. And if everything else fails, just try a different library.

Logged
 


Don't like ads? Help support the Mercs by becoming a Supporter or Auxiliary Member today!
Official Members also get to use the forum ad-free - so kit up and join us!




Powered by EzPortal
anything