Advertisement

Welcome!
Thank you for purchasing our AZ-Delivery ESP32 Lolin32. On the following
pages, you will be introduced to how to use and set up this handy device.
Have fun!

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32 Lolin32 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for AZ-Delivery ESP32 Lolin32

  • Page 1 Welcome! Thank you for purchasing our AZ-Delivery ESP32 Lolin32. On the following pages, you will be introduced to how to use and set up this handy device. Have fun!
  • Page 2: Table Of Contents

    Table of Contents Introduction....................3 Specifications....................4 The pinout.....................5 How to set-up Arduino IDE................6 Installing the ESP32 Board in Arduino IDE..........10 Sketch examples..................12 Example with DS18B20................12 Example with BME280................18 - 2 -...
  • Page 3: Introduction

    Introduction Lolin32 is the ESP32 development board. Like other ESP32 boards, it also has a 32-bit dual-core microcontroller which operates at 240MHz, has 4MB of flash storage. It can be programmed in a range of languages, such as microPython, LUA, mod. C/C++ in Arduino IDE, just like any other microcontroller.
  • Page 4: Specifications

    Specifications Power supply 2.2V to 3.6V Operating voltage 3.3V Logic level 3.3V Mounting holes diameter 2 holes, 3mm diameter Integrated 802.11 BGN WiFi transceiver Integrated dual-mode Bluetooth 4MB Flash Memory Maximum serial baud rate 256000bps Dimensions 50x25mm (1.97x0.98in) - 4 -...
  • Page 5: The Pinout

    The pinout The ESP32 Lolin32 has 26 pins. The pinout is shown in the following image: - 5 -...
  • Page 6: How To Set-Up Arduino Ide

    How to set-up Arduino IDE If the Arduino IDE is not installed, follow the link and download the installation file for the operating system of choice. The Arduino IDE version used for this eBook is 1.8.13. For Windows users, double click on the downloaded .exe file and follow the instructions in the installation window.
  • Page 7 For Linux users, download a file with the extension .tar.xz, which has to be extracted. When it is extracted, go to the extracted directory and open the terminal in that directory. Two .sh scripts have to be executed, the first called arduino-linux-setup.sh and the second called install.sh.
  • Page 8 Almost all operating systems come with a text editor preinstalled (for example, Windows comes with Notepad, Linux Ubuntu comes with Gedit, Linux Raspbian comes with Leafpad, etc.). All of these text editors are perfectly fine for the purpose of the eBook. Next thing is to check if your PC can detect an Atmega328p board.
  • Page 9 If the Arduino IDE is used on Windows, port names are as follows: For Linux users, for example, port name is /dev/ttyUSBx, where x represents integer number between 0 and 9. - 9 -...
  • Page 10: Installing The Esp32 Board In Arduino Ide

    Installing the ESP32 Board in Arduino IDE To install ESP32 add-on in Arduino IDE first open Arduino IDE, than go to File > Preferences: In Additional Boards Manager URLs box enter the next URL: https://dl.expressif.com/dl/package_esp32_index.json Than go to Tools > Board > Boards Manager and search for ESP32 and press the install button for esp32 by Espressif Systems.
  • Page 11 Now, the board can be selected in the boards menu: WEMOS LOLIN32 board is used in this project. Now, the ESP32 board is ready for code to be uploaded. - 11 -...
  • Page 12: Sketch Examples

    Sketch examples The ESP32 Lolin32 needs a micro USB cable to allow a computer to program and communicate with the microcontroller. Example with DS18B20 // Measure the temperature of your pool or pond with DS18B20 // and report it in your local WiFi...
  • Page 13 // Pass our oneWire reference to Dallas Temperature. DallasTemperature sensors(&oneWire); void setup() { // Server Serial.begin(115200); WiFi.mode(WIFI_STA); WiFi.begin(SSID, PASSWORD); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); Serial.println(""); Serial.printf("Connected to %s.\n", SSID); Serial.printf("IP-Address: %s.\n", WiFi.localIP().toString().c_str()); (MDNS.begin("Lolin32")) { Serial.println("MDNS-Responder started."); server.on("/", handleRoot); server.onNotFound(handleNotFound);...
  • Page 14 // Sensor Serial.println("Dallas DS18B20 Temperature "); // Start up the library sensors.begin(); void loop() { // Sensor // call sensors.requestTemperatures() to issue a global temperature // request to all devices on the bus Serial.print("Requesting temperatures..."); sensors.requestTemperatures(); // Send the command to get temperatures Serial.println("DONE");...
  • Page 15 message += "</html>\n"; server.send(200, "text/html", message); void handleRoot() { server.send(200, "text/plain", "Here is your Lolin32!"); void handleNotFound() { String message = "path "; message += server.uri(); message += " not found.\n"; server.send(404, "text/plain", message); - 15 -...
  • Page 16 The output should be as in the following image: Note: Set baud rate to 115200. - 16 -...
  • Page 17 WiFi works even when the micro USB cable is not connected. Simply enter the IP address in your browser followed by /Sensor. When not connected to the computer, the Serial Monitor of the Arduino IDE does not get the information. - 17 -...
  • Page 18: Example With Bme280

    Example with BME280 #include <Wire.h> #include <SPI.h> #include <Adafruit_Sensor.h> #include <Adafruit_BME280.h> #define BME_SCK 18 //use these pins for hardware SPI #define BME_MISO 19 #define BME_MOSI 23 #define BME_CS 5 Adafruit_BME280 bme; // I2C //Adafruit_BME280 bme(BME_CS); // hardware SPI //Adafruit_BME280 bme(BME_CS, BME_MOSI, BME_MISO, BME_SCK); // software SPI unsigned long delayTime;...
  • Page 19 Wire.begin(26,27); //add this line for I2C with SDA=26 and SCL=27 status = bme.begin(); //default is 0x77; otherwise bme.begin(0x76) if (!status) { Serial.println("Could not find a valid BME280 sensor, check wiring, address, sensor ID!"); Serial.print("SensorID was: 0x"); Serial.println(bme.sensorID(),16); Serial.print(" ID of 0xFF probably means a bad address, a BMP 180 or BMP 085\n");...
  • Page 20 void printValues() { Serial.print("Temperature = "); Serial.print(bme.readTemperature()); Serial.println(" *C"); Serial.print("Pressure = "); Serial.print(bme.readPressure() / 100.0F); Serial.println(" hPa"); Serial.print("Humidity = "); Serial.print(bme.readHumidity()); Serial.println(" %"); Serial.println(); - 20 -...
  • Page 21 Note: This works for I2C on pins 26 and 27 and could also be used (with minor modifications) for SPI. Sketch and Libraries are from Adafruit (US). - 21 -...
  • Page 22 Internet. If you are looking for the high quality microelectronics and accessories, AZ-Delivery Vertriebs GmbH is the right company to get them from. You will be provided with numerous application examples, full installation guides, eBooks, libraries and assistance from our technical experts.

Table of Contents

Save PDF