//code my demon #include #include #include #define OLED_SDA 14 // Use GPIO 14 for I2C SDA #define OLED_SCL 15 // Use GPIO 15 for I2C SCL #define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 64 #define OLED_RESET -1 // Set OLED_RESET to -1 if the display does not have a reset pin #define SCREEN_ADDRESS 0x3C // Change this address according to your OLED display Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET, OLED_SCL, OLED_SDA); // send the i2c pins to the library before initializing. void setup() { Wire.begin(OLED_SDA, OLED_SCL); display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS); //put uar code here // Clear the display buffer display.clearDisplay(); // Set text size and color display.setTextSize(1); display.setTextColor(SSD1306_WHITE); // Print "Hello world" at the center of the display display.setCursor((SCREEN_WIDTH - 12 * 6) / 2, (SCREEN_HEIGHT - 8) / 2); display.println("Hello world"); // Update the OLED display display.display(); } void loop() { // Add your code here if you want to do something continuously }
I'm building a simple Muon detector. I learn mainly from the YT vids. Anyhow the end result of the detector is a LED that flashes every time a muon is detected. Well, I can't sit there and watch it waiting for the LED to flash every now and then. So I purchased a 128x64 OLED. I would like to keep the LED and further connect the leads from the LED to an arduino nano and the OLED with the hopes of somehow getting the arduino and OLED to maybe show a cumulative total of all the muons (flashes) detected. Even better would be showing how many detected in last 24 hours, and the last week, and the last month all on the OLED. Perhaps I am a dreamer but it should be possible. I'm a novice so any help would be greatly appreciated! Thank you!
Good eye! Amazon right now (Aug 2024) sells 5 for $15... White, Blue, and Yellow/Blue with yellow pixels at the top about 1/5th of the display and the rest is blue for contrasting menu or status icons or text at the top. Sorry, I the description does not say how many rows of pixels at the top are yellow.
Help, I hooked up all correctly, code is correct. What I get is the first 5 or 6 lines that seem to be working correctly, but all the lower lines are just stagnate and not moving but with a random pattern. I've tried 6 different OLED (all same model and Manufacture), and I've tried 2 different Arduino, one Uno and one Nano with the same result. I find it hard that all 6 OLEDS are bad, but... Changed wires, change com ports, had a few beers...
Nothing works then. Is it possible the displays are not SSD1306 compatible. They list as SSH1106. I reordered new ones that do say SSD1306 in the description. @@EnjoyMechatronics
Hi. Is there code anywhere that explains how one could "turn off" the display with a button push. The only thing I know that its more of a black screen rather than a 0v to the display. Thank you
I read about that but rumor has it that its just the same effect as turning on/off which is no good as it has to sync up again with spi or i2c signals that could render gibberish on the display once it comes on
Finished the Muon Detector, here's the vid: ua-cam.com/video/3j0bHfRFb-g/v-deo.html I still need help with the Arduino sketches and OLED. Thanks for all your vids!
Thank you. All I had to do was change D to C. now it's time to solve the next 12 problems. one at a time!!
Thank you for taking the time to do this. It was my first display image that I ever created. What a learning process.
I'm glad it was helpful!
Legend thanks.i was wondering how I get an image onto the display. Thanks a lot
Shukran! Thank you very much bro! Very helpful for someone who doesn't know low level coding well!
Thanks for your interest.
God bless you.
Thank you.
Very short and to the point.
Practical examples are the way to go!
Great 👍
日本語ですみません。非常に判りやすかったです。Good。
Thanks for your hard work. Your videos are very useful
So nice of you
you make my dope receptors go brrr
That image to HEX array generator is really cool! I wonder how to program that!
Yeah, you could learn about image processing using Python.
This was very helpful.
I'm glad it was helpful
Thank you so much.. finally found a way to display on i2c oled using esp32 cam module.
here is my code for anyone who is interested
//code my demon
#include
#include
#include
#define OLED_SDA 14 // Use GPIO 14 for I2C SDA
#define OLED_SCL 15 // Use GPIO 15 for I2C SCL
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1 // Set OLED_RESET to -1 if the display does not have a reset pin
#define SCREEN_ADDRESS 0x3C // Change this address according to your OLED display
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET, OLED_SCL, OLED_SDA); // send the i2c pins to the library before initializing.
void setup() {
Wire.begin(OLED_SDA, OLED_SCL);
display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS);
//put uar code here
// Clear the display buffer
display.clearDisplay();
// Set text size and color
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
// Print "Hello world" at the center of the display
display.setCursor((SCREEN_WIDTH - 12 * 6) / 2, (SCREEN_HEIGHT - 8) / 2);
display.println("Hello world");
// Update the OLED display
display.display();
}
void loop() {
// Add your code here if you want to do something continuously
}
Glad it helped
● LCD Display(ESP32): ua-cam.com/video/syQyrjJu0WE/v-deo.html
● Image Converter: javl.github.io/image2cpp/
I'm building a simple Muon detector. I learn mainly from the YT vids. Anyhow the end result of the detector is a LED that flashes every time a muon is detected. Well, I can't sit there and watch it waiting for the LED to flash every now and then.
So I purchased a 128x64 OLED. I would like to keep the LED and further connect the leads from the LED to an arduino nano and the OLED with the hopes of somehow getting the arduino and OLED to maybe show a cumulative total of all the muons (flashes) detected. Even better would be showing how many detected in last 24 hours, and the last week, and the last month all on the OLED. Perhaps I am a dreamer but it should be possible. I'm a novice so any help would be greatly appreciated! Thank you!
Nice one .. Did thje same with the ESP32 . 1 question .. why is the top quarter of the screen yellow ?
Good eye! Amazon right now (Aug 2024) sells 5 for $15... White, Blue, and Yellow/Blue with yellow pixels at the top about 1/5th of the display and the rest is blue for contrasting menu or status icons or text at the top. Sorry, I the description does not say how many rows of pixels at the top are yellow.
Help, I hooked up all correctly, code is correct. What I get is the first 5 or 6 lines that seem to be working correctly, but all the lower lines are just stagnate and not moving but with a random pattern. I've tried 6 different OLED (all same model and Manufacture), and I've tried 2 different Arduino, one Uno and one Nano with the same result. I find it hard that all 6 OLEDS are bad, but... Changed wires, change com ports, had a few beers...
Try changing the address
Nothing works then. Is it possible the displays are not SSD1306 compatible. They list as SSH1106. I reordered new ones that do say SSD1306 in the description. @@EnjoyMechatronics
Turns out it was the wrong chipset SSH1106. Once I plugged the ssd1306, no issues.
@@EnjoyMechatronics
Did you get any solution? I am also facing the problem and I'm becoming very frustrated.
@@EnjoyMechatronicsplease help me I'm getting same error and changing the address is not the. Solution please help brother.
is there a way to develop the display groahically?
Hey do u know why my oled regulator got burned after inserting to vin
Thank you for sharing your valuable knowledge my friend. But I wanted to ask you what Arduino IDE do you use and how we set it up?
I am using the latest version
Just download it and install it
@@EnjoyMechatronics oh OK Thank you very much Chaker
@@alkhashtee Any Time!
@@EnjoyMechatronics thank you again Chaker, and I sent you an email regarding freelance work and not sure if you got it or not. Please let me know.
thanks a lot sir
All the best
Hi. Is there code anywhere that explains how one could "turn off" the display with a button push. The only thing I know that its more of a black screen rather than a 0v to the display. Thank you
Connect vcc to a digital pin like 2 and use digitalWrite(2,HIGH) to turn it on
And digitalWrite(2,LOW) to turn it off
I read about that but rumor has it that its just the same effect as turning on/off which is no good as it has to sync up again with spi or i2c signals that could render gibberish on the display once it comes on
Would have been better if you don't use Adafruit libraries and show how to build fonts and graphics.
It's possible to run two displays on same esp32 ?
yes
Finished the Muon Detector, here's the vid: ua-cam.com/video/3j0bHfRFb-g/v-deo.html I still need help with the Arduino sketches and OLED. Thanks for all your vids!