ESP32 WIFI/BLE Board v0.9

Similar documents
User s Manual of Board ET-ESP32 WROVER MODULE V1 ET-ESP32 WROVER MODULE V1

How to use an ESP-01S module

FireBeetle ESP8266 IOT Microcontroller SKU: DFR0489

FireBeetle ESP32 IOT Microcontroller (Supports Wi Fi & Bluetooth) SKU: DFR0478

ESPino - Specifications

BR03 Raspberry Pi Zero Bridge

ARDUINO PRIMO. Code: A000135

Pmod ESP32 Reference Manual

keyestudio Keyestudio MEGA 2560 R3 Board

ArduCAM CC3200 UNO board

Indoor Air Quality with ESP32 Board # K0068

Pg 3. Specifications. Hardware Required

ARDUINO YÚN MINI Code: A000108

ESP-07S User Manual REV:

EZ-Bv4 Datasheet v0.7

Lesson 6 Intel Galileo and Edison Prototype Development Platforms. Chapter-8 L06: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

ARDUINO INDUSTRIAL 1 01 Code: A000126

ESPRESSIF SYSTEMS. The Complete IoT Solutions Provider

WiFiBee MT7681 (Arduino WiFi Wireless Programming) SKU: TEL0107

ESP-01 WiFi Module Version1.0

Lab 01 Arduino 程式設計實驗. Essential Arduino Programming and Digital Signal Process

BT121 Bluetooth Smart Ready Module. May 2015

ARDUINO YÚN Code: A000008

User Manual. ESP8266 Wifi Shield

WiFi Shield. User Guide

WAVETEK BLE-WT51822AA/AB. Revision History. Bluetooth low energy Module WT51822AA (256k) /AB (128k) (Bluetooth Low Energy BT4.0) PRODUCT SPECIFICATION

Adafruit HUZZAH32 - ESP32 Feather

<Table of content> <Parts and description> <Circuit board Guide> <Pins> <Basics of Coding> <Intro to Arduino> <Intro> <Downloading Arduino IDO>

IME-100 ECE. Lab 3. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE,

IME-100 Interdisciplinary Design and Manufacturing

ESP8266 Thing Development Board Hookup Guide

Seeeduino LoRaWAN. Description

Arduino Prof. Dr. Magdy M. Abdelhameed

ESP-WROVER-KIT Getting Started Guide

free ebooks ==>

The Riverside Robotic Society June 2016 ESP8266

Laboratory 1 Introduction to the Arduino boards

Qualcomm Wi-Fi Connectivity Selector Guide

BLE121LR Bluetooth Smart Long Range Module 5/12/2014 1

FireBeetle Board 328P with BLE4.1 SKU: DFR0492

SKU:TEL0092 WiFi Bee-ESP8266 Wirelss module

Parallax WX ESP8266 Wi-Fi Modules

Sten-SLATE ESP Kit. Description and Programming

Yun Shield Quick Start Guide VERSION: 1.0. Yun Shield Quick Start Guide 1 / 14.

ESP32-PICO-D4 Datasheet

Create your own wireless motion sensor with

TANGIBLE MEDIA & PHYSICAL COMPUTING INTRODUCTION TO ARDUINO

New STM32WB Series MCU with Built-in BLE 5 and IEEE

DATA SHEET JUNE 2018 BRIGHTDOT - THE WEARABLE LED COLLECTION MANUAL AND TUTORIALS ON VELLEMANPROJECTS.MANUALS.EU

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite.

Ai-Thinker. ESP-12S Datasheet. Version V0. Copyright 2018 ESP-12S WIFI MODULE V0. Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved

Introduction to Arduino

Intel Galileo gen 2 Board

Ai-Thinker. ESP-01F Datasheet. Version V1 Copyright Copyright 2018 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved

Bluno M0 Mainboard SKU: DFR0416

Farklı Arduino Boardlar

Smart Spot Hardware: Specifications

ARDUINO LEONARDO ETH Code: A000022

BC BIGCIRCLE32-DSBT

New STM32WB Series MCU with built-in Bluetooth 5 and IEEE

Bluno Mega 2560 (SKU:DFR0323)

nblue TM BR-MUSB-LE4.0-S2A (CC2540)

Cypress PSoC 6 Microcontrollers

DFRobot BLE4.1 Module SKU: TEL0120

ARROW ARIS EDGE Board User s Guide 27/09/2017

ESP32-WROOM-32 (ESP-WROOM-32) Datasheet

WF121: b/g/n module. Product Presentation

Arducam ESP32 UNO board

BT121 Bluetooth Smart Ready Module. July 2016

CN310 Microprocessor Systems Design

ESP8266 Weather Station

Introduction to Arduino

Clicker 2 for Kinetis

GET YOUR DRAGONBOARD UP TO DATE

Arduino Uno Microcontroller Overview

ARDUINO M0 PRO Code: A000111

Yun Shield User Manual VERSION: 1.0. Yun Shield User Manual 1 / Version Description Date. 0.1 Initiate 2014-Jun-21

ESP32-SOLO-1 OEM Installation Manual

Arduino Platform Part I

RN-171-EK Evaluation Board

HEXIWEAR COMPLETE IOT DEVELOPMENT SOLUTION

XNUCLEO-F030R8, Improved STM32 NUCLEO Board

HARDWARE REFERENCE IMM-NRF51822

ARDUINO BOARD LINE UP

Introduction to Microcontrollers Using Arduino. PhilRobotics

Arduino ADK Rev.3 Board A000069

ARDUINO. By Kiran Tiwari BCT 2072 CoTS.

COL862 - Low Power Computing

Bluegiga WF121 Wi-Fi Module. Embedded Wi-Fi modules. for affordable connectivity

ČVUT FEL v Praze, U-BLOX IOT MODULES

FUNCTIONS USED IN CODING pinmode()

Geolocating with ESP8266

CM5000 DATASHEET v0.1

Adafruit HUZZAH ESP8266 breakout

BLE MODULE SPECIFICATIONS

ARDUINO LEONARDO WITH HEADERS Code: A000057

Oberon M2M IoT Platform. JAN 2016

Rephone Core 2G-AtmelSAMD21

ESP-WROOM-S2 Datasheet

DIY Korner home security system

Transcription:

ESP32 WIFI/BLE Board v0.9 From Elecrow Contents 1 Introduction 2 Feactures 3 Specification 4 Interface Function 5 Usage 5.1 Installing the ESP32 Arduino Core 5.1.1 Download the Core 5.1.2 Install the Xtensa and ESP32 Tools 5.2 Example: Blink 5.3 TEST: WIFI 5.3.1 Station 5.3.2 AP 6 Resource Introduction ESP-WROOM-32 is a powerful, generic Wi-Fi+BT+BLE MCU module that targets a wide variety of applications, ranging from low-power sensor networks to the most demanding tasks, such as voice encoding, music streaming and MP3 decoding. The development board breaks out all the module's pins to 0.1" headers and provides a CP2102 USB-TTL serial adapter, programming and reset buttons, and a power regulator to supply the ESP-WROOM-32 with a stable 3.3 V. Espressif doubled-down on the CPU resources for ESP-WROOM-32 with a dual core, running at 160MHz and tons more pins and peripherals. The integration of Bluetooth, Bluetooth LE and Wi-Fi ensures that a wide range of applications can be targeted, and that the module is future proof: using Wi-Fi allows a large physical range and direct connection to the internet through a Wi-Fi router, while using Bluetooth allows the user to conveniently connect to the phone or broadcast low energy beacons for its detection. The sleep current of the ESP32 chip is less than 5 µa, making it suitable for battery powered and wearable electronics applications. ESP-WROOM-32 supports data rates of up to 150 Mbps, and 22 dbm output power at the PA to ensure the widest physical range. As such the chip does offer industry-leading specifications and the best performance for electronic integration, range, power consumption, and connectivity. https://www.elecrow.com/wiki/index.php?title=esp32_wifi/ble_board_v0.9 1/13

Model: ARS01119B (https://www.elecrow.com/catalog/product/view/id/2392/) Feactures Support SD card, UART, SPI, SDIO, I2C, LED PWM, Motor PWM,I2S, I2C, IRUSB-UART Integrated 802.11 BGN WiFi transceiver and dual-mode Bluetooth (classic and BLE). Hardware accelerated encryption (AES, SHA2, ECC, RSA-4096) Integrated LiPo Battery Charger. 10-electrode capacitive touch support Up to 240MHz clock frequency and 520kB internal SRAM Support Station/SoftAP/SoftAP+Station/P2P Support WPA/WPA2/WPA2-Enterprise/WPS Support AES/RSA/ECC/SHA Include bridge, reset- and boot-mode buttons, LDO regulator and a micro-usb connector. Specification FCC/CE/IC/TELEC/KCC/SRRC/NCC Wi-Fi : 802.11 b/g/n/e/i (802.11n up to 150 Mbps) A- MPDU and A-MSDU aggregation and 0.4 _s guard interval support Frequency range : 2.4 ~ 2.5 GHz Bluetooth : v4.2 BR/EDR and BLE specification Radio : NZIF receiver with -98 dbm sensitivity, Class-1, class-2 and class-3 transmitter Audio : CVSD and SBC On-board clock : 40 MHz crystal Operating voltage : 2.2 ~ 3.6V Operating current : Average: 80 ma Operating temperature range : -40 C ~ 85 C Interface Function https://www.elecrow.com/wiki/index.php?title=esp32_wifi/ble_board_v0.9 2/13

EN Reset button. Pressing this button resets the system. BOOT Download button. Holding down the Boot button and pressing the EN button initiates the firmware download mode. Then users can download firmware through the serial port USB USB interface. It functions as the power supply for the board and the communication interface between PC and ESP- WROOM-32. I/O Most of the pins on the ESP-WROOM-32 are led out to the pin headers on the board. Users can program ESP32 to enable multiple functions such as PWM, ADC, DAC, I2C, I2S, SPI, etc. Usage Installing the ESP32 Arduino Core This tutorial covers setting up the ESP32 with Arduino IDE, and documents a few simple example sketches to help make your WiFi/BLE microcontroller work. Download the Core Espressif's official ESP32 Arduino core is hosted here. To install the ESP32 board definitions, you'll need download the contents of the esp32-arduino repository, and place them in a "hardware/espressif/esp32" directory in your Arduino sketchbook directory. First, you need to Create new folder espreesif/esp32, then Download Espressif's official ESP32 Arduino core on here (https://github.com/espressif/arduino-esp32) and unzip it, copy those files to espreesif/esp32 directory. https://www.elecrow.com/wiki/index.php?title=esp32_wifi/ble_board_v0.9 3/13

Copy "espreeif" folder to hardware directory. On windows, that may be C:/program Files/Arduino/hardware, and on Mac that may be /Applications/Arduino.app/Contents/Java/hardware Install the Xtensa and ESP32 Tools To compile code for the ESP32, you need the Xtensa GNU compiler collection (GCC) installed on your machine. Windows users can run get.exe, found in the esp32/tools folder. Mac and Linux users should run the tools/get.py python script to download the tools. Using a terminal, navigate to the esp32/tools folder. Then type: python get.py The get.py python script will download the Xtensa GNU tools and the ESP32 software development kit (SDK), and unzip them to the proper location. You should see a few new folders in the tools directory, including dist and xtensa-esp32- elf once it s done. Example: Blink Once the ESP32 Arduino core is installed, you should see an ESP32 Dev Module option under your Tools > Board menu. Select the Upload Speed -921600 baud, and serial port. https://www.elecrow.com/wiki/index.php?title=esp32_wifi/ble_board_v0.9 4/13

For this test. Plus, with the ESP32 attached to your computer, it s a good time to test out serial. Copy and paste the example sketch below, into a fresh Arduino sketch. int ledpin = 16; void setup() pinmode(ledpin, OUTPUT); Serial.begin(115200); void loop() Serial.println("Hello, world!"); digitalwrite(ledpin, HIGH); delay(500); digitalwrite(ledpin, LOW); delay(500); Upload the code! Once the code finishes transferring, open the serial monitor and set the baud rate to 115200. You should see the blue LED L keep flashing and Hello, world be printed on serial port interface. https://www.elecrow.com/wiki/index.php?title=esp32_wifi/ble_board_v0.9 5/13

TEST: WIFI Station Open the station.ino code, you need to change message in the code. Make sure you fill in the YOUR_NETWORK_HERE and YOUR_PASSWORD_HERE variables with the name (SSID) and password of your WiFi network! https://www.elecrow.com/wiki/index.php?title=esp32_wifi/ble_board_v0.9 6/13

#include <WiFi.h> // WiFi network name and password: const char * networkname = "YOUR_NETWORK_HERE"; const char * networkpswd = "YOUR_PASSWORD_HERE"; // Internet domain to request from: const char * hostdomain = "example.com"; const int hostport = 80; const int BUTTON_PIN = 0; const int LED_PIN = 16; void setup() // Initilize hardware: Serial.begin(115200); pinmode(button_pin, INPUT_PULLUP); pinmode(led_pin, OUTPUT); // Connect to the WiFi network (see function below loop) connecttowifi(networkname, networkpswd); digitalwrite(led_pin, LOW); // LED off Serial.print("Press button 0 to connect to "); Serial.println(hostDomain); void loop() if (digitalread(button_pin) == LOW) // Check if button has been pressed while (digitalread(button_pin) == LOW) ; // Wait for button to be released digitalwrite(led_pin, HIGH); // Turn on LED requesturl(hostdomain, hostport); // Connect to server digitalwrite(led_pin, LOW); // Turn off LED void connecttowifi(const char * ssid, const char * pwd) int ledstate = 0; printline(); Serial.println("Connecting to WiFi network: " + String(ssid)); WiFi.begin(ssid, pwd); while (WiFi.status()!= WL_CONNECTED) // Blink LED while we're connecting: digitalwrite(led_pin, ledstate); ledstate = (ledstate + 1) % 2; // Flip ledstate delay(500); Serial.print("."); Serial.println(); Serial.println("WiFi connected!"); Serial.print("IP address: "); Serial.println(WiFi.localIP()); void requesturl(const char * host, uint8_t port) printline(); Serial.println("Connecting to domain: " + String(host)); // Use WiFiClient class to create TCP connections WiFiClient client; if (!client.connect(host, port)) Serial.println("connection failed"); return; Serial.println("Connected!"); printline(); https://www.elecrow.com/wiki/index.php?title=esp32_wifi/ble_board_v0.9 7/13

// This will send the request to the server client.print((string)"get / HTTP/1.1\r\n" + "Host: " + String(host) + "\r\n" + "Connection: close\r\n\r\n"); unsigned long timeout = millis(); while (client.available() == 0) if (millis() - timeout > 5000) Serial.println(">>> Client Timeout!"); client.stop(); return; // Read all the lines of the reply from server and print them to Serial while (client.available()) String line = client.readstringuntil('\r'); Serial.print(line); Serial.println(); Serial.println("closing connection"); client.stop(); void printline() Serial.println(); for (int i=0; i<30; i++) Serial.print("-"); Serial.println(); Then open the serial monitor. https://www.elecrow.com/wiki/index.php?title=esp32_wifi/ble_board_v0.9 8/13

When the WiFi connected! is printed on the serial monitor,press the BOOT button, your ESP32 wifi/ble module will send a request to example.com and you can see a few message of HTML is printed the serial monitor. https://www.elecrow.com/wiki/index.php?title=esp32_wifi/ble_board_v0.9 9/13

AP Open and upload the ap.ino code. #include "WiFi.h" #define AP_SSID "esp32" enum STEP_AP, STEP_END,STEP; void onbutton() https://www.elecrow.com/wiki/index.php?title=esp32_wifi/ble_board_v0.9 10/13

static uint32_t step = STEP_AP; switch(step) case STEP_AP://AP Only WiFi.mode(WIFI_AP); Serial.println("** Starting AP"); WiFi.softAP(AP_SSID); break; case STEP_END: Serial.println("** Stopping AP"); WiFi.mode(WIFI_OFF); default: break; if(step == STEP) step = STEP_AP; else step++; //little debounce delay(100); void WiFiEvent(WiFiEvent_t event) switch(event) case SYSTEM_EVENT_AP_START: Serial.println("AP Started"); WiFi.softAPsetHostname(AP_SSID); break; case SYSTEM_EVENT_AP_STOP: Serial.println("AP Stopped"); break; default: break; void setup() Serial.begin(115200); pinmode(0, INPUT_PULLUP); WiFi.onEvent(WiFiEvent); Serial.print("ESP32 SDK: "); Serial.println(ESP.getSdkVersion()); Serial.println("Press the button to select the next mode"); void loop() static uint8_t lastpinstate = 1; uint8_t pinstate = digitalread(0); if(!pinstate && lastpinstate) onbutton(); lastpinstate = pinstate; https://www.elecrow.com/wiki/index.php?title=esp32_wifi/ble_board_v0.9 11/13

Open the serial monitor. Then press the BOOT key to start AP pattern. The AP started will be printed on the serial minotor. Now you can turn on mobile phones to search WIFI esp32 and connect to it. Resource https://www.elecrow.com/wiki/index.php?title=esp32_wifi/ble_board_v0.9 12/13

Code for arduino (https://www.elecrow.com/wiki/index.php?title=file:code_for_arduino.zip) ESP32S_WIFI_BLE_Board_v1.0_Eagle+schematic (https://www.elecrow.com/wiki/index.php? title=file:esp32s_wifi_ble_board_v1.0.zip) Retrieved from "https://www.elecrow.com/wiki/index.php?title=esp32_wifi/ble_board_v0.9&oldid=17578" This page was last modified on 19 May 2017, at 01:24. This page has been accessed 105 times. https://www.elecrow.com/wiki/index.php?title=esp32_wifi/ble_board_v0.9 13/13