P5.js

Lab: Serial output from P5.js

Overview When you use the P5.js‘ p5.serialport library, it communicates with a webSocket server in the P5.js IDE to give you access to serial devices attached to your computer. This lab shows you how to use P5 to control a microcontroller using asynchronous serial communication. To get the most out of this tutorial, you should…

Read More Lab: Serial output from P5.js

Introduction In the Introduction to Asynchronous Serial Communication lab, you learned about various methods for managing the communications between computers via asynchronous serial communication. These included formatting your data as ASCII-encoded strings or raw serial bytes and managing the flow of data using handshaking. In the P5.js Serial Input Lab, you sent data from one sensor…

Read More Lab: Two-Way (Duplex) Serial Communication Using An Arduino and P5.js
Lab: Serial Input to P5.js

Overview Serial communication to a web page in a browser isn’t something you see every day. Web browsers don’t usually have access to a computer’s serial ports. In order to get your browser-based applications to communicate with a microcontroller serially, you need a program that can both serve up HTML/JavaScript pages, and communicate with the…

Read More Lab: Serial Input to P5.js