Node Read Serial Port

Node.js Open Kit Simulator ↗ All recipes
Tip: Ctrl+↵ to run
Node.js code runs server-side, not in the browser. Click Download .js, then on your Pi or server run: npm install <packages> && node filename.js

About this recipe

read-serial.js

Libraries / imports

serialport @serialport/parser-readline

Hardware / pins

No physical pins or components referenced

Key API calls

require() console.log()

How to run

Download .jsnpm installnode file.js.
Editor javascript edits auto-save
Output ready
Output will appear here after you click Run.