Help Needed: How To Establish OLED Connection after Boot

I have an OLED in my hilt, and a removable chassis. The oled is connected to some magnetic pogo pins that click into place and connect to the board once the chassis is inserted. The oled and a single led momentary button are setup this way. Is there a way to establish connection to the oled after booting the board, when it is put in the hilt? I assume I will have to program something, which I am pretty comfortable with the arduino uploading process if that helps. Maybe a blade detect to trigger an OLED update?

I have tested the oled outside of the hilt and booted it up and it works beautifully :slight_smile:

There is currently no support for this in ProffieOS.
However, there is some support for putting the display to sleep and then starting it up again later. With a little modification, the code could probably be modified to do that when blade detect occurs, which would re-initialize the display.

The display sleep currently happens here:

To detect when a blade is present, I guess you would check if prop.blade_present() has changed in SB_NewFont().

1 Like

that’s perfect. I assume waking the display isn’t as easy as calling a single function? I haven’t used any c languages before

First of all, it’s C++, not C.
Also, the coding style of ProffieOS is somewhat peculiar, and makes use of state machines a fair amount.

No, I don’t have a function for that.
In fact, I don’t think “waking up” is the problem.
I think the display code will be running, and won’t really know that the display is not working. So what you would need to do is to make it go back to the beginning and re-initialize the display.

1 Like

Ah, I just meant c languages as in c++ being a derivative of C.
I’ll see if I can make it re-init and keep this thread updated :slight_smile: Thanks for the help! (And for making the board and everything! I had a bit of a geek-out moment when you replied :joy: )