How to connect to your ESP32 on macos

To find out as what USB device the ESP32 is connected, open Terminal and enter:

ls /dev/tty* | grep usb

in my case I got

/dev/tty.usbserial-14120

Now we can connect via screen:

screen /dev/tty.usbserial-14120 115200

When you reset the board you should see something like this

configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:5656
load:0x40078000,len:12696
load:0x40080400,len:4292
entry 0x400806b0

To end the session in screen, press Ctrl+a, and type :quit and press Enter.

 

MicroPython uos package

When you are familiar with python os and platform package You may wonder how to use it on ESP32 in MicroPython. Because this doesn’t work:

>>> os.name
Traceback (most recent call last):
File "", line 1, in 
AttributeError: 'module' object has no attribute 'name'
>>> import platform
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'platform'

UOS for the rescue

Continue reading “MicroPython uos package”