Hey folks, I am trying to learn to code arduino so I can create my own water flow meter and display on the oled screen. I have created this code project1 - Wokwi ESP32, STM32, Arduino Simulator
I am having 2 issues. the counter goes to 9 and then just displays 1111111222222333333 and so on and the value of counter does not display on the screen. Can someone please point out what I am doing wrong?
You need to
Serial.begin(115200);
in the setup() function.
Make sure the band rate in the serial monitor is set to 115200 if you ever use the real serial monitor.
I think... there's still something different in how you use the OLED, check a good example to see how it should be.
Im unable to loook at that just now. Click on the OLED on your simulation and then click the question mark. Find and read the examples to see how to use it.
Be sure you use coordinates that end up on the screen.
a7
Serial.begin() helped with the counter not displaying proper values. However, I am still struggling with displaying it on the screen. I will keep looking ……
I got it working by stripping down one of the examples in the wokwi documentation for the OLED part you are using until all it was doing was printing an integer.
That example (temp and humidity) does not use the do/while() pagination, perhaps it is not necessary for such a small OLED, or the libraries it uses operated differently.
Take a look.
a7
Hello arduinoooo000b
Welcome to the worldbest Arduino forum ever.
Take a search engine of your choice and ask the WWW for 'how to interface oled display with arduino' to collect some information for a proper tutorial.
Have a nice day and enjoy coding in C++.