The LED server is made as a driver for the NTNU Cyborg LED dome. The server will process all visuals for the dome and maintain state. There are two visualization tools for the dome, the development mode and the arduino mode.
- Development mode hosts a web site that visualizes the animations on a selected device (Dome or head).
- Arduino mode sends data to the arduino controlled LED dome or box.
NodeJS: https://nodejs.org/en/
Arduino drivers: https://github.com/arduino/arduino-create-agent.
NB! The arduino drivers needs to be installed through the Arduino Create Agent. The older IDEs will not work with the serialport library.
- Download the source code:
$ git clone https://github.com/thentnucyborg/LED-server.git
- Create a .env inside
/server
file with the following:
ADDRESS = localhost
PORT = 8080
AUTO_START = false
AUTO_START_SHOW = 1
FREQUENCY = 500
START_DELAY = 500
- Install dependencies:
$ npm i --prefix server && npm i --prefix client
The server and client needs to be started seperatively, with the following command inside /server
and /client
folders:
$ npm run start
The server is now started and will be hosting the development tool at the default address: http://localhost:3000.
If visulaization on the arduino device is wanted, make sure the device is connected through USB serial before launching the server. The server software will autodetect the arduino device.
The server and client needs to be started seperatively, with the following command inside /server
and /client
folders:
The client needs to be built first, where the files will be placed inside /server/src/build
.
$ cd client
$ npm run build
Then the server can be started from inside the /server
folder.
$ cd server
$ npm run build
ROOT/server/src/model/Program.js contains the different animations available on the device. All of the functions there are templates of how the animation callback looks.
- Nodejs - 9.*
- Express - 4.15.5
- React - 16.2.0
- React Router - 4.2.0
- Redux - 4.0.0
- Styled Components - 3.2.3
- Webpack - 3.11.0
- Babel - 6.23.0
- ESLint - 4.19.0