How to use SSD1306 128x64 OLED Display I2C with Arduino code

Поділитися
Вставка
  • Опубліковано 27 жов 2024

КОМЕНТАРІ • 118

  • @dalexdba1
    @dalexdba1 3 роки тому +2

    Thankyou for my first breakthrough with the i2c and display types!

    • @robojax
      @robojax  3 роки тому

      You are welcome.

  • @georgbachmayer2493
    @georgbachmayer2493 4 роки тому +1

    Thanks, I tried many codes and I never got it to work. This works like a charm.

    • @robojax
      @robojax  4 роки тому

      You're welcome!

  • @EduardoAntonine
    @EduardoAntonine 4 роки тому +2

    Thanks! I finally used the display as I wanted

    • @robojax
      @robojax  4 роки тому +1

      You are welcome. Thank you for not skipping the ads and keep watching them. This will help me a lot.

  • @qzorn4440
    @qzorn4440 3 роки тому +1

    i really like the circle overlay on an image, looks cool and could be used as a warning or pluses, etc. thanks a lot... 😀 this display would be nice with the esp32 module...:)

    • @robojax
      @robojax  3 роки тому +1

      You're welcome 😊

  • @OscarTheProfessor
    @OscarTheProfessor 4 роки тому

    thanks man...i have been struggling with others tutorials... then i finally find you... thank you very much

    • @robojax
      @robojax  4 роки тому

      You are welcome. Thank you for not skipping the ads and keep watching them. This will help me a lot.

  • @sofiale5212
    @sofiale5212 6 років тому +3

    Thank you so much!! The video is very helpful.

    • @robojax
      @robojax  6 років тому +1

      You are welcome.

  • @dorothymatrix4710
    @dorothymatrix4710 2 роки тому

    Excellent video thankyou.

  • @MrOrangeman18
    @MrOrangeman18 4 роки тому +1

    Awesome video and is what ive been looking for. but i cant find your last simple code on your link. any idea where i can find it?cheers

    • @robojax
      @robojax  4 роки тому +1

      Thank you. Please mention time like 3:35 so I look at it. But if it is after the good bye, I don't have it.

  • @ketanmiyatra8529
    @ketanmiyatra8529 4 роки тому +2

    Most interesting and more informative video tutorial!🤖

    • @robojax
      @robojax  4 роки тому

      Glad you liked it

  • @zxn_wsnr
    @zxn_wsnr 3 роки тому +1

    Thanks a lot

  • @ramadhanafif
    @ramadhanafif 5 років тому +1

    Great video, thank you for your effort and time to make this tutorial.

    • @robojax
      @robojax  5 років тому

      You are welcome. I am pleased you found it useful. Ahmad from Canada.

  • @atihrot755
    @atihrot755 Рік тому

    Thank you for your response. I will tell you what the oled pins are. It's a 1.5 inch oled. There are markings. Power supply GND, VCC, SCL, SDA, RES, DC, CS. I read somewhere that some pins are connected and can be used as a 4 pin OLED display. I am asking for your help. There are simpler programs for a 4-pin display. Thank you in advance Attila.
    Odpovedať

  • @CameronCobb
    @CameronCobb 5 років тому +2

    Great video! Just curious, do you know how to increase the refresh rate?

    • @robojax
      @robojax  5 років тому +1

      Thank you. For refresh rate, change the delay in the main loop() function.

  • @donaldhenke2750
    @donaldhenke2750 4 роки тому +1

    Thank you... it worked.

    • @robojax
      @robojax  4 роки тому

      You are welcome.

  • @atihrot755
    @atihrot755 Рік тому

    Have a nice day. Very good video, but I have the same oled display with only 7 pins. Please help how to connect it? Thank you in advance.Attila.

    • @robojax
      @robojax  Рік тому

      Hi, you did not mention the label on the pins. it seems your display is I2C which should have SDA and SCL pin it might be SPI communication which needs 3 wires. I belive there is a library for it. Just Bing it or Google it.

    • @atihrot755
      @atihrot755 Рік тому

      @@robojax Thank you for your response. I will tell you what the oled pins are. It's a 1.5 inch oled. There are markings. Power supply GND, VCC, SCL, SDA, RES, DC, CS. I read somewhere that some pins are connected and can be used as a 4 pin OLED display. I am asking for your help. There are simpler programs for a 4-pin display. Thank you in advance Attila.

  • @mrkubekman
    @mrkubekman 6 років тому +2

    Good video, thank you very much😀

    • @robojax
      @robojax  6 років тому

      You are welcome.

  • @arshadkaabi1056
    @arshadkaabi1056 6 років тому +2

    Thank you for this video

    • @robojax
      @robojax  4 роки тому

      you are welcome.

  • @frdnom9182
    @frdnom9182 3 роки тому +1

    Thanks to you

  • @PinheiroEngenharia
    @PinheiroEngenharia 5 років тому

    First of all, congrats for your project and code. My doubt is how do you set yellow color in the code? Because my display just show in blue. And I saw in the video the word: "values" in yellow. Please help. Thanks

    • @robojax
      @robojax  5 років тому

      that this display has two color. I did not do anything about the color Top few pixels are yellow and the rest blue. It depends on your display.

  • @polskizwiazeknaczelnychhej1100
    @polskizwiazeknaczelnychhej1100 6 місяців тому

    How to change dual color display to one color display. I tested one some time and a had white display. Then I put some code and display changed color to yelow/blue.

  • @ElectroMentor
    @ElectroMentor 5 років тому +1

    Thank alot sir.

    • @robojax
      @robojax  5 років тому

      You are welcome.

  • @quangmi3402
    @quangmi3402 11 місяців тому

    Hi! How to demonstrate up/down counter by OLed?

    • @robojax
      @robojax  11 місяців тому

      OLED does not matter. learn how counter works and then show it on this display. check my video on the counter.

  • @DharmeshTechZone
    @DharmeshTechZone 4 роки тому

    Nice explaination sir thank you

    • @robojax
      @robojax  4 роки тому

      You are welcome. The best thank you for me is to not skipping ads and Subscribing 🔔 to my channel, and liking 👍 the video. It is greatly appreciated. 🔔 😊.
      I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe.😊 .

  • @buiciucdaniel6794
    @buiciucdaniel6794 6 років тому

    Hi, I have a TFT 2.2" with 16 pins in one row. ( GND, 3,3V, CD, RS, WR, RD, RST ,LED, D0-D7 ) . It has RM68130 driver, library and I couldn't make it works. What is wrong in my project? Will you try to make a video about it? Thanks!

    • @robojax
      @robojax  6 років тому

      Hi, if you are referring to this display, www.ebay.ca/itm/272752330255 yes I a have got the module and as soon as the time permits, I will make the video.

    • @buiciucdaniel6794
      @buiciucdaniel6794 6 років тому

      Yes, that one is the item! I'll wait. Thanks!

  • @billglass5160
    @billglass5160 3 роки тому

    I want to attach my oled display module to my box upside down (for convenience). Does the command display.setRotation(2) turn the display upside down too?

    • @robojax
      @robojax  3 роки тому

      Hello, rotation can do it yes.

    • @billglass5160
      @billglass5160 3 роки тому

      @@robojax thank you. I will try it when I receive my new box and oled

  • @CarlosSD
    @CarlosSD 4 роки тому +1

    Thank you very much, that display.display(); was my problem 😆😆😆

    • @robojax
      @robojax  4 роки тому +1

      Glad I could help. you are welcome.

  • @poerwojadoel7992
    @poerwojadoel7992 6 років тому

    Hi Pak Robojax.
    welcome to meet again The previous arduino program is complete and successful.
    You happen to be talking about oled.
    I had a problem until I bought two oled same case. all the programs about oled, I try the results of both display images there are spots and pictures only at the bottom only. What is the problem?
    ask for the solution. Thank you very much

    • @robojax
      @robojax  6 років тому +2

      Hi, Could you share you code here codeshare.io/ and then post the link for your code by replying to this comment? I will look at it.

    • @poerwojadoel7992
      @poerwojadoel7992 6 років тому +1

      I already sent to codeshare.io/

    • @robojax
      @robojax  6 років тому +1

      Post your code and then you will get another Unique link like this codeshare.io/5gOwAD and send that

    • @poerwojadoel7992
      @poerwojadoel7992 6 років тому +1

      Mr. Robojax.
      Oled 1.3 "now it appears full display I do not use library #include , but using #include .
      however I am grateful to you, as you lead little by little so I can think.
      Once again I thank you.

  • @elmergloo3259
    @elmergloo3259 4 роки тому

    I have one of these displays and I just want to use it as a basic serial monitor. Boring I know, but I can't figure out how to do it since these displays don't auto scroll like LCD's ive worked with in the past.

    • @robojax
      @robojax  4 роки тому +1

      I have shown how to display a text and in any position on the screen. So if you want to use like serial monitor, then print a text at top, the next line blow it and so forth. You have to figure out how many lines fit. When the last line reached the bottom, remove the first line, print all the lines ONE line higher. and this way you can continue. For example if you found out that 5 lines fit on the screen (just fills the width of the screen and not more), then make an array of 5 element and fill it up with new lines and display it. When new line comes, more line 1 to 0, 2 to 2, 3 to 2, 4 to 3 and the new line to the 4th. and continue like this. Good luck.

  • @mukeshdas3632
    @mukeshdas3632 4 роки тому

    I fabricated 32x32 OLED display.how i can operate it? which additional circuit/module/driver will be required? thankyou

    • @robojax
      @robojax  4 роки тому

      I have 32x32 module .search my channel for it.

  • @maicomcoelholopes9032
    @maicomcoelholopes9032 5 років тому +1

    muito obrigado, vídeo extremamente útil

    • @robojax
      @robojax  5 років тому

      Você é bem vindo. Fico feliz que você tenha achado útil. Ahmad do Canadá.

  • @edimarolivio9436
    @edimarolivio9436 2 роки тому

    Muito bom! Mas não entendo inglês, . Cornélio Procópio, Paraná, Brazil.

  • @olavmjelde5396
    @olavmjelde5396 4 роки тому

    A very good video

    • @robojax
      @robojax  4 роки тому

      Glad you think so!

  • @sweetleaf7751
    @sweetleaf7751 5 років тому

    Hi which editor did You use if i may ask?

    • @robojax
      @robojax  5 років тому

      it is not the editor. I am using a hardware so I have 3 or 4 video source or camera connected. Here my device called Roland V-1HD proav.roland.com/global/products/v-1hd/

  • @viopklji100
    @viopklji100 4 роки тому

    HI SIR CAN u help me, i have problem with my oled lcd, when i run the ic2 detector, its written not detected. i already connect the pin correctly, but it just wont display, already tried 0x3C and 0x3D. do u have any solution for this

    • @robojax
      @robojax  4 роки тому

      if you don't need the address using I2C scanner, then either module is bad or incorrect wiring.

  • @manaskantmishra7736
    @manaskantmishra7736 3 роки тому

    ok......i got a big issue......my horizontal scrolling command works fine......but the diagonal scrolling functions in adafruit library are giving me no scrolling at all!!!! However if I remove the 1st 3 lines of those diagonal scroll functions, I get vertical scrolling only!!! what could be the problem???

    • @robojax
      @robojax  3 роки тому

      Hello, may be you have wrong x and y value. Switch the values.

    • @manaskantmishra7736
      @manaskantmishra7736 3 роки тому

      @@robojax That's not possible....coz after including the adafruit gfx and ssd1306 library......i ran the same in-built example code "128x64 i2c" as you did.....but no diagonal scrolling......the horizontal scrolling works fine.....but not the diagonal scrolling

    • @robojax
      @robojax  3 роки тому

      I have not looked at code, may be it does not offer such feature. If you know how to position the text then write a “for loop” yo for example write the same text in any way in 5 seconds for example. This is very simple. See my 30 minutes Arduino course and learn the for loop. Good luck

    • @manaskantmishra7736
      @manaskantmishra7736 3 роки тому

      Already did that.....since in my case the in built commands for scrolling weren't working properly i.e. 0x29 n 0x2A.....so i implemented all horizontal, vertical, n diagonal scrolling using loops n continuously changing text position......didn't use any in built scroll commands n it worked great....but i just wanted to know how are ur scroll commands workin but mine aren't

  • @dannyk5084
    @dannyk5084 Рік тому

    I have tried this method for multiple texts to show up,but they all just run on top of each other. Is there a way I can post my code for you to see what I did wrong?

    • @robojax
      @robojax  Рік тому

      It seems you have skipped the video. Please b watch as showing text at any location of the screen is very important and I have not skipped it.

    • @dannyk5084
      @dannyk5084 Рік тому

      @@robojax Hello,I know that the display.clearDisplay(); clears the buffer, but my case seems a little more complicated than that. Especially with the void text string.

    • @dannyk5084
      @dannyk5084 Рік тому

      Can I send you my code to look at?

  • @RahulSingh-fn1qr
    @RahulSingh-fn1qr 3 роки тому

    Is it possible to use this with a 4 millisecond program loop. After some experiment i found that it take approx 26 ms to display on this module; so the program loop is freezed and 4 ms program loop is comprised. I am using the same library which you have used.
    Thanks for reading. Any suggestions is highly appreciated.

    • @robojax
      @robojax  3 роки тому

      Yes it needs reading time. Also remove any serial monitor printing and it will make it faster. Why you need faster display? Human eye can’t read faster than 30 times a second. 4ms is 250 times . Troy should not need that. Yes you can save and process it faster .

  • @JP-qw7ui
    @JP-qw7ui 6 років тому +2

    What a Great Video!!
    I like how you dig deep into the coding part where i often get lost and confused.
    I did Find some info further explaining 03C Vs 03D Here is a link further explaining the reason you need to adjust this setting.
    Hope it helps!
    v=_e_0HJY0uIo
    Time 11:38 --> 12:53
    Thank-you!

    • @robojax
      @robojax  6 років тому

      that is the I2C address. Watch this video and you will learn about it. There is I2C scanner code for arduino as well which will tell you the address of your display: ua-cam.com/video/bqMMIbmYJS0/v-deo.html

  • @charlysstore
    @charlysstore 4 роки тому

    Excellent

    • @robojax
      @robojax  4 роки тому

      Thank you so much 😀. Your subscription is a big help as my channel will stand out with more subscribers.

  • @kiparissas
    @kiparissas 4 роки тому

    hello!!!! I am new and I need your help plz. I use this code to control a servo with two buttons. and I want to show the position of the servo on an oled ssd1306 128x64, but no matter how hard I tried I could not figure out how to do it.

    • @kiparissas
      @kiparissas 4 роки тому

      #include
      Servo myservo; // create servo object to control a servo
      int angle =90; // initial angle for servo
      int angleStep = 5;
      int LEFT = 4; // pin 4 is connected to left button
      int RIGHT = 2; // pin 2 is connected to right button
      void setup() {
      Serial.begin(9600);
      myservo.attach(6); // attaches the servo on pin 6 to the servo object
      pinMode(LEFT,INPUT_PULLUP); // assign pin 4 ass input for Left button
      pinMode(RIGHT,INPUT_PULLUP);// assing pin 2 as input for right button
      myservo.write(angle);// send servo to the middle at 90 degrees
      }
      void loop() {
      while(digitalRead(RIGHT) == LOW){
      if (angle > 0 && angle = 0 && angle 180){
      angle =180;
      }else{
      myservo.write(angle); // move the servo to desired angle
      Serial.print("Moved to: ");
      Serial.print(angle); // print the angle
      Serial.println(" degree");
      }
      }
      delay(10); // waits for the servo to get there
      }
      }

    • @robojax
      @robojax  4 роки тому

      so first you learn how to display text. on OLED , then should be able to control servo and then use this LCD video to display text ua-cam.com/video/q9YC_GVHy5A/v-deo.html

  • @zsarfraz8938
    @zsarfraz8938 2 роки тому

    how do I make it that at certain times, a reminder message pops up

    • @robojax
      @robojax  2 роки тому

      very simple. we say "if time >3600 seconds, turn buzzer ON.
      Arduino Step by Step Course (over 150 lectures) Starts here ua-cam.com/video/-6qSrDUA5a8/v-deo.html

  • @nithinchatla2190
    @nithinchatla2190 5 років тому

    Hello sir. Mine is oled 128×64 1.3inch. But when i upload your code as you explained but the display is coming only in some part of oled. Will that code works for 1.3inch also. Or any changes to be done? Please help me sir

    • @robojax
      @robojax  5 років тому

      Hi, Inche doesn't matter. It is the number of pixels. 128x64 means 128 pixels by 64 pixels. If you set the value correctly it should work. You can shift the text or reduce the size to make it fit.

    • @nithinchatla2190
      @nithinchatla2190 5 років тому

      @@robojax how can shift the text sir. I dint understand.

  • @mohammedyasarshaikh4501
    @mohammedyasarshaikh4501 5 років тому

    Hello sir, I'm on different project with oled, problem is that the 128*64 display stopped to work after first experiment with Arduino i2c example, can anyone help me please, it is my final year project, thanks in advance

    • @robojax
      @robojax  5 років тому

      you must have changede the code or wiring is bad. Copy the same code, redo the wiring it should work. Unless you have incorrect connected + and - wires which might have burned the module. Try I2C scanner to see if module is responding: here is I2C scanner robojax.com/learn/arduino/?vid=robojax-I2C-scanner

  • @rctechmods8165
    @rctechmods8165 2 роки тому

    Why don't you simply go in Arduino ide and use library manager to download libraries

    • @robojax
      @robojax  2 роки тому

      in some which I could not find or found it easy, I used this method. But mostly I used the manage method.

  • @TheElectricCherry
    @TheElectricCherry 5 років тому

    For some reason only the 128x32 example would work.

    • @robojax
      @robojax  5 років тому

      have you set the value for your screen as 128 and 64?

  • @donaldhenke2750
    @donaldhenke2750 4 роки тому

    HOW DID YOU GET RID OF THE DEADBEEF WORD JUST BEFORE SCROLL?

  • @pong301275cmu
    @pong301275cmu 5 років тому

    your are wrong.
    The number 16 and 16 that you change to 64 and 128 are not screen dimension,
    Those are fore logo dimension.

    • @robojax
      @robojax  5 років тому

      Please point the time like 2:34 so I can look at it. But for sure 128 and 64 are screen dimension.

    • @pong301275cmu
      @pong301275cmu 5 років тому

      @@robojax 4:23 please check

    • @robojax
      @robojax  5 років тому

      Thank you very much. You are right. I will correct it.

  • @DavidRobertLewis
    @DavidRobertLewis 5 років тому

    WIRING?

    • @robojax
      @robojax  5 років тому +2

      I watched the video to see if I missed that. But I have explained which pin to be connected where. Watch it again without escaping.

  • @AfternoonProductions
    @AfternoonProductions 4 роки тому

    Adafruit._GFX.h not found? ??

    • @robojax
      @robojax  4 роки тому

      I just updated the page where the code is. download the GFX library.

    • @AfternoonProductions
      @AfternoonProductions 4 роки тому

      @@robojax Thank you!

    • @robojax
      @robojax  4 роки тому

      you are welcome.

  • @FD_Stalker
    @FD_Stalker 6 років тому

    Does it require an Adafruit_GFX library?
    ------------------------
    Yeah I see it on read me

    • @FD_Stalker
      @FD_Stalker 6 років тому

      I can't find the example work my OLED doesn't light up by any other example but one from DIYMAIL (amazon seller) which only shows that dam DIYMAIL logo. I followed every step on your video but screen doesn't light up. I connected A4A5 (even tried SCL SDA pin on mega); I have GFX and 1306-master library; set 0x3c (required but also tried 0x3d) , set 64 and 128, h file changed. Screen doesn't light up by any example.

    • @robojax
      @robojax  4 роки тому

      the code page is updated. you can download the GFX library from there goo.gl/NjQAf2

  • @yaserebrahimi876
    @yaserebrahimi876 3 роки тому

    Proffs

  • @redserpent
    @redserpent 3 роки тому +1

    excellent video, thank you.

  • @aberateklehaimanot9804
    @aberateklehaimanot9804 4 роки тому

    great tutorial.thank you.

    • @robojax
      @robojax  4 роки тому

      You are welcome!