ESP32 CAM
Micropython Documentation
pip3 install esptool#For windows change the port: COM4 --> /dev/ttyUSB0
esptool --port COM4 erase_flash#For Linux change the port: COM4 --> /dev/ttyUSB0
esptool --chip esp32 --port COM4 write_flash -z 0x1000 esp32-idf3-20210202-v1.14.binpip3 install adafruit-ampy-p, --port PORT Name of serial port for connected board. [required]
-b, --baud BAUD Baud rate for the serial connection. (default 115200)
-d, --delay DELAY Delay in seconds before entering RAW MODE (default 0)
--help Show this message and exit.
--no-output Do not show the output, do not enter to REPLFor convenience you can set an AMPY_PORT environment variable which will be used if the port parameter is not specified.
#For windows
set AMPY_PORT=COM4
ampy ls
#For linux
export AMPY_PORT=/dev/tty.SLAB_USBtoUART
ampy lsSimilarly, you can set AMPY_BAUD and AMPY_DELAY to control your baud rate and the delay before entering RAW MODE.
- AMPY_BAUD as default is 115200
- AMPY_DELAY as default is 0
ampy ls #list content
ampy reset #perform a soft reset/reboot
ampy mkdir #create a directory on the board
ampy rmdir #forcefully remove a folder and its children on the board
ampy rm file.py #remove a file from the board
ampy run file.py #run a script
ampy get file.py #retrieve a file
ampy put file.py #put a file or folder and its content
ampy put test.py /main.py #copy the content from test.py to main.py- Set the port
set AMPY_PORT=COM4 - Reset the board
ampy --port COM4 reset - List the files on the board
ampy ls - Upload your file with a specific name (for testing) or with main name for being executed as default
#for testing
ampy put file.py
#for being executed constantly
ampy put main.py- Execute the file
ampy run file.pyorampy run main.py
For linux:
screen /dev/tty.board_name 115200To exit, press Ctrl-a then k then y or Ctrl-a then typing :quit
- Install nodejs.
- Install PYMAKR on VScode.
- Create a project(where three files will be created
main.py,boot.pyandpymakr.conf). - Inside
main.pyput the code. - To run the code in the device:
- Connect the device and select
connect device. - Press
Sync project to device. - After the upload finish, press the option
Hard reset the deviceto execute the script.
- Connect the device and select
- To run the REPL, press
Create terminal. - To see the files inside the device, press
Open device in file explorer.
- install python
- install PlatformIO
- create a new project
- select the board
DOIT ESP32 DEVKIT V1 - a folder will be created
- put your code inside
src/main.cpp - edit
platformio.ini, specify the baudratemonitor_speed = 115200