I have not had much to do with Arduino or microcontrollers, apart from updating and operating my 3D printer. Microcontrollers, for example the ESP32, offer a cheap alternative to the Raspberry Pi for certain purposes, such as collecting data or certain control or monitoring tasks: WLAN and Bluetooth included. After entering new territory for me here, I wanted to share my experience from a beginner's point of view. Background of my efforts was a concrete use case.
I had set myself the goal to record the water flow of my water-to-water heat pump. For measuring the flow I use an ultrasonic flowmeter TUF-2000B, this works so far and shows the actual flow and offers RS485 as interface, see: Commissioning Ultrasonic Flowmeter Flowmeter TUF-2000M. To display and record the flow rates of the TUF-2000B in Home-Assistant, I need a way to read out the serial interface RS485 and transmit the data via WLAN to Home-Assistant. For receiving the data in Home-Assistant I need something like MQTT, which I will describe in a separate article.
Equipment
For the use case, i.e. the recording of data from a RS485 interface, I got the following hardware and have it available:
RS485 to TTL 5V converter with MAX13487 chip for Raspberry Pi Arduino and other MCU
as plan B I would also have a Raspberry PI 3 in the drawer
But my first intermediate goal for now is just to be able to address the ESP32 via the existing USB port and to upload an example: Both should be possible via the Arduino IDE.
Not needed for a long time, but from updating the 3D printer I remember that the Arduino IDE is available in the Windows Microsoft Store:
After starting the IDE, the board hardware can be selected under Tools, Boards.
ESP32 is missing from the boards
Unlike the 3D printer, I can't find the ESP32 among the available boards:
After a brief search, additional source URLs, for previously unknown boards, can be added under Preferences:
After a short excursion with other URLs and the board version 2.02 -> see ESP32 2.0.2, it worked with version 1.06 and the URL: "https://dl.espressif.com/dl/package_esp32_index.json" then worked:
After specifying the URL, the hardware can be installed and selected in the Boards Manager:
Connect ESP32 via USB
The ESP32 can simply be connected to the computer with a USB cable, which also triggers the typical USB noise when connecting new devices, but the ESP32 does not appear in the Arduino IDE.
Questions / Comments