|
il y a 7 ans | |
---|---|---|
modules | il y a 7 ans | |
public | il y a 7 ans | |
views | il y a 7 ans | |
.gitignore | il y a 7 ans | |
README.md | il y a 7 ans | |
TODO.md | il y a 7 ans | |
app.js | il y a 7 ans | |
package.json | il y a 7 ans |
A node.js app for collecting and displaying LLAP messages from sensors (a-la Ciseco sensors).
Hopefully it should not be too hard for you to poke around the sources, figuring out what code does what and how to modify it to one’s needs.
While doing this project was fun, I have moved on to a different solution for the same “problem”. The approach taken in this project is “one app to rule them all”: the node app monitors the incoming transmissions, processes them, logs the data, takes care of displaying the data over http. I was having hard time making the logging work the way I wanted, and figuring out how to display graphs was a bit daunting. So, all in all, I probably won’t work on this anymore.
The basic hardware setup is:
The software setup / server side:
git clone https://github.com/flabbergast/node-llap
npm install
from the app’s source directorynpm app.js
Note that currently the app expects one Ciseco’s sensor with a thermistor, in the cyclic sleep/transmit mode. The device name should be TM
. All the other LLAP will be only displayed in the log.
Since it’s veery unlikely that you’ll have the same setup as me, some editing of the sources might be necessary. For this reason, I’m including some explanations for the sources; and list some current limitations:
Problems:
Structure:
modules/socket_server.js
); and code to deal with the serial port (modules/serial_node.js
).public/js/socket_client.js
).socket.emit(...)
; for ‘listening’ for a message and act upon its receipt one uses socket.on(...)
.views/{index.jade,layout.jade}
, public/css/style.styl
and public/js/index.js
. Clicking on buttons (code in index.js
) socket.emit
's, received messages are socket.on
-listened to in socket_client.js
, which then updates the page using jquery.onDataOverSerial
in socket_server.js
).Working code (on my machines). Running elsewhere will likely need some source modifications.
Originally inspired by Node-LEDS.