IN Elektroda.pl gadgets a communication module will appear soon Wi-Fi and Bluetooth based on ESP32 . Compared to previously available modules ESP8266 The ESP32 has two 32b cores, one dedicated to supporting wireless communication. The comparison of ESP8266 with ESP32 shows new functionalities and greater possibilities at a similar price and power consumption.
Characteristics of ESP32 compared to ESP8266: -number of cores: 2 (ESP8266: 1) -WiFi + Bluetooth / BLE (ESP8266: WiFi) -RAM: 512kB (ESP8266: 160kB - 96 + 64) - number of GPIO pins depending on the version: ~ 32 (ESP8266: ~ 16) - ADC channels quantity: 18 12b channels (ESP8266: 1 10b channel) -Number of DAC channels: 2 8b channels (ESP8266: 0) - the number of channels of the touch interface: 10 (ESP8266: 0) - SPI, I2C, UART, I2S, CAN, IR, Ethernet MAC buses (ESP8266: SPI, I2C, UART, I2S) -supporting cryptographic functions: SHA, AES, ECC / RSA, RNG -16x PWM Interfaces for the card SD and MAC Fast Ethernet allow for easy building of universal modules such as: WiFi / BLE / Ethernet / microSD
The module is equipped with a system CP2102 being a USB UART converter, which allows, among others for programming the module from the Arduino level. There is a stabilizer on the module's board, which enables power supply with 5V, e.g. from a USB port.
Integration with the Arduino environment under Win10 control: -we install the latest version of Arduino https://www.arduino.cc/ currently 1.8.3 -we install python 2.7 https://www.python.org/ selecting "Add python.exe to Path" during installation - we install the Git client https://git-scm.com/downloads - run Git GUI as administrator (right mouse button) -select "clone existing repository" - we give the source: https://github.com/espressif/arduino-esp32.git -select the target as the path that you will find in Arduino-> File-> Preferences-> Sketchbook Location, at the end of the path add \ hardware \ espressif \ esp32, then click Clone -We go to the created directories \ hardware \ espressif \ esp32 then \ tools and run get.exe we observe the process of downloading and unpacking - run the Arduino environment, select tools -> board and the option to select ESP32 Dev Module should appear, select the serial port that appeared in the system after connecting the board. We can start working with ESP32! The update consists in starting the Git GUI, selecting the created repository and selecting Remote-> Fetch from-> orgin and then restarting get.exe in \ hardware \ espressif \ esp32 \ tools \
Preparing to work with ESP32 is more complex than in the case of ESP8266, if you notice errors in the description or encounter problems with launching, let us know in this topic, together we should be able to overcome any obstacles.
DS18B20 Blynk Wi-Fi Thermometer - code redemption for ESP8266. As in the previous material, we will try to send data from the temperature sensor to the blynk application on a smartphone. Unfortunately, the arduino thingspeak library does not currently support ESP32, but you can send thingspeak data with regular GET requests.
When you are adjusting your programs on ESP8266 to ESP32, you should, among others change: #include to #include Another change is the names of the pins, we change the naming convention: D2, D3, D4, D5 etc. replace with ordinary 2,3,4,5 etc. We change the program code for blynk from the previous example and we can receive data from the temperature sensor sent via WiFi on the application on our smartphone. More information about blynk in the previous material: ESP8261 D1 mini .
Sample program code:
Log in, to see the code
Main line 1-wire has been configured on the G13 pin, which we connect with the yellow wire of the DS18B20 sensor, the G13 pin is connected with the 4.7kom resistor with + 3.3V, the red sensor wire with 3.3V, and the black with GND.
After configuring the WiFi access program and the blynk token in the code, after compiling and running on ESP32 in the blynk application on the smartphone, the current temperature readings should appear. We managed to use the code described in the two previous materials: D1 mini module - ESP8266 and ESP8266-12E NodeMCU Amica + DS18B20
Run C: \ msys32 \ mingw32.exe and go to the C: \ msys32 \ home \ username \ esp \ web_radio directory
We make the configuration: make menuconfig
In the serial flasher config section, we provide the COM port number on which the ESP32 connected is available (to be checked in the device manager or Arduino environment):
In the Web Radio / BT Speaker section, set the WiFi access parameters and the type of audio output: I chose the built-in 8bit DACs which will give quite poor sound quality, but you can use an external I2S DAC which should significantly improve the quality of the sound played.
We save the settings and exit the configuration tool, then issue the command: make flash After compilation, the result will be sent to ESP32 and run, the audio signal will appear on DAC pins G25, G26: The boot button switches the stream sources defined in: C: \ msys32 \ home \ username \ esp \ web_radio \ main \ playlist.pls
Bluetooth speaker on ESP32: By doing again: make menuconfig we can change the configuration so that the https://github.com/MrBuddyCasino/ESP32_MP3_Decoder project works as a bluetooth speaker. In the component config section, select Bluetooth: In Bluetooth we choose Bluedroid Bluetooth stack enabled: Then the Bluetooth clasics: In the web radio section, select BT speaker mode, here we can change the name of the BT device: After compiling and loading the code into ESP32: make flash e.g. in the smartphone we can search and connect to the ESP_SPEAKER device or with a different name, if you changed it during configuration.
Compared to the previous material about ESP8266, the launch of ESP32 may seem more complex, but it is worth learning new things and trying out the new functionalities offered by ESP32.
I regret that I did not wait, but on the other hand, I think it is a bit too heavy to start from scratch ... Although incomparably better for my target plans, if only because of the large number of ADC channels ...
Well, finally something stronger, I am asking where are any gadgets? Recently I took ESP8266 from gadgets, I got a screwdriver with the electrode logo for free which was nice Such a cool ruler would be useful and I think many people would like such a ruler for a few dozen points
This is a bit more powerful device, it is important that your own soft will not interfere with WiFi support as it could have been in ESP8266, ADC is clearly more useful, and the number of hardware interfaces is impressive.
The module is a bit complicated and there is a lot less documentation and examples. Probably a matter of time. The module actually went on sale half a year ago. He may also have childhood problems. Therefore, ultimately, in the gadget shop, there will be ESP8266, namely Wemos Pro, the original, and this is a curiosity.
In the case of ESP32, the word "soon" has become obsolete as the modules are already available in the elektroda.pl gadgets It's Monday, observing the previous actions Tuesday / Wednesday it may turn out to be empty
As I already wrote, there are sections (Articles / DIY) that allow you to quickly get points thanks to the publication of interesting materials, but in fact it is worth waiting for the next edition because now it would be a bit difficult to collect 1000 points in a few days ...
We run the git tool installed during the integration with Arduino by issuing the command: git clone --recursive https://github.com/espressif/esp-idf.git then we enter the esp-idf directory: cd esp-idf and give the command git submodule update --init
You copied one command on one side and the other on the other. The second is needed when the first is not there --recursive .
So in the C: /msys32/etc/profile.d/ directory we create a file, e.g. export_idf_path.sh enter in the file: export IDF_PATH = "C: / msys32 / home / username / esp / esp-idf"
Save as UTF-8 without BOM. ;)
@TechEkspert Was this radio working for you? After a while, mi begins to interrupt. In addition, the compilation does not work without cleaning ... :(
@TechEkspert , @gulson Is there a schematic of this board somewhere?
@ LED5W radio and BT speaker worked properly, I didn't notice internet radio interrupting but I didn't listen to it for too long, I tested the BT speaker longer and there was no problem with it. The quality of the 8b DAC is poor, you would have to combine some external I2S DAC and test it.
I am using ESP8266. I had a lot of compatibility issues with Arduino. A few handy functions didn't work and I had to avoid such surprises. It cost me a lot of time, especially since my designs were rather unusual - at least I think so. My question: someone tested the ESP32 for compatibility with sketches on an ESP8266? But not in theory, in theory it's always cool. Just the truth, seriously I only change the names of the pins and my WWW server is already on the new board?
Sketch uses 548,674 bytes (41%) of program memory. The maximum is 1,310,720 bytes. Global variables use 38,480 bytes (13%) of dynamic memory, leaving 256,432 bytes for local variables. The maximum is 294912 bytes. esptool.py v2.3.1 Connecting ........_____....._____....._____....._____....._____....._____....._____.... ._____....._____....._____
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
When uploading anything, it fails ... Anyone know what is the reason ??
My question: someone tested the ESP32 for compatibility with sketches on an ESP8266? But not in theory, in theory it's always cool. Just the truth, seriously I only change the names of the pins and my WWW server is already on the new board?
Unfortunately, it does not fly. There are many differences
When uploading anything, it fails ... Anyone know what is the reason ??
Yes, the boot should be held down. I figured it out somehow :)
Oh yeah btw. I don't like this module at all. Few of the ready-made examples are compatible, somehow it does not fit. I have Esp8266 and Vemos D1 pro mini and it's great to combine. I regret these 900PKT on it, because it will probably be in the stuff somewhere.