Generating bitmaps to display on 1-5-and-2-1 monochrome - 128x64 oled

Hey guys I am still fresh in this programming field which I find it more interesting and now I have a several problem and I would appreciate if I can get help from any of you :grin: …so i am using particle photon, 1-5-and-2-1 monochrome - 128x64 oled and capacitive touch CAP1188 and Adafruit ssd1305 library to draw pictures on my OLED

Now I have been trying to generate bitmaps using LCD assistant software which is successfully generating it but when I place that generated bitmap into my code to display it in form of a readable picture it appears in truncated form even if I change a draw mode from horizontal to vertical.

I then tried “image2cpp” and still get the same truncated picture.

Can anyone please help me with any sight info on what should I do to get the bitmap drawn correctly in my OLED?. your help will be much appreciated.

And also I want to scan wifi around me and display list of them in my OLED so that a user can choose which wifi to use and I am using the code that I found from particle document.

void uiScreenWifiDrawHandler(Adafruit_SSD1305 &display, void *data) {
        display.clearDisplay();
        display.setFont(font);

        WiFiAccessPoint aps[20];
          int found = WiFi.scan(aps, 20);

              for (int i=0; i<found; i++) {
                  display.setTextSize(1);
                  display.setTextColor(WHITE);
                  WiFiAccessPoint& ap = aps[i];
                  display.println(ap.ssid);
              }
}

I can find them but they are displayed on top of another and I don’t know how I can make them to be displayed in a list form

Thanks

I suppose you’ll have some job displaying up to 20 APs on a 128x64 pixel display without employing some kind of scrolling.
For that you should store the found SSIDs in a global array and then have some function to allow scrolling and selecting the ones you can actually fit on the screen.

BTW, I’d move the setTextSize() and setTextColor() calls out of the loop (actually out of the function for above reason) and then you may also want to specify the cursor position before you start printing.
I’m also not sure println() does actually move the cursor one line down, but even if it did, the default linefeed might not be what you want, so explicitly setting the starting coordinates for each line would remove all doubt.

1 Like