diff --git a/README.md b/README.md index 85958577dc76cb8bddddf65d71f156b0fe90dd8b..fbe318249408f55b93e55e1a42c0f91cd096e7be 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ It's in the early stages, so bear with us. Everything is going to be great. # Usage -## Installing Node.js, WebSocket and SerialPort +## Installing Node.js, WebSocket and SerialPort, and MathJS To Run DMC, you'll need to install node.js, and then the packages serialport and ws (websocket). @@ -45,6 +45,12 @@ To install ws, do ``npm install ws`` +## Install MathJS + +MathJS is just a node package that does maths. To install, you guessed it, do + +```npm install mathjs``` + # Running DMC To run the program, we launch the main.js file with node, from the command line. One of the things this does is run a tiny HTTP server that we can use to access the UI. @@ -81,6 +87,10 @@ In a browser open *localhost:8080* you will see the mods and this msg in the ter - rm modules - change settings +# Troubleshooting + +Herein will contain a list of known problems / common errors and their fixes. + # Writing New Modules - whenever a menu is requested, the system searches ```modules/ * ``` for *anything*. include your .js of a new module there diff --git a/modules/hardware/atkseriallink.js b/modules/hardware/atkseriallink.js index fcbd8b75b743cbc10586011caddeb984767414ad..4655d356a5599f0949042b11611ef73e9fbd394b 100644 --- a/modules/hardware/atkseriallink.js +++ b/modules/hardware/atkseriallink.js @@ -48,15 +48,22 @@ function ATKSerialLink() { serialport = null function findSerialPort() { + state.portStatus = 'searching for CP2102 device' + var found = false SerialPort.list(function(err, ports) { ports.forEach(function(serialport) { if (serialport.manufacturer == 'Silicon Labs') { console.log('found cp2102 serialport') + found = true state.portName = serialport.comName openSerialPort() } }) }) + if(!found){ + console.log('no CP2102 device found, try serialport-list to make sure it is available to the system') + state.portStatus = 'no CP2102 device found' + } } function openSerialPort() {