DIY Arduboy - problem with SH1106 screen


#1

Hello,
Its my first project on Arduino. I get Pro Micro and this screen:

https://www.aliexpress.com/item/1-3-inch-128X64-OLED-display-module-white-7-Pins-SPI-interface-DIY-oled-display-compatible/32831358389.html

Seems that I have problem with libraries:

https://i.imgur.com/Hn4Qsz2.jpg

Screen works fine with arduino uno and U8glib libraries.

Any idea how to fix this issue?


(Scott R) #2

Check your ClK & MOSI orientation I had similar garbled screen after accidentally mixing them up on a screen labelled D0 & D1


#3

Screen->Board

GND->GND
VCC->VCC
CLK->14
MOSI->16
RES->6
SDC->4
CCS->GND

Did I made any mistake?

I worked according to - http://www.instructables.com/id/DIY-Video-Game-Using-Arduino-Arduboy-Clone/


(Scott R) #4

If I’ve read the item description correctly the screen you have is a SH1106.
I believe @Mr.Blinky has experience with these…

For reference the following topics may be of use:


#5

I found this topic:

https://community.arduboy.com/t/custom-hardware-oled-sh1106-screen-vs-ssd1306/312

Main question for me is how I can make it work : )

  1. Just download Arduboy library again and replace core file with this one
  2. Will this work with Arduboy game loader?

#6

Ok, now I`m confused.
I flashed withone of the example from library that @davidperrenoud edited but screen now is completely black. Should I change wiring now? If yes, how? I dont want to damage anything.


#7

The SH1106 OLED display does not support auto column and page address range increment. It requires page and column addressing. The standard libraries depend on the column and page address range feature. That’s why you only see display changes on the 1st 8 pixel rows (== 1st page)

For a quick fix. Make a portable Arduino version and install my board package

You can also use the board package with an installed version of Arduino. But in that case make sure the Arduboy and Arduboy2 libraries are removed before installing the board package (they are included with board package with the additional support for different displays)

In either case after the package is installed go to Tools > board > Arduboy and then Tools > variant >> Pro Micro with SH1106 and upload your sketch.


#8

Thanks a lot for clear explanation and your modifications. Now screen works fine : )


#9

Only last question. Is it possible with this screen to upload other sketches and games than my or examples? If I will use official Arduboy games loader screen will not work correctly. Any way to allow Arduino IDE compile zip files with other games?


#10

Yes you can as long as the sketch or game use the Arduboy or Arduboy2 libraries then youcan download the source and upload it or recompile and export the hex file (Sketch > Export compiled binary then Sketch > show sketch folder) so it can be uploaded using an upload tool.

Arduino IDE does not build to zip files. So you’ll have to do that manually.


#12

I get back to my project after some time. I want to mount console in small case, so I had to cut some of the display PCB but I did not damage any components. I flashed again with settings you recommended, but it is working as you may see:

I checked wiring, I tried to flash with different settings but now I have no idea what happened. Do you know if I may fix it or if anything is damaged? How I may check what is wrong?


#13

Looks like you didn’t select a board with SH1106 display support.


#14

Yes, I thought the same. I tried to flash different code, not for arduboy and arduboy again and did not helped. I tried different displays options, but result is the same. Any idea what else I may try?


#15

you could try one of my test toy hex files

If there is a hardware issue. I’d suspect the DC signal. Check if it is (properly) connected and there are no shorts.
On your display It looks like the display doesn’t receive the page commands and everything is displayed on the first row (page) only.

EDIT:
in your display picture, it is the pin with SDC discription


#16

I resoldered SDC wire but this didnt solve the problem. How I may use this HEX file?


#17

If you can’t upload it using an existing uploader. you can use avrdude. I’ve made a python script uploader to make it easier.


(Pavlov Roman) #18

Greetings to all!

I had the same problem. I’m not sure I’ll get an answer, but I’ll try to ask.
When I was making an arduboy clone I knew I needed “7 pin SPI OLED” and nothing else. Of course I have nothing worked immediately. I found how to solve the problem, the display began to work correctly.

Unfortunately not all games are displayed correctly, this problem I have not fixed. For example: Mystic Balloon, Circuit Dude, and MicroCity work fine, but Castle Boy, EVADE 2, and Dark and Under run with a display error.

If my DIY Arduboy didn’t work at all, I would understand, but display problems sometimes happen and sometimes don’t. The irony is that the best games don’t work.

I will definitely buy a SH1306 OLED display, but if there is a way to solve my problem I will be very happy.

arduino%20screen


(Simon) #19

If you cannot get this to run then you better get the correct screen! :slight_smile:


(Pavlov Roman) #20

So what happened is that I bought a lot of these displays, I would not want to buy as many others, there must be a reason why the display does not always work correctly?


(Simon) #21

Sorry, I do not know but maybe @Mr.Blinky or @uXe can chime in.