Page 1 of 1

Can not put code to board using ampy

Posted: Tue Apr 16, 2019 9:33 am
by mqcrexcel
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

Re: Can not put code to board using ampy

Posted: Tue Apr 16, 2019 11:09 am
by Roberthh
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()

Re: Can not put code to board using ampy

Posted: Tue Apr 16, 2019 3:45 pm
by mqcrexcel
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