Doing an install with an oled in the Emitter section. Oled is wired through a 7 rail PCB (other 3 conductors are for blade). When I power up my chassis and put it in the hilt screen works fine. AS SOON as a connection to the PCB is severed )ie chassis is removed) the screen no longer works. Ive noticed also that if I do not put the chassis in the hilt JUST after boot, the screen does not work either. My ASSUMPTION is that if the board does not see a screen during boot up , it does not initiate display. And also when the board sees a screen disconnect it does the same. Wondering if there is an ‘always on’ line of code I can use or if any of you have thoughts.
This isn’t really supported. ProffieOS used to completely freeze if it thought you had a display, but you didn’t. I made that better, but there is no support for connecting or disconnecting a display while ProffieOS is running.
That said, it may be something I can add support for. All that should be needed is to re-initialize the display if an error occurs… maybe…
ANy tips on where to start digging around in the code to look for a re int in case of error? Just to start poking around…
This is where the display init starts.
Awesome thanks prof!
Maybe something like this, that will display on after 4 seconds after loop is called
void loop() {
oled.ssd1306WriteCmd(SSD1306_DISPLAYOFF);
delay(4000);
oled.ssd1306WriteCmd(SSD1306_DISPLAYON);
delay(4000);
There are several things wrong with this.
- There is no “oled” object, no ssd1306WriteCmd or SSD1306_DISPLAYOFF in proffieOS, but I can interpret that as pseudocode meaning “send displayoff command to oled”.
- After the display have been off and unpowered, we need to set up all of it’s internal registers, not just turn it on again.
- calling
delay(4000)
from loop() will freeze proffieOS for 4 seconds.
Yeah, delay
is generally a no-no I’ve learned.
FYI millis()
holds the running time since the board has booted, and can be used in combination with a variable to check how much time has gone by