For those of you running into error messages. the below may help. I solved this error message by running the I2C scanner, found my OLED is on 0x3d. I didn't know how to specify the address which I guess in the example finds it by default. What worked for me is: oled = SSD1306_I2C(128,64,i2c,addr = 0x3d) I hope this spares others the pain I had. I thank you all for your help. Much appreciated. This is the error I was getting. Searching the internet, I see others had the same problems and all the posts I read just ended without satisfactory resolution. MPY: soft reboot Traceback (most recent call last): File "", line 24, in File "/lib/ssd1306.py", line 110, in __init__ File "/lib/ssd1306.py", line 36, in __init__ File "/lib/ssd1306.py", line 71, in init_display File "/lib/ssd1306.py", line 115, in write_cmd OSError: [Errno 5] EIO
@RCWalletVacuum10 ай бұрын
Thanks for posting this very helpful solution!
@Sal-o3v4 күн бұрын
@jbemont72 what is I2C scanner and how do you run it ur code isnt fixing my issue unfortunately, and what does 0x3d mean. Edit I found a solution would still like answers to the previous questions if possible, pls and thank you community. Problem: MPY: soft reboot Traceback (most recent call last): File "", line 6, in File "/lib/ssd1306.py", line 110, in __init__ File "/lib/ssd1306.py", line 36, in __init__ File "/lib/ssd1306.py", line 71, in init_display File "/lib/ssd1306.py", line 115, in write_cmd OSError: [Errno 5] EIO Solution: commentor Francisco Cruz code worked for me
@shadowbrookmedia Жыл бұрын
Hi Paul, just quick note of thanks and encouragement. I am a retired EE trying to learn a few new tricks. I don;t normally like video tutorials - not how I learned for many years. Too many host with heavy British or Packi accents. I'm from the deep south and basically speak the King's English (the King is Elvis) We speak very slowly down here and most people don't know, we listen very slowly as well. As I age my hearing is flattening out making some dialogues difficult to follow. Yours is spot on for me!! A year or so or go I had two massive strokes. (according to brain scans - I had no idea) No motive issues - all damage inside my head - the attention span dropped dramatically and memory issues surfaced. Was writing Python code for medical products -but had to quit - added too much stress to trying to work and keep a schedule. Now that I'm coming back with the Arduino things are clearing up and making sense again. Your patient approach is very helpful. Keep it up and thanks again
@rickbonari4493 Жыл бұрын
I am legend. Figured out how to do this and like you I love these little displays. They have alot of capabilities to enhance projects and are fun to experiment with to boot. I don't post anything to youtube but I can assure you I was able to do this. Had to do some research. Thanks for a great series on pico w. No one on the internet can match your knowledge and teaching capabilites and explain things in a clear and concise way like you do !!!! Thanks again. You are the very BEST !!!!!
@paulmcwhorter Жыл бұрын
LEGEND!
@edSabio5726 ай бұрын
Hi Paul! Just revisiting your lesson for lesson 78. The second time around found things missed the first time...Thanks Again!
@svsv97 ай бұрын
Hope Ant had had a sip of ice coffee too.. This video helped me a lot. spend a day testing other samples could not make it work till this lesson. Thanks.
@Ed-fv9rl Жыл бұрын
Thanks Paul! This was my longest lesson but most productive. Had to download the ssd1306 directly, without the tools menu and used pin 0 and 1 to make it work. Still here.
@stephenhawes-wf4cn24 күн бұрын
Thanks Paul that worked
@WACkZerden Жыл бұрын
bravo Great Lesson. Thank You for taking the time to show the basic functions of the display/library.
@paulmcwhorter Жыл бұрын
Glad it was helpful!
@masman1st6 ай бұрын
Been doing these with the Pico W Sunfounder kit. "They are great by the way!" Recently purchased some ESP32 wroom dev boards, so thought I would give them a try. They are not as ready to go as the Pico W out of the box. But after a little research I was able to do this on the ESP32 in Thonny with the same script for the Pico W. Gitty Up!
@cbrombaugh Жыл бұрын
I AM LEGEND! I like the SSD1306 display. When I received mine I studied enough to learn its basic operation. My 50 pixel circle is missing a top and bottom, but my 25 pixel version fits the screen fine (although somewhat oval). Thanks Paul for showing us how to use this little display.
@paulmcwhorter Жыл бұрын
LEGEND!
@Bob-zg2zf Жыл бұрын
So beautiful. The scenery. I mean The River Nile.
@practical_precision_shooters Жыл бұрын
great video Paul!
@stephenlightkep1621 Жыл бұрын
Thanks Paul! That was really cool.
@paulmcwhorter Жыл бұрын
Glad you liked it!
@doctorzak11 күн бұрын
Tried everything to get this to run, different GPIO pins, different OLED and then ... I remembered that on some of my breadboards the voltage rails aren't continuous from one end to the other - there is a break in the rails about halfway along(as manufactured!). Once I realized this I was able to rewire and everything worked fine!🙂
@davidkahan2 ай бұрын
worked ! even without the ant :-)
@louistoweill42329 ай бұрын
I replaced the OLED display with a new one and the circuit worked this time.
@videonewschannel121210 ай бұрын
Here is a solution to the non-working OLED issue many have been experiencing. After finding out that my uctronics OLED display works fine on the Arduino platform and is not discoverable (I2c.scan() returns null) on the pico w platform, I thought perhaps it is a voltage issue since Arduino runs 5V and pico 3.3V. Problem solved by powering your OLED Vcc with 5V from any 5V source (eg. arduino board or breadboard power supply). Just remember to tie the grounds together (Pico w and other source). This also allows you to use any of the I2C channels (0,1) ... Bottom line its either a hardware issue specific to the UCtronics OLED which is sold on Amazon or the pico 3.3V is not quite 3.3V. The UCtronics OLED device documentation states it works 3.3 to 5V but apparently not. Thanks Paul for your suggestion of I2C.scan()
@todd3c Жыл бұрын
I have 2 dds1306(s). how do I change the address of the 2nd one so I can define both and have 2 different displays going? thank you.
@larryplatzek9017 Жыл бұрын
Loading ssd1306 does not work for me 12-07-23. Things must have changed, can anyone tell me the correct way to install? Thank you!
@todd3c Жыл бұрын
I just copied it and saved it as ssd1306.py
@EskandarSaraie10 ай бұрын
I got the same problem. not being able to download ssd1306. did you find any solution?
@EskandarSaraie10 ай бұрын
Traceback (most recent call last): File "", line 1, in ImportError: no module named 'ssd1306'
@bigbogeyface Жыл бұрын
Here's my homework: kzbin.info/www/bejne/sKrFnWCAotOgZqs I made three: kzbin.info/www/bejne/oIiTYoKhhNqigac This is my favourite 👇 🌧 😌 : kzbin.info/www/bejne/fnPSnXSqgLGEnpY I also made this: kzbin.info/www/bejne/e5vHdnSVhbCIZ5I I think it's cool 😎 anyhow 🤷
@MartinAlix Жыл бұрын
Great lesson! What happened to that ant? 😂
@diggee172 Жыл бұрын
😅
@louistoweill42329 ай бұрын
Even though I think I followed all the steps exactly, my OLED display does not work and I do not know how to run the I2C scanner if that might help.
@freddyveza Жыл бұрын
Hello Paul! I have a couple of lcd displays lying around, could they work for this future lesson or should I get an oled screen instead?
@paulmcwhorter Жыл бұрын
I would really suggest get the OLED. It has major advantages over the LCD and is only about $5
@freddyveza Жыл бұрын
@@paulmcwhorter Thanks, I'll get one
@ctlancearrowlarson8237 Жыл бұрын
When I go to the package manager, and search ssd1306, I get this message. Could not find the package info from PyPl. Error code:
@paulmcwhorter Жыл бұрын
Your computer appears to be objecting to the security certificate of micropython. Find the library on github, ssd1306.py. Copy it and paste it into thonny. Then save the file to ssd1306.py on your pico. It should then be there for you to use.
@EskandarSaraie10 ай бұрын
"ImportError: no module named 'ssd1306'" does show up after copy and pasting it into thonny.
@ErlankBru2 ай бұрын
Got this smaller screen to work after it seemed my 128×64 display failed me. This is not the homework yet. I will try to start post my homework more often than never.🤭 Here is the link: kzbin.info/www/bejne/bXLZhqqiYqqff80si=pJKICxZewNxups46
@drdentin3215 Жыл бұрын
Hey Paul. A very off topic question. You appear to live in a dark sky area. Do you check out the stars, milky way, planets,nebula?
@paulmcwhorter Жыл бұрын
I had a telescope as a kid, but it never turned into a passion for me. So no, no atronomy going on here.
@freddyveza Жыл бұрын
Looks like I messed up during my bought and got an SH1106 1.3" screen, gotta make it work with a different driver, cause my SSD1306 is really small, just 0.69"...
@stephenhawes-wf4cn25 күн бұрын
Hi Paul when I search on pypi for the ssd1306 library it comes up with no results can you help please ?
@paulmcwhorter25 күн бұрын
Thonny has changed the way it searches. Watch me do the search again, but look at exactly what the library is called, and search on that.
@davidh118710 ай бұрын
My OLED does not work with channel 1 Pins 2 and 3 (throws lots of ssd1306.py errors) but it does work channel 1 pins 6 and 7 as well as channel 0 pins 0 and 1
@EskandarSaraie10 ай бұрын
installing it come up with version 0.1.0 version only and error while loading it!
@arnoldschmucker9977 Жыл бұрын
Redid it based on Paul's suggestion. kzbin.info/www/bejne/ap26iXx4hdx0bsU
@paulmcwhorter Жыл бұрын
LEGEND!
@chikhimngi Жыл бұрын
hello Paul. Do you have any courses about Django?
@deeperlook3234 Жыл бұрын
Kudos for the comprehensible explanation! But did you realize you had a bug? 😁 You can clearly see it escaping from the display to the right at kzbin.info/www/bejne/bITHf6mnpMuKrdk
@paulmcwhorter Жыл бұрын
Great video. Thanks.
@keithlohmeyer Жыл бұрын
Here is my deep dive into ways to plot a circle. kzbin.info/www/bejne/aYfVoIqYZb-lack I show 6 different algorithms and time each to see which is fastest.
@paulmcwhorter Жыл бұрын
Very interesting. Lots of ways to skin this cat.
@AviSchwartz18 ай бұрын
For me channel 1 gives an [Errno 5] EIO error while channel 0 works fine.
@paulmcwhorter8 ай бұрын
Dont understand why, but seems some OLED only work on channel 0 for me. Not sure what is going on.
@PMART773 ай бұрын
This also worked for me. Using GPIO pins 4,5 and channel 0 remedied the issue immediately.
@keithlohmeyer Жыл бұрын
Looks like I am 3rd to post a video showing the the built in method. kzbin.info/www/bejne/o5icl3V-nauEo9k Charlotte and Lori got the jump on me as I was doing a deep dive into ways to code a raster circle. That video will post shortly. Thanks Paul for all you do.
@EskandarSaraie10 ай бұрын
ssd1306 does not work by following your instructions, any help?
@robertbowman659910 ай бұрын
The installation failed in Thonny. I prefer VS Code. I created a venv in my work directory python3.10 -m venv pico_code cd pico_code . bin/activate python3.10 -m pip install pipkin then with neither thonny or code connected pipkin install micropython-ssd1306. pipkin detects the Pico board and installs /lib/ssd1306.py connect with VS Code and run the example. it may have been my wiring but I wound up using I2C0 sda/scl on physical pins 1 and 2 so I have i2c = I2C(0, sda=Pin(0), scl=Pin(1), freq=400000) The rest is the same. I don't know why the install from Thonny failed There were a lot of cryptic errors. I had also downloaded ssd1306.py and copied that to the Pico. I think at that time I had a wiring problem since it failed in write_cmd() It took a lot longer than it should have but I did learn about pipkin which seems to be a relatively easy way to install libraries without thonny.
@EskandarSaraie10 ай бұрын
down loading ssd1306 does not work.
@pralaymajumdar120611 ай бұрын
Just one symbol I want to share with you sir that is❤..
@zacremboldt9160Ай бұрын
Homework completed! 🎉 kzbin.info/www/bejne/qmGQYXuEo9egaNk Made a fun spinning circle by painting pixels in a loop.
@paulmcwhorter29 күн бұрын
LEGEND!
@nigelworwood8530 Жыл бұрын
At 17m30s I think I saw a bug in the system😁
@WilliamBurlingame Жыл бұрын
I'm not uploading a video since I let BARD (Google's AI) helped me with the solution. BARD gave me a function for a filled circle. Changing the
@paulmcwhorter Жыл бұрын
Interesting approach, and very different than my solution. Mine is based more on simple math. This is sort of try all possibilities, and keep the ones that match the conditions.
@keithlohmeyer Жыл бұрын
@@paulmcwhorter OK simple as in easy math to code or simple as in NOT needing the math module? I took a deep dive and I am trying to wrap my mind around midpoint circle algorithm and the Bresenham circle algorithm that use addition, subtraction and multiplication to define the pixels for a circle.
@paulmcwhorter Жыл бұрын
Really, I see the simple way to do it is just step through the angles 0 to 360 and then calculate the x and y value of each pixel. x=r*cos(angle) and y=r*sin(angle). Simple as that. All the solutions I have seen so far do special cases for the different quadrants, but above approach does it all in one for loop. You do need to then adjust x and y to get the circle in the middle of the display.
@keithlohmeyer Жыл бұрын
@@paulmcwhorter Yes that will work ok with the more powerful mcu like the Pico. Doing 360 sin and cos functions can slow an old 8 bit mcu down even in Arduino C++. I am going to try doing some timings for the different algorithms and post a video. Someone used the sin and cos method to draw a small circle for the degree symbol. Because it was so small the circle was represented by maybe a dozen pixels. It worked but that was a lot of processing for so few dots.
@WilliamBurlingame Жыл бұрын
@@paulmcwhorter You haven't introduced any math libraries. I was planning to give a Sunfounder kit to my 11 year old great grandson and suggest the course to him. I doubt that he has had any trig.
@hoellenstein8 ай бұрын
Today, I received the tiny display. Eager to connect it, loading the library, writing the code, checking all parameter and voila, it didn't work. Received only cryptic error messages. My OLED display is on 0x3c, on the backside of the oled one can see it and figure that out (if you have perfect eyesight or a magnifying glass) Others in this comment section tried different addresses but no success for me. Eventually, after couple of hours frustrated re-connecting, re-wiring, trying to download different libraries, connecting to different GPIO Pins, it worked. So, i2c = I2C(0, scl=Pin(17), sda=Pin(16)) was it for my tiny displays. To draw a circle, I know there are certain formulas to use, but I simply asked chatGPT and the code worked immidiately. I know, I cheated this time... 😝
@karliskide2460 Жыл бұрын
Thank you for the amazing lesson! This homework took me a while. Anyways - here is my homework assignment: kzbin.info/www/bejne/r4DSXnaJlLtmo9E
@davidh118710 ай бұрын
Didn't know the math to generate the points of a circle so had to look it up which effectively gave the whole solution - not sure that is worthy of posting a video for what would have effectively been a copy and paste...... Found 2 solutions - one for a filled circle and the other just for the outline. Here is the solution for the record kzbin.info/www/bejne/npCxhX2wja6tb5Y
@paulmcwhorter10 ай бұрын
LEGEND!
@DrDave327 Жыл бұрын
Hey, Paul! More great content from you, as usual. Thank you. Here is my solution to the homework: kzbin.info/www/bejne/havKe6afe6lrl7M
@paulmcwhorter Жыл бұрын
LEGEND!
@keithlohmeyer Жыл бұрын
Nice job. Thanks for all the mentions but I have not posted my video yet. I am digging way too deep on this. I think my comment thread on William's video might have confused you.
@MrTrollified Жыл бұрын
You resemble James Cameron
@Sal-o3v4 күн бұрын
Problem: ssd1306 does not show up to download. Solution1: Bottom right of screen button make sure its routed to your Pico. Solution2: Check comments some people say you can download it into Pico I think from github idk. Note: Make sure you type in the whole thing. (micropython-ssd1306) Video solution here \/ kzbin.info/www/bejne/bF6QeYykd798rJY M/D/Year 2/5/2025
@LorisHW Жыл бұрын
A bit "under the weather" this week. Finally got this homework done. Thanks for the lesson Paul! kzbin.info/www/bejne/Y523hpKYht6HkLc
@daveslack275511 ай бұрын
Love these displays. Can't take credit for this homework. New the circle math involved sin and cos but could not remember it and had to google for the calculations. Then had to study them and understand before using. homework kzbin.info/www/bejne/ZpDGk4yPjtlqnsk
@qzorn4440 Жыл бұрын
What a wonderful little display at the right hobby price. 🪐 Thank you.
@larryplatzek9017 Жыл бұрын
this PRIME day 2023 sales on KEPLER kit!
@abdirahmanjama92904 күн бұрын
my oled display is not working at and when i clicked Run the software it reads as follows: Traceback (most recent call last): File "", line 6, in File "/lib/ssd1306.py", line 119, in __init__ File "/lib/ssd1306.py", line 38, in __init__ File "/lib/ssd1306.py", line 75, in init_display File "/lib/ssd1306.py", line 124, in write_cmd OSError: [Errno 110] ETIMEDOUT >>>
@georgewade89313 күн бұрын
I had exactly the same errors. Try: SDA on pin 16, scl on pin 17. Change the code to: i2c=I2C(0,sda=Pin(16),scl=Pin(17),freq=400000) Notice the 0 not a 1 at the beginning there.
@videonewschannel1212 Жыл бұрын
using identical hardware and library/ code we get library error File "", line 7, in File "/lib/ssd1306.py", line 110, in __init__ File "/lib/ssd1306.py", line 36, in __init__ File "/lib/ssd1306.py", line 71, in init_display File "/lib/ssd1306.py", line 115, in write_cmd Anyone have suggestions! I even tried a second new 1306 display!
@LeGoat23Lakers7 ай бұрын
I had the same problem. I solved it by moving the sda and scl to channel 0 and change the code. from machine import Pin, I2C from ssd1306 import SSD1306_I2C import time i2c = I2C(0, sda=Pin(0), scl = Pin(1), freq = 400000) dsp = SSD1306_I2C(128, 64, i2c) msg = 'Hello World!' dsp.text(msg, 0, 0) dsp.show() Hope this helps
@320mb3 ай бұрын
Here is my Code for Posterity ... for some reason I have to include Pin(16) which is a TX pin... not sure why yet but i am going to research this and find out.... LOL from machine import Pin, I2C import sh1106 i2c = I2C(1, scl=Pin(15), sda=Pin(14), freq=400000) display = sh1106.SH1106_I2C(128, 64, i2c, Pin(16), 0x3c) display.sleep(False) display.fill(0) display.text('Hello, world!', 10, 10, 1) display.show()
@Miko_Jones6 ай бұрын
Hi, I realise I'm a year late with my homework, but the dog ate it! 😂 well here it is anyway! I realise Paul hasn't introduced us to the math library in micropython yet but a I figured there must be one and a quick google search turned up the results. I hope using google isn't cheating, if it is, then I'm an unrepentant cheat! import math from machine import Pin, I2C from ssd1306 import SSD1306_I2C i2c=I2C(1, sda=Pin(2), scl=Pin(3), freq=400000) dsp=SSD1306_I2C(128,64,i2c) msg="Hello World!" msg2="its Circle time" def draw_circle(x0, y0, r): # Calculate the angle step for the circle approximation angle_step = 0.05 # Adjust for desired precision angle = 0 # Start angle angle_end = 2* math.pi #end angle while angle < angle_end: x = int(x0 + r * math.cos(angle)) y = int(y0 + r * math.sin(angle)) dsp.pixel(x,y,1) # Draw a pixel at x, y angle += angle_step dsp.text(msg,0,0) draw_circle(64, 32, 20) dsp.text(msg2,0,56) dsp.show()
@FranciscoCruz-jg7gc4 ай бұрын
This is my solution to the error people comment about: import machine import ssd1306 from time import sleep i2c = machine.SoftI2C(scl=machine.Pin(3), sda=machine.Pin(2)) reset_pin = machine.Pin(16, machine.Pin.OUT) reset_pin.value(0) sleep(0.1) reset_pin.value(1) dsp= ssd1306.SSD1306_I2C (128, 64, i2c) dsp.fill(0) msg='hello3 World' dsp.text(msg,0,0) dsp.show()
@ErlankBru2 ай бұрын
I'm still getting this error, maybe I should buy another oled and see... : MPY: soft reboot Traceback (most recent call last): File "", line 10, in File "/lib/ssd1306.py", line 119, in __init__ File "/lib/ssd1306.py", line 38, in __init__ File "/lib/ssd1306.py", line 75, in init_display File "/lib/ssd1306.py", line 124, in write_cmd OSError: [Errno 110] ETIMEDOUT