Serial Port #629
Replies: 10 comments 34 replies
-
|
The preferred module for serial is in the second one you list -- in $MODDABLE/modules/io. It implements the API from the forthcoming ECMAScript® Embedded Systems API Specification. We intend to move IO in the Moddable SDK over to this API during the course of 2021. The implementation is still early, though it has been reliable on both ESP32 and ESP8266. FWIW - for file transfers to an MCU over serial, the most common problem is buffer overflow on the receiver. This happens when the sender transmits more quickly than the receiver can process the data. A good solution is to implement some form of flow control by having sender wait for periodic acknowledgements from the receiver before transmitting additional data. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you |
Beta Was this translation helpful? Give feedback.
-
|
Iin the manifest "$ (MODDABLE) /modules/io/manifest.json" give me an error. This is because my "io" directory is outdated. |
Beta Was this translation helpful? Give feedback.
-
|
I followed your indication, and the compiler gave me an error about the version esp-idf. C:\Users\fly3\projects\moddable\examples\piu\k9>mcconfig -d -m -r 90 -p esp32/moddable_two What can I do ? |
Beta Was this translation helpful? Give feedback.
-
|
I installed click module, and now I get this error: C:\Users\fly3\projects\moddable\examples\piu\k6>mcconfig -d -m -r 90 -p esp32/moddable_two bles2gatt bleservicesReconfiguring ESP-IDF... ESP-IDF v4.2 It seems that "IDF_PYTHON_ENV_PATH" is not setted. Is it a system or user variable ? How can I set it? |
Beta Was this translation helpful? Give feedback.
-
|
I resolved some problems about requirements and this is my last situation: C:\Users\fly3\projects\moddable\examples\piu\k6>mcconfig -d -m -r 90 -p esp32/moddable_two bles2gatt bleservicesReconfiguring ESP-IDF... ESP-IDF v4.2 This is the error when I try to install " pip install gdbgui==0.13.2.0 " WARNING: Discarding https://files.pythonhosted.org/packages/cf/c6/aa3ac939ec1028b7e0998c4ed88d9cd18782ca458e834f0faaad2823af3a/gevent-1.3.1.tar.gz#sha256=600d02a31c08936fe4a5181756009a4a3663403b41bc122df039dae0aa3e3831 (from https://pypi.org/simple/gevent/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. |
Beta Was this translation helpful? Give feedback.
-
|
I followed the indication above and now I have this error: is not able to compile a simple test program. It fails with the following output: CMake will not be able to correctly generate this project. -- Configuring incomplete, errors occurred! |
Beta Was this translation helpful? Give feedback.
-
|
The ESP32 supports up to three serial ports. From |
Beta Was this translation helpful? Give feedback.
-
The code snippet above should not work. It passes
The |
Beta Was this translation helpful? Give feedback.
-
|
The default wiring for a display uses pin 2 for DC. For example, here's the declaration from the Moddable Two manifest: Try using a pin that is free.
Serial port |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
In the examples I saw to import the serial command in various ways.
es: import Serial from "serial"; (mail)
"$(MODDABLE)/contributed/serial/manifest.json" (manifest)
or
let serial = new Host.io.Serial({ (mail)
"$(MODDABLE)/modules/io/manifest.json" (manifest)
or
import Serial from "builtin/serial";
https://github.com/Moddable-OpenSource/moddable/blob/e9742b49d5132f2723d3a5fca45b65cf3818d01a/documentation/io/io.md
Which is the difference between these example and what is the best solution to connect to a PC
Thank you
Beta Was this translation helpful? Give feedback.
All reactions