How to upload ssd1306.py into my ESP32 without using THONNY

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
Core28
Posts: 1
Joined: Thu Sep 02, 2021 8:24 pm

How to upload ssd1306.py into my ESP32 without using THONNY

Post by Core28 » Thu Sep 02, 2021 8:37 pm

Hi, I'm a complete MicroPython newbie. I will soon start using THONNY or other IDEs. But for now, just for the sake of it, how can I upload ssd1306.py, or any other library, into the REPL of my ESP32, just using a terminal program. I'm using Kitty.
Thanx for your help!

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: How to upload ssd1306.py into my ESP32 without using THONNY

Post by pythoncoder » Fri Sep 03, 2021 8:04 am

I use rshell.
Peter Hinch
Index to my micropython libraries.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: How to upload ssd1306.py into my ESP32 without using THONNY

Post by dhylands » Fri Sep 03, 2021 4:45 pm

I also wrote a little script that takes a list of files, and it generates a python script which will write those files out. You can run that on your board using pyboard.py (which requires disconnecting your terminal program).

https://github.com/dhylands/upy-example ... e_files.py

When you run make_files.py you pass it a list of filenames. It will then generate a files.py file that you can run on your board and it will write out the files that you passed into make_files.py.

Personally, I use rshell (disclaimer - I wrote rshell)

JennaSys
Posts: 33
Joined: Tue Jul 15, 2014 8:29 am
Location: Southern California, US
Contact:

Re: How to upload ssd1306.py into my ESP32 without using THONNY

Post by JennaSys » Sat Sep 04, 2021 7:33 pm

If you are using one of the newer builds (1.16 or 1.17) you can use the new mpremote CLI tool:

Code: Select all

mpremote cp ssd1306.py :
which will copy the file from your local drive to the ESP device.
John Sheehan

Post Reply