Skip to main content
4 votes
Accepted

Arduino program using i2c stops working after printing to OLED a few times

This is wrong in many ways: String input = Serial.readString(); serialInputBuffer = new char[input.length()]; input.toCharArray(serialInputBuffer, input.length()); What's fatal is that you later don'...
Juraj's user avatar
  • 18.1k
4 votes

OLED and Wifi not working together on ESP8266 Heltec NodeMCU

I managed to solve the issue and figure out what the problem is. I put here an answer for reference, if this question appears again. It turns out that the reset of the OLED is important. It is easy to ...
Fabian's user avatar
  • 151
3 votes
Accepted

Why is the Adafruit splashscreen logo not displayed properly?

I'm unable to test this now, but here goes: Turns out I did have the ability to test it (found an extra display module) and this does indeed explain the problem. The only other change I needed to make ...
timemage's user avatar
  • 5,231
3 votes

DHT20 and OLED display not working together

The basic problem I don't have this sensor kit. But am able to observe what you're describing with substitutes and stand-ins. There seem to be two things you can do. The basic problem is that the ...
timemage's user avatar
  • 5,231
3 votes
Accepted

Functions delaying gesture sensor recognition

The code is being slowed down by the delay() function because it is a blocking function. The delay function does not exit until delay time passes, so no other functions can run, such as sensor reading....
jsotola's user avatar
  • 1,515
3 votes

Serial and I2C not working together

The SSD1306 uses a lot of RAM. Pretty much all your RAM. Serial also uses quite a bit of RAM. The two struggle to work together. There is a special "text only" SSD1306 library that uses ...
Majenko's user avatar
  • 105k
3 votes

How can I display text on OLED?

Just guessing but looks to me like you read the CAN message and print it character by character to the Serial console but you don't save those characters in a buffer as you get them from CAN.read(). ...
Richard Chambers's user avatar
3 votes
Accepted

I want a bar type display for my Arduino Project

As Majenko already stated, the second image shows a custom display. It is not pixelated, because each shown element/symbol has it's own element in the LCD. When you have one of these displays, you ...
chrisl's user avatar
  • 16.3k
2 votes

240*320 transparent OLED display with Arduino

Is the SPI communication method feasible? I have found a chip at present, and it seems that the driver can be transplanted directly. You can look at this chip. https://nl.mouser.com/ProductDetail/...
Damon's user avatar
  • 21
2 votes

240*320 transparent OLED display with Arduino

Your initial code.txt file is flawed. The pdf file has the code in multiple columns on each page, and not all the columns are filled. This is the code (i think it is correct) Example of Initial ...
jsotola's user avatar
  • 1,515
2 votes
Accepted

OLED 'SH1106_WHITE' was not declared in this scope

In the Adafruit_SH1106.h header file, SH1106_WHITE and SH1106_BLACK are defined simply as WHITE and BLACK respectively. So instead of writing SH1106_WHITE try replacing it WHITE and SH1106_BLACK as ...
Clavin Rali's user avatar
2 votes
Accepted

Arduino boards are not working with powerbanks!

Most USB powerbanks will automatically turn off if there is not a minimum current draw to keep them turned on. The Arduino is obviously drawing current below the limit for the devices you have. A ...
jwh20's user avatar
  • 1,045
2 votes

Is there a limitation of how many instances of the `String` class?

Do not use String. Ever. Especially not on a chip with such a tiny amount of RAM. String uses dynamic allocation to store the string data in RAM. This is very inefficient, especially when you are ...
Majenko's user avatar
  • 105k
2 votes

Carbon dioxide sensor MG 811

Your code appears to come from an example in the library you are using https://github.com/solvek/CO2Sensor/blob/master/examples/ReadCO2/ReadCO2.ino To answer your questions: What is the meaning of (A0,...
DrG's user avatar
  • 399
1 vote

DHT20 and OLED display not working together

I use a variable to store the readings. #include "Arduino_SensorKit.h" #define Environment Environment_I2C void setup() { Oled.begin(); Oled.setFlipMode(true); // Sets the rotation of ...
HockGuan's user avatar
1 vote
Accepted

Temperature is not updated on OLED screen - Grove components

You mix software I2C with hardware I2C on the hardware I2C pins. To use hw I2C with the display use the U8G2_SSD1306_128X64_NONAME_F_HW_I2C constructor. U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(...
Juraj's user avatar
  • 18.1k
1 vote

NodeMCU code that both display OLED and control WS2812 LED Ring

You need to stop using delay and instead keep track of elapsed time. One of the comments under your question suggests looking at the BlinkWithoutDelay example, which is part of the Arduino IDE. The ...
Nick Gammon's user avatar
  • 38.2k
1 vote

Arduino Freezes (probably because of I2C) - Need help to write robust script

Are you sure you are using the latest I2C library? Up until halfway through 2020, the 'official' I2C library had a known failure mode that would cause the I2C buss to hang. See my 'Paynters Palace' ...
starship15's user avatar
1 vote

Arduino Freezes (probably because of I2C) - Need help to write robust script

It sounds like over ambitious pull up resistors. They should total about 3K on each bus. I will take a SWAG and say the I2C driver fet is drawing to much current and heating up. When it does that its ...
Gil's user avatar
  • 1,833
1 vote

Arduino u8glib Problem

Most monochrome LCDs and operate on a principle of "pages". A page in this context is not a whole screen, but one strip of pixels, often 8 pixels high. U8G draws the screen using these ...
Majenko's user avatar
  • 105k
1 vote
Accepted

Arduino Nano I2C OLED display 0.96 inches 128x64 pixels

Mystery solved :) After some more reading it appears that the display driver is actually SH1106, so after using the right library I got the display working.
zanga's user avatar
  • 21
1 vote

Trying to use I2C accelerometer and SPI OLED

Your SPI is not setup for the Arduino UNO. Check another example for SPI and you will be using pins 11 and 13, this is mandatory and 8,9,10 or any three and there is a definition statement for these 3 ...
sparkbit's user avatar
1 vote

Serial and I2C not working together

Thank you Majenko... It was low RAM problem. SSD1306 takes 1K, with MPU6050 the and serial print which I have included the remaining RAM is 5 bytes only, hence the initialization issue. I followed ...
Pankaj's user avatar
  • 21
1 vote

Why SSD1306 OLED display get scrambled text when printing messages from separate tasks in RTOS? (revised)

This is a formal answer to the question based on the comments between Paulo Borges and Majenko. The ESP32 is dual core, meaning that it comes with 2 Xtensa LX6 32-bit microprocessors: core 0 and core ...
sa_leinad's user avatar
  • 3,188
1 vote
Accepted

Error Compiling for board Arduino Nano while using Adafruit GFX

Currently, you defined a forward declaration for drawLine, however I assume you want to call the method (function) inside display. So change drawLine(20,60,5,50,256); into display.drawLine(20,60,5,50,...
Michel Keijzers's user avatar
1 vote

Printing vairable with U8GLib

I do not understand, how you initialize the DHT sensor object. (I wonder why this compiles at all.) Your way: //dht11 kodu i├žin ayarlamalar #include <dht.h> dht DHT; #define DHT11_PIN 7 I would ...
Peter Paul Kiefer's user avatar
1 vote
Accepted

Is there a limitation of how many instances of the `String` class?

Each instance of your class uses RAM to store its data. There is always a limit to the number of instances; not a fixed number, but a limit imposed by the quantity of RAM available. What Majenko wrote ...
JRobert's user avatar
  • 15.3k
1 vote

SSD1306 shows static when I try to display an XBM image

NOTE: This refers to an problem in the initial posting. The question has since been edited. This may be deleted later. One problem, perhaps the problem, is that your given image appears to be ...
timemage's user avatar
  • 5,231
1 vote
Accepted

File.read() always returns -1

I had accidentally commented out the SD initialization along with the serial initialization. After uncommenting it it works correctly
none none's user avatar
  • 233
1 vote

I am getting an error while trying to set up the U8g2 library

I figured out what I was doing wrong. I was copying the name from the Constructor Reference and immediately inputting the arguments in parentheses. I needed to put u8g2 after the constructor name and ...
Kayla's user avatar
  • 21

Only top scored, non community-wiki answers of a minimum length are eligible