Interface and Application Programming
Nov 23, 2016

The main goal for this session of the course is to learn how to develop interfaces for our input and output devices.

My plan is to develop an interface to be able to check the value on each distance sensor in order to know the state of each drawer.

I have used Python to read from the serial port. Python grabs the data from the sonar sensor.

I then created a webserver in Node.js. The webserver opens a websocket and waits for clients to connect. The Python module connects to the websocket as a client and sends the value from the sensor.

Once the server has the values, it can send the values to other connected clients.

I created a basic html website with a script in javascript that connects to the server as a client and listens for updates.

Things I did right:

  • Create all the system. And it's working!

Things I did wrong:

  • Too slow! No time left to finish assignment.