-
1Getting Started - the software!
I'm going to assume you're not a noob to building electronics because, after all, this is just a functional block that you're going to be placing in your own larger project. Hence there will be no egg-sucking tutorials. Google it if you don't feel up to speed with anything. However, I'm going to assume that maybe you've never had much to do with the Arduino development environment.
You're going to need an ESP32 based board and you're going to need a way to program it.
The board is easy. Search Ebay for "ESP32S NodeMCU" and you will find a nice board which includes a USB connector, can be run directly from 5V (it has its own 3.3V regulator) and all the exposed IO pins you could ask for as well as an onboard LED you can flash. Buy it.
These instructions are for Windows. Me no do Linux, or apple-ly 'puters. Also, I only show the normally successful path. Who knows what horrors might happen; if things go pear shaped, try Googling the error. It mostly works for me.
The development environment is pretty simple too. If you haven't already, download and install the latest Arduino Integrated Development Environment (IDE) package from Arduino.cc and fire it up.
Go to File>Preferences and you will find a spot marked "Additional Boards Manager URLs". Click on the icon to the right of this and add the line "https://dl.espressif.com/dl/package_esp32_dev_index.json" and press OK.
Then go back and goto Tools>Boards:something>Boards Manager. Wait for this to populate the list, then enter "ESP32" in the search line. From the list, select "ESP32 by Expressif Systems" and click on "INSTALL".
Once installation is complete, go back to Tools>Board:something> and from the huge list of boards, select "NodeMCU-32S"
You are ready to rock!
Try to load the project code. It will probably prompt you to create a directory (most likely in My Documents>Arduino) to store it in. That's fine.
You can then try a test compile (Sketch>verify/compile) to make sure all is well with the libraries.
-
2Uploading code to the NodeMCU board
Connect a microUSB cable to the board and a spare USB socket.
The appropriate device driver should load and a new COM port will appear in the list of com ports on the IDE: Tools>Port. Choose it.
Select an upload speed of 115200. Then select Sketch>Upload
The compile will complete and you will see a message: "Connecting.....____..." indicating that it's waiting for connection (which means it's waiting to talk to the board bootloader program).
Press and hold the BOOT button on the board until the program starts being written.
The message"Hard resetting via RTS pin..." is your cue to celebrate a successful upload. The program is now running!
-
3Things you need to know about the ESP32
The ESP32 itself runs on 3.3V. Don't put more than 3.3V on an input pin. You may let the magic smoke out.
The NodeMCU implementation includes a 3.3V regulator and includes an USB interface so you don't have to muck about with USB to Serial converters. You can apply 5V to the Vin pin in the production setup to run the unit.
When programming the board, you need to press the BOOT button while the programming software is trying to upload. This starts the boot loader routine and the board and the programming software will then hopefully start talking.
The analogue inputs take 0-3.3 v with a corresponding reading of 0-4095. The DAC outputs have only 0-255 levels for the same 0-3.3V output.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.