Replies: 1 comment
-
This repository is not about Node.js. Node.js does not run on an ESP32 or other embedded microcontrollers. The Moddable SDK provides access to the serial port in JavaScript on an ESP32. It uses the ECMA-419 I/O APIs for that. There is a serial echo example in the Moddable SDK that is similar to your example. Here's the relevant code snippet. new device.io.Serial({
...device.Serial.default,
baud: 115200,
port: 2,
format: "buffer",
onReadable: function(count) {
this.write(this.read());
},
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
code to use esp2 serial port 2 in Arduino is something like
what is equivalent code in nodejs?
Beta Was this translation helpful? Give feedback.
All reactions