Skip to content
Discussion options

You must be logged in to vote

The Moddable SDK is moving to using ECMA-419 for I/O, which includes serial. The ECMA-419 APIs are well supported on ESP32 and ESP8266, so you are set there.

On macOS, there are implementations of ECMA-419 Serial, TCP, UDP, and Listener I/O. Because ESP32 and macOS are very different operating systems,, there are differences in configuration. The APIs, however, are identical.

I built a small exampleI starting from the serial echo example. The modified version is configured for macOS and also outputs received bytes to the xsbug console. Here's the main.js script:

import Serial from "embedded:io/serial";
import TextDecoder from "text/decoder";

const decoder = new TextDecoder;
new Serial({
	d…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@gingerbeardman
Comment options

@FWeinb
Comment options

@phoddie
Comment options

@phoddie
Comment options

@gingerbeardman
Comment options

Answer selected by gingerbeardman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants