{"id":26871147,"url":"https://github.com/codeadamca/esp32-thonny-ampy","last_synced_at":"2026-04-16T18:36:03.096Z","repository":{"id":47432236,"uuid":"516131287","full_name":"codeadamca/esp32-thonny-ampy","owner":"codeadamca","description":"A walkthrough of using Thonny and Ampy to connect to an ESP32 board for the first time. ","archived":false,"fork":false,"pushed_at":"2025-01-26T22:23:49.000Z","size":1444,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T07:18:34.968Z","etag":null,"topics":["ampy","esp32","learning-code","thonny"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeadamca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-07-20T20:52:04.000Z","updated_at":"2025-01-26T22:23:52.000Z","dependencies_parsed_at":"2025-01-26T23:29:54.648Z","dependency_job_id":null,"html_url":"https://github.com/codeadamca/esp32-thonny-ampy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codeadamca/esp32-thonny-ampy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadamca%2Fesp32-thonny-ampy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadamca%2Fesp32-thonny-ampy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadamca%2Fesp32-thonny-ampy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadamca%2Fesp32-thonny-ampy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeadamca","download_url":"https://codeload.github.com/codeadamca/esp32-thonny-ampy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadamca%2Fesp32-thonny-ampy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278740822,"owners_count":26037480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ampy","esp32","learning-code","thonny"],"created_at":"2025-03-31T07:18:37.265Z","updated_at":"2025-10-07T07:55:00.287Z","avatar_url":"https://github.com/codeadamca.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Basic Introduction to an esp32 Board\n\nA walkthrough of using Thonny and Ampy to connect to an ESP32 board for the first time. \n\n## ESP32 Drivers\n\nDownload the [ESP32 Drivers]() and walk through the installation process. Connect your ESP32 board using a USB cable. \n\nYou will need to know the port name your board is connected to. Run the following command:\n\n```\nls /dev/tty.*\n```\n\nThe command will list your existing ports:\n\n```\n/dev/tty.Bluetooth-Incoming-Port\t/dev/tty.SoundcoreLifeQ35-Spp1\n/dev/tty.LEGOHubA8E2C19B5757-Ser\t/dev/tty.usbserial-14220\n/dev/tty.SoundcoreLifeQ35-OTA1\n```\n\nIf possible, determine which port is your ESP32 board and copy it for later. \n\nIf you are not sure which one is your board, disconnect your board, then run the list command again. Take note as to which port has been removed from the list. This is the port we will need for later. Mine port is:\n\n```\n/dev/tty.usbserial-14220\n```\n\n## LED\n\nIf your ESP32 board has an onboard LED, you can likely use pin two. If not, you will need to connect the circuit below and change the pin to 22:\n\n![LED Circuit](_readme/esp32-led.png)\n\nThen create the following Micropython program using your favourite IDE. I would recommend [VSCode](https://code.visualstudio.com/) or [Thonny](https://thonny.org/).\n\n```python\nimport time\nfrom machine import Pin\n\nled = Pin(2, Pin.OUT)\n\nwhile True:\n\n    led.value(1)\n    time.sleep(1)\n\n    led.value(0)\n    time.sleep(1)\n\n    print.write(\"Working...\")\n```\n\nNext you will need to upload your program to your ESP32 board. This can be done using either of the two methods below:\n\n## Thonny\n\nConnect your board if it is not connected. Then follow these steps:\n\n1. Download the [Thonny](https://thonny.org/) IDE\n2. In the main menu, click ```Thonny``` and then ```Preferences...```\n3. Click ```Interpreter```\n4. From the first dropdown, select ```Micropython (ESP32)```\n5. From the second dropdown, choose your port or the ```Try to detect port automatically``` option\n\n   ![Thonny Preferences](_readme/thonny-preferences.png)\n\n6. Open your LED program\n7. Click on the green play botton to uplaod your code to your ESP32 board and execute\n\n## Ampy\n\nA second option is to use the IDE of your choice and then use the Terminal and a small Python module called [Ampy](https://pypi.org/project/adafruit-ampy/) to upload and execute.\n\nThis process will assume you have Python and PIP instapped. \n\n### Python\n\nNote that a Mac usually comes with Python installed. My Mac has Python 2 installed, so I used [Brew](https://docs.brew.sh/Homebrew-and-Python#python-3y) to install Python 3. Run the following command to see what version of Python you have installed:\n\n```\npython --version\n```\n\nIf the response is Python 2, try this command:\n\n```\npython3 --version\n```\n\nIf this does not work, you will need to install Python 3 using [Brew](https://docs.brew.sh/Homebrew-and-Python#python-3y).\n\n### PIP\n\nCheck that you have PIP installed. Try the following commands:\n\n```\npip --version\npip3 --version\npython2 -m pip --version\n```\n\nIf you no not have PIP installed, you can install it using [Python](https://pypi.org/project/pip/).\n\n### Ampy\n\nInstall Ampy using the format that best worked for you, use one of the following:\n\n```\npip install adafruit-ampy\npip3 install adafruit-ampy\npython3 -m pip install adafruit-ampy\n```\n\nThen using the Terminal, navigate to the same folder as your ```led.py``` file and run the following command:\n\n```\nampy --port /dev/tty.usbserial-14210 run led.py\n```\n\nYou will need to replace the port name with your port name.\n\n***\n\n## Repo Resources\n\n* [Visual Studio Code](https://code.visualstudio.com/) or [Brackets](http://brackets.io/) (or any code editor)\n* [Silabs ESP32 Drivers](https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers)\n* [Thonny](https://thonny.org/)\n* [Ampy](https://pypi.org/project/adafruit-ampy/)\n* [LMS-ESP32](https://antonsmindstorms.com/product/wifi-python-esp32-board-for-mindstorms/)\n\n\u003cbr\u003e\n\u003ca href=\"https://codeadam.ca\"\u003e\n\u003cimg src=\"https://cdn.codeadam.ca/images@1.0.0/codeadam-logo-coloured-horizontal.png\" width=\"200\"\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeadamca%2Fesp32-thonny-ampy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeadamca%2Fesp32-thonny-ampy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeadamca%2Fesp32-thonny-ampy/lists"}