Its easier then ever to get started with micropython developement on Mac OS X. This howto assumes that the user is starting from zero. Lets get started.
Install Python 3.7
Mac OS X comes with Python 2.7. We will need Python 3 for our developement tools. Viisit python.org and download Python 3.7 64 bit for mac os x.
Once the download is complete open the package to install Python. Follow the instructions in the installer to complete the installation.
Install NodeMCU ESP32 Serial Driver
OS X doesn’t include a driver for the USB to serial chip used on the NodeMCU boards. Click the link below to download the driver.
Next, unzip the download. Open the folder and double click on the “.dmg” file. Run the installer and follow the instructions.
The first tool we’ll install is a command line tool for programming ESP8266 and ESP32 based boards. You can use this tool to write the micropython firmware to the ESP32.
To install esptool you’ll need to open the Terminal.app. Its located in the Applications -> Utilities folder. In terminal type the following:
> pip3 install esptool
Install uPyCraft IDE
Our primary tool for micropython development will be uPyCraft. Click on the link below to down uPyCraft.
Open the zip file and copy uPyCraft to the Applications folder.
Download Micropython Firmware
Now visit the Micropython website and download the firmware for the ESP32. The link below will take you to the download page.
Write Micropython to the ESP32
Liet’s write the firmware to the ESP32. We will do this using esptool. Open terminal.app. You will need to switch to the directory where you downloaded the bin file. For me its the Downloads folder. Be sure only one ESP32 is connected to your Mac. In terminal type the following:
> cd ~/Downloads
> esptool erase_flash
write_flash 0x1000 esp32-idf3-20191220-v1.12.bin
That’s all there is to it. You now have everything you need to develop in micropython on the Mac.