Can not put code to board using ampy

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
mqcrexcel
Posts: 7
Joined: Mon Apr 15, 2019 9:45 am

Can not put code to board using ampy

Post by mqcrexcel » Tue Apr 16, 2019 9:33 am

Hi body...
I coding in VS Code to blink the LED. Save to test.py file ..
Next, i'm using ampy to run and put the test.py to ESP32
When i using cmd to run the test.py ... The LED Blink ( Image 1 )

Image

But when i using cmd to put the test.py to ESP32 .. The LED no blink ( Image 2 )
Image

So... How can't i fix that.? And how to put the code to ESP32 ??? Thank you

Online
User avatar
Roberthh
Posts: 1518
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Can not put code to board using ampy

Post by Roberthh » Tue Apr 16, 2019 11:09 am

Purtting the script to the baord ios the first step. But then you have to start it, e.g. form the REPL with:

import blink

You should see the file on the devices, if at REPL you enter:

import uos
uos.listdir()

mqcrexcel
Posts: 7
Joined: Mon Apr 15, 2019 9:45 am

Re: Can not put code to board using ampy

Post by mqcrexcel » Tue Apr 16, 2019 3:45 pm

Roberthh wrote:
Tue Apr 16, 2019 11:09 am
Purtting the script to the baord ios the first step. But then you have to start it, e.g. form the REPL with:

import blink

You should see the file on the devices, if at REPL you enter:

import uos
uos.listdir()
Thank you ..
I find my bad is the .py file must be saved as main.py , not test.py like this

Post Reply