Pico + OLED + Temperature

Posted on
  • Just create my first short example with the awesome Pico board.
    https://github.com/Jorgen-VikingGod/Espr­uino-Pico-Examples/tree/master/OLED

    Pico OLED Temperature

    I will add more examples on GitHub, if my ESP8266-ESP12 shim is arriving from OSHPark:
    https://github.com/Jorgen-VikingGod/Espr­uino-Pico-Examples

  • Wow, looks great! Thanks for posting up... Is that one of the oleds with the yellow band at the top? I've never actually seen one in use.

  • Me neither - and I own three of the damned things :-(

  • :( You having problems using them?

    I've recently fixed a bug in the I2C version of the library that caused random dots to appear - it was a regression from when I added the SPI capability. It might have been causing you problems.

  • Also, nice use of the bitmap logo. I was hoping people would use it like that but hadn't seen anything until now.

  • Last time I tried was a while before you added SPI support, when we were talking about how you need to short two pins together to make them have a prayer of working on I2C, and that made it stop giving I2C timeouts, but the screen remained blank. I haven't had a chance to come back to it since then.

  • Thx ;)
    Yes it is one with yellow band on top. So everything within the first 15 pixels is yellow instead of blue.
    But I'm not really happy about this cheap OLED displays, because they did not have any CS signals. Means you can not add multiple displays on one SPI bus :/
    So I already ordered some with CS for 3.30 USD on aliexpress ;)

    @Gordon I had these random pixels only with the arduino library connected on my Teensy3.1
    It seems, that it depends on the power supply.

    My example just uses the VDD/GND of pico or the pins A5/A7 setting to high/low to give 3.3V
    both is working great without any random pixels.

  • @Jorgen what do I have to search for to find one those displays?

  • but the screen remained blank. I haven't had a chance to come back to it since then.

    Ahh, give it a go now - I changed the initialisation code - there's a lot of extra stuff that could be set up, and some things to do with the charge pump for displays that didn't have a built in power supply. The Arduino library had what seemed to be some much more general purpose initialisation code.

    @JackJamesHoward it's the SSD1306 - see here. There are a few links on that page to EmbeddedAdventures and AdaFruit, but you can find them other places too. You want the 128x64 pixel variant.

  • @JackJamesHoward you can also find on my GitHub README some links to the cheap china/aliexpress displays.

    @Gordon Do you know, what happend on startup. I've noticed that the display is black on startup. I have to connect it by the WebIDE to see something on the display.
    I upload my code and send "save()" everything was flashed and onInit() was called. I disconnect the Pico and reconnect > display black, but internal code is ok (button watch is working)...
    After connect the Pico by WebIDE > display shows content

    Is there something wrong with my initialisation of the SPI?
    source code

  • I've noticed that the display is black on startup

    No, it's an issue with the current version of the firmware. If you power it from a USB power supply then it should work first time? It's fixed in the USB HID firmware, but there's still a bit of work to do before I do a full release of that.

    The issue is that when the Pico is connected to a PC, there is a USB connection made, but the PC is not reading any information the Pico transmits - so the pico just 'stalls', waiting for the characters to be read.

  • If you power it from a USB power supply then it should work first time?

    Yes, if I connected to USB Powerbank it lights up, there are still some strange issues - could be something with my code - I have to check again.
    But if I connect it to USB port of my Mac, nothing happens...
    Only after connect USB device by WebIDE.

  • Yeah... If you get the firmware from here it shouldn't do that unless you print a lot of text - those changes will work their way to a release at some point in the future, but those were big changes so it'll take a while before I'm happy :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Pico + OLED + Temperature

Posted by Avatar for Jorgen @Jorgen

Actions