Skip to content

ourarash/arduino-node-angular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arduino-Node-Angular

A complete end-to-end starter project for send/receive commands from an Arduino board on web using Angular.

This project consists of three parts:

  1. Arduino firmware
  2. Node server
  3. Angular client

The arduino firmware and Node server should run on the same device. The Angular client can run on any web device that can connect to the Node server through network.

Screenshot

Installation

First clone the repo:

git clone https://github.com/ourarash/arduino-node-angular.git

Arduino

Upload serial.ino to your board.

Find out the name of the serial port from Arduino Tools menu.

Node server:

Use the serial port name instead of <SERIAL_PORT_NAME> below:

cd arduino-node-angular/serial-websocket/
npm install
node examples/simple.js --serialPortName="<SERIAL_PORT_NAME>" --serialPortNameRate=9600 --webSocketPortNumber=8081

Angular client:

First make sure Angular CLI is installed.

cd arduino-node-angular/angular-websockets-client
npm install
ng serve