Return to Main Menu

Taili Zhuang's week 12

Logo1-1

For the final project I decide to make a web interface to control the stepper motor that powers on all mechanisms on the machine. I need a web interface because I didn't design a physical on and off switch to control the motion of the motor. To achieve all this I would need to play with websockets.

Logo1-1

I also got help from Leo, who let me download his web socket package and Javascript code. With Atom, we made the arduino and Javascript to run at the same time. Through this, We can edit an html page to be a press bottom for my machine flower. We made a simple round red bottom. Upon pressing, the machine can be activated or closed down.

Logo1-1

Here is the control interface for the bottom.

Logo1-1

The style file of the page is very simple. Simply create a geometry or a shape which aligns with the middle. In this case, I just want one bottom that can pressed without any effort of precision.

Logo1-1

This is the more strange part of the process. A javascript file is running to connect the websocket with the programmed arduino code at the local files. When controlling the machine, I need to first make sure I click on the "port" bottom to connect the websocket with the arduino. This process has to be repeated every time I reconnect SAMD21 chip to a powersource. After I click the "port", the url interface should be working without any problems. If you would like to have a web interface controlling your machine, you would want to go to leo's github website, and download the fab-notes-main zipped file. And from there you could furthur edit the basic look of the web interface.

Logo1-1

Here is the control interface for the bottom.

Logo1-1