Receive Serial Communication(Tool Status Updates) from microcontrollers to a computer.
Create a Node Server/Web Socket to display data on a webpage
Display missing tools.
Recieve RFID info from each hub to a computer
Identify and display the area in which a tagged tool can be found.
Add bluetooth or radio so that the computer can be located away from the
I investigated several ways to implement this process(Getting the microcontroller(s) to
talk to a web client.)
I have node.js and websocket installed from previous work and examples.
I choose to use
, because I can program through the Arduino IDE.
Firmata is a protocol for a microcontroller to talk to a computer. This will allow me to write a custom
webpage that is getting info from the microcontroller.
Update: many hours were wasted on that one point. I did not realize that most
of the time when I npm install, it provides only local. That is easy to see from the placement of the
folder node_modules, but at the time ......These packages need to be installed in each project or globally.
To understand how to use Firmata, I found this tutorial helpful:
The example found in the Arduino IDE: StandardFirmata can be uploaded to the board.
This gives a webpage access to the input and outputs of the board.
You can use many different applications to talk to the microcontroller, but I want to focus on
Here are the
Client Libraries that can be used to find examples.
This allows us to receive the Analog Data from the microcontroller.
That signal can be processed to determine whether or not a tool is in its holder.
A display can be developed to show the status of all tools.
In my first iteration of the project, I stuggled with websocket. To get around this, I had node.js save
the data from the microcontroller:
Here is the HTML5/JS WebApp:
The app worked fine. But.... It was not elegant enough for me.
After the presentation of my project, Neil suggested looking at his sensor.
When I did this, I also adapted his code to write a python based interface.
It is an OK stop gap to getting the project working.
I used the python code from Neil's RX/TX:
found in the week on Input Devices.
Here is the readout when all tools are available:
After removing a tool:
Python Adaptation/Neil's Code