Comments (3)
Be sure you're running ampy with the output capture (i.e. don't run with -n). Also ampy will only wait about 15 seconds to collect output and then stop and return everything it saw during that time. If prints happen after that time you won't see them. You probably want to use a serial terminal program to see the output of your script instead.
from ampy.
@tdicola i tried the serial terminal program like you described in your YouTube Tutorial at 31:50 . Everything worked great so far but when i use the screen command to see my debug print texts it stops the running program and just opens the repl command prompt.
I use a Wemos D1 Mini connected via usb with this driver
My port is /dev/cu.wchusbserial1410
(or /dev/tty.wchusbserial1410
). I think because of the driver. Is this the mistake and do i have to install a different driver or am i missing something else?
Do you have a solution or know this problem?
Thank you for your help and great tutorials for micropython.
Edit:
I just found out that screen print out does work when i do ampy run without the no-output -n flag.
But of course i would like to use the -n flag so i do not get the error after the ampy run command waits to finish.
from ampy.
I just flashed a Wemos D1 Mini Pro (16mb flash) and there is no problem with the no output -n flag.
So this seems to be a problem with the driver of the Wemos D1 Mini (4mb flash).
The Wemos D1 Mini uses a different driver and shows as /dev/tty.wchusbserial1410
You can only use the combination ampy run script.py
(without -n) and afterwards view the print outputs with screen /dev/tty.wchusbserial1410 115200
. After a while the ampy run command shows the timeout error but the program keeps running. So no problem.
The Wemos D1 Mini Pro (16mb flash) shows as /dev/tty.SLAB_USBtoUART
Because of that you are able to use the -n flag:
ampy run -n script.py
and afterwards view the print outputs with screen /dev/tty.SLAB_USBtoUART 115200
Hint:
I exported the $AMPY_PORT for the ampy command to keep it short:
echo "export AMPY_PORT=/dev/tty.SLAB_USBtoUART" >> ~/.bash_profile
(On Mac)
Remember to exit Terminal and open a new Terminal Session so the export takes effect
from ampy.
Related Issues (20)
- possibility to put files to a subdirectory
- not neccessarily working on esp32-cam-mb HOT 1
- Ampy cannot execute some commands due to various errors
- GET fails with CircuitPython
- On Ubuntu 22.04: ampy runs into an errror, ab ttyUSB0 is after then never available, till replugin the USB wire.
- put includes hidden folders like .git
- 未找到 'ampy' 命令
- timeout waiting for first EOF reception HOT 1
- Fix location of progress_bar
- How do printing and debug at minicom while ampy run? HOT 1
- I can run my main.py (blinky_1.py) test but the put command does not work
- new feature: add a STOP command HOT 1
- The reason why ampy is unreliable for a large number of boards, like ESP32CAM etc... HOT 2
- CAUTION - THIS PROJECT IS STALE (UNMAINTAINED). There is no point submitting PRs into it - nobody merges any of them... HOT 11
- Cannot upload file with specific starting character on Windows HOT 2
- `rmdir --missing-okay` not working on ESP32 w. MicroPython HOT 1
- infuriating behaviour of recursive put HOT 1
- ampy.pyboard.PyboardError: could not enter raw repl HOT 5
- ampy not working after raspberry pi 4 dist-upgrade
- Make a new release to PyPI please HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ampy.