Тёмный

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

Robojax
Подписаться 107 тыс.
Просмотров 63 тыс.
50% 1

**** Free Arduino Course worth $200***
Arduino Step by Step Course (over 150 lectures) Starts here robojax.com/L/?id=338
This video practically with example shows you how to setup and use SSD1306 OLED display of size 128 x 64.
Custom code can print text on the screen easily.
The best thank you for me is to not skip ads and Subscribe 🔔 to my channel, like 👍 the video and do not skip the ads.. It is greatly appreciated. 🔔 😊.
I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe.😊 .
Download the code for SSD1306 OLED display from:
goo.gl/NjQAf2
Purchase SSD1306 OLED Display:
Amazon USA: amzn.to/3mAmfew
Amazon Canada: amzn.to/360Kv35
Amazon all European countries: amzn.to/3my861n
Banggood: www.banggood.com/custlink/m3K...
** Purchase Arduino Start Kit **
Amazon USA: amzn.to/3z88F9G or just UNO board amzn.to/3aY7KOL
Amazon Canada: amzn.to/31an88J or just UNO board amzn.to/3pYxSNN
Amazon Europe (all Europe): amzn.to/3pMCHge or Just UNO board amzn.to/2PgGItD
AliExpress: s.click.aliexpress.com/e/_9uc7Xe
Banggood: www.banggood.com/custlink/3GD... or UNO board www.banggood.com/custlink/vKm...
eBay: ebay.us/B1JWLi
***** Purchase Authentic Arduino Uno from ***
Amazon USA: amzn.to/2KApAwK
Amazon Canada: amzn.to/37LZ8sW
All Europe Amazon: amzn.to/36YDSzn
Tutorial by Ahmad Shamshiri form Canada
****************************
Arduino Step by Step Course (over 150 lectures) Starts here • Lesson 00 What is Ardu...
****************************
If you found this tutorial helpful, please support me so I can continue creating contents like this. Here is PayPal link paypal.me/robojaxTV
Follow me on Facebook robojaxTV
Follow me on Twitter: / robojaxtv
Follow me on Instagram: / robojax
Tutorial by Robojax.com
Get other projects code and learn Arduino
robojax.com/learn/arduino
*** AFFILIATE PROGRAM ***
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.
#robojax #robojax_oled

Наука

Опубликовано:

 

16 дек 2017

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 118   
@dalexdba1
@dalexdba1 3 года назад
Thankyou for my first breakthrough with the i2c and display types!
@robojax
@robojax 3 года назад
You are welcome.
@sofiale5212
@sofiale5212 6 лет назад
Thank you so much!! The video is very helpful.
@robojax
@robojax 6 лет назад
You are 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.
@EduardoAntonine
@EduardoAntonine 4 года назад
Thanks! I finally used the display as I wanted
@robojax
@robojax 4 года назад
You are welcome. Thank you for not skipping the ads and keep watching them. This will help me a lot.
@georgbachmayer2493
@georgbachmayer2493 4 года назад
Thanks, I tried many codes and I never got it to work. This works like a charm.
@robojax
@robojax 4 года назад
You're welcome!
@ramadhanafif
@ramadhanafif 5 лет назад
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.
@redserpent
@redserpent 3 года назад
excellent video, thank you.
@dorothymatrix4710
@dorothymatrix4710 Год назад
Excellent video thankyou.
@qzorn4440
@qzorn4440 2 года назад
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 2 года назад
You're welcome 😊
@mrkubekman
@mrkubekman 6 лет назад
Good video, thank you very much😀
@robojax
@robojax 6 лет назад
You are welcome.
@ketanmiyatra8529
@ketanmiyatra8529 4 года назад
Most interesting and more informative video tutorial!🤖
@robojax
@robojax 4 года назад
Glad you liked it
@donaldhenke2750
@donaldhenke2750 4 года назад
Thank you... it worked.
@robojax
@robojax 4 года назад
You are welcome.
@arshadkaabi1056
@arshadkaabi1056 5 лет назад
Thank you for this video
@robojax
@robojax 3 года назад
you are welcome.
@polskizwiazeknaczelnychhej1100
@polskizwiazeknaczelnychhej1100 3 месяца назад
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.
@aberateklehaimanot9804
@aberateklehaimanot9804 4 года назад
great tutorial.thank you.
@robojax
@robojax 4 года назад
You are welcome!
@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ť
@zxn_wsnr
@zxn_wsnr 3 года назад
Thanks a lot
@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.😊 .
@frdnom9182
@frdnom9182 3 года назад
Thanks to you
@ElectroMentor
@ElectroMentor 4 года назад
Thank alot sir.
@robojax
@robojax 4 года назад
You are welcome.
@CameronCobb
@CameronCobb 5 лет назад
Great video! Just curious, do you know how to increase the refresh rate?
@robojax
@robojax 5 лет назад
Thank you. For refresh rate, change the delay in the main loop() function.
@MrOrangeman18
@MrOrangeman18 4 года назад
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 года назад
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.
@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 года назад
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.
@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 .
@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!
@maicomcoelholopes9032
@maicomcoelholopes9032 5 лет назад
muito obrigado, vídeo extremamente útil
@robojax
@robojax 5 лет назад
Você é bem vindo. Fico feliz que você tenha achado útil. Ahmad do Canadá.
@quangmi3402
@quangmi3402 8 месяцев назад
Hi! How to demonstrate up/down counter by OLed?
@robojax
@robojax 8 месяцев назад
OLED does not matter. learn how counter works and then show it on this display. check my video on the counter.
@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.
@billglass5160
@billglass5160 2 года назад
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 2 года назад
Hello, rotation can do it yes.
@billglass5160
@billglass5160 2 года назад
@@robojax thank you. I will try it when I receive my new box and oled
@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.
@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.
@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 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-q9YC_GVHy5A.html
@olavmjelde5396
@olavmjelde5396 4 года назад
A very good video
@robojax
@robojax 4 года назад
Glad you think so!
@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
@CarlosSD
@CarlosSD 3 года назад
Thank you very much, that display.display(); was my problem 😆😆😆
@robojax
@robojax 3 года назад
Glad I could help. you are welcome.
@sweetleaf7751
@sweetleaf7751 4 года назад
Hi which editor did You use if i may ask?
@robojax
@robojax 4 года назад
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/
@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.
@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 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE--6qSrDUA5a8.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.
@JP-qw7ui
@JP-qw7ui 5 лет назад
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 5 лет назад
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: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-bqMMIbmYJS0.html
@nithinchatla2190
@nithinchatla2190 4 года назад
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 4 года назад
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 4 года назад
@@robojax how can shift the text sir. I dint understand.
@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
@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 лет назад
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 лет назад
I already sent to codeshare.io/
@robojax
@robojax 6 лет назад
Post your code and then you will get another Unique link like this codeshare.io/5gOwAD and send that
@poerwojadoel7992
@poerwojadoel7992 6 лет назад
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.
@edimarolivio9436
@edimarolivio9436 2 года назад
Muito bom! Mas não entendo inglês, . Cornélio Procópio, Paraná, Brazil.
@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?
@donaldhenke2750
@donaldhenke2750 4 года назад
HOW DID YOU GET RID OF THE DEADBEEF WORD JUST BEFORE SCROLL?
@robojax
@robojax 4 года назад
?
@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 4 года назад
For some reason only the 128x32 example would work.
@robojax
@robojax 4 года назад
have you set the value for your screen as 128 and 64?
@AfternoonProductions
@AfternoonProductions 3 года назад
Adafruit._GFX.h not found? ??
@robojax
@robojax 3 года назад
I just updated the page where the code is. download the GFX library.
@AfternoonProductions
@AfternoonProductions 3 года назад
@@robojax Thank you!
@robojax
@robojax 3 года назад
you are welcome.
@DavidRobertLewis
@DavidRobertLewis 5 лет назад
WIRING?
@robojax
@robojax 5 лет назад
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.
@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 3 года назад
the code page is updated. you can download the GFX library from there goo.gl/NjQAf2
@yaserebrahimi876
@yaserebrahimi876 3 года назад
Proffs
@pong301275cmu
@pong301275cmu 4 года назад
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 4 года назад
Please point the time like 2:34 so I can look at it. But for sure 128 and 64 are screen dimension.
@pong301275cmu
@pong301275cmu 4 года назад
@@robojax 4:23 please check
@robojax
@robojax 4 года назад
Thank you very much. You are right. I will correct it.
Далее
OLED Displays with Arduino - I2C & SPI OLEDs
41:41
Просмотров 1,1 млн
Выпускаем трек? #iribaby
00:14
Просмотров 378 тыс.
Flo Rida - Whistle НА РУССКОМ 😂🔥
00:29
Просмотров 351 тыс.
Я читаю переписки сына
00:18
Просмотров 597 тыс.
STM32 + OLED = Display Anything
18:01
Просмотров 17 тыс.
A Display From Arduino | Arduino GIGA Display Shield
20:17
Sensors - which one to use
17:06
Просмотров 1,3 млн
АЙФОН Г0ВН0
0:54
Просмотров 1,2 млн
iPhone 16 - НЕ СТОИТ ПРОПУСКАТЬ
4:50