Introduction: ESP32 With Integrated OLED (WEMOS/Lolin) - Getting Started Arduino Style
If you're like me, you jump at the chance to get your hands on the latest and greatest ESP8266/etc...and put it through its paces. The ESP32 is no different but I have found that there isn't too much out there yet with regards to documentation. The first 2 steps should pertain to most ESP32 flavors and not just the one depicted with the OLED. Hopefully these 'couple-of-steps' will get you started. Good Luck....Have Fun...Let me know if it worked for you. A few assumptions are that you know how to navigate the Arduino IDE and work with their libraries.
UPDATE: 05Jan18 - Be sure to check out some updated ESP32 videos at the end of this Instructable. Internet Clock and Bluetooth BLE in action. Look in the YouTube notes for links to sketches.
Step 1: What's Needed
Step 2: Assuming Arduino IDE Is Already Installed
By default, the ESP32 does not show yet with the standard boards manager entries pointing to http://arduino.esp8266.com/stable/package_esp8266c...
Because of this we need to manually add them for the time being.
Follow ALL steps at the following site to prepare your Arduino IDE for your new ESP32 board.
If you do have the integrated OLED, and would like to try and get it running, proceed to the next step.
Step 3: Get the OLED Working on Arduino
Now that you've probably loaded an Arduino sketch on your ESP32, the 'pretty' pictures that were running on it when you first plugged it in are probably gone.
This particular ESP32 uses the SSD1306 libraries to communicate with the OLED display. I have had luck getting started by loading the following Arduino library and testing one of the SSD1306's included Example sketches. If the sketch fails to compile with errors, make sure you change the address it failed on to (0x3c, 5,4).
This ESP’s dedicated I2C pins are on GPIO 5 and 4 for data and clock respectively.
The attached ESP32_Wemos_I2C_Scanner sketch will confirm if your pins are addressed correctly. Load it on your ESP32 and check out serial monitor.
Step 4: Functional OLED With Arduino LDR Analog Input
****UPDATE 28Dec17 Check out video of ESP32 with working Internet/NTP clock. Code download URL's available on YouTube below video.
I decided to just keep rolling with this and managed to get the OLED working with 'real' data and not just the examples. Analog LDR feed. I've attached the Arduino sketch to this to help. Take it for a spin and let me know how you make out! If you need a 'brush-up' on the workings of Arduino and Analog, head over to https://programmingelectronics.com/tutorial-21-ana...
I got started on my Arduino adventure with these guys...the course is definitely worthwhile.
Erriez made it!
We have a be nice policy.
Please be positive and constructive.
I bought one of these modules from a Chinese website. It has absolutely no instructions. It took me a while to figure out the device address and the I2C port is address. If you want to find the address of the OLED, the wire.begin should be wire.begin(5.4) instead of wire.begin().
datasheet for the board?
I am following the instructions to add support for my ESP32 board at the page you list and, due to ignorance I do not know how to do this step:
open a Git Bash session pointing to ARDUINO_SKETCHBOOK_DIR and execute git submodule update --init --recursive
I did change the actual directory of the GIT Bash to the directory used as "ARDUINO_SKETCHBOOK_DIR" and the did enter the instruction. The error message made sense to me but I do not know how to do it right:
"No such file or directory". This directoy does not have any git content.
What do I have to do to be able to execute the instruction?
The folder mentioned "ARDUINO_SKETCHBOOK_DIR" in the example is just example. You need to add your specific folder structure for the target directory like they show in the screenshot on that same page. Please let me know if this helps or if you've already gotten it to work.
Have a good day!
Thanks for responding. It is hard to learn how to present a question, sorry. When I tried I did replace "ARDUINO...DIR" with the correct path to the folder where the sketches are stored. Effectively I moved the working directory to my "ARDUINO...DIR" My problem was in executing the GIT Bash session:
git submodule update --init --recursive
I got the error message :
"No such file or directory"
So I do not know how to successfully do this step!
Try changing directories all the way into the esp32 subdirectory. See attached screenshot from my setup.