A example for serial communication with Arduino and NodeJs to control a Common Cathode RGB LED using an Arduino and Node SerialPort.
The project is a web application to control a common cathode RGB LED using Arduino and Node SerialPort. The server uses the Express framework and Socket.io to transmit data in real time between the server and the client.
The led connection in the hardware is
Color | Pin |
---|---|
Red | 9 |
Green | 10 |
Blue | 11 |
Cathode | GND |
The format that is used to configure the colors is R255G255B255\n
.
git clone https://github.com/franciscodelahoz/arduino-rgb-led-nodejs-example
cd arduino-rgb-led-nodejs-example
Upload the RGB_LED.ino code to the Arduino from the arduino folder
npm i
npm start