12 Interface & application programming

write an application that interfaces with an input &/or output device

The recitation on embedded web programming.

I took a stab at trying both javascript and python to communicate with my unipolar stepper motor board. In order to communicate with my device, I used FTDI and then Node.js for serial communication to websockets and then javascript & html. I utilized Tomer Weller's serial-to-socketIO which took care of serialports while providing some very nice javascript/HTML to hardware code examples to play with. Using terminal, I navigated to the directory where I git cloned the serial-to-socketIO repo and typed in:

            node app.js /dev/tty.Bluetooth-Incoming-Port

The script returned "go to" where it takes me to a web interface which I can customize for display my data from my devices.

One thing I realized I messed up on was that for my unipolar stepper board, I only had a 2x3 header for AVRISP connection to the board. The 6-pin lead was dedicated for the unipolar stepper motor. This means that I wouldn't be able to do serial FTDI communication while controlling my stepper motor so instead I will opt to control my micro servo motor...

I used very simple code from a servo arduino example to test and see if servo is in the anticipated ADC pin. For some reason if I uploaded code with things plugged in (servo and ftdi), I would get ERROR messages. So I unplugged them while uploading and plug them back in, things seem to be okay.

However, the servo does not respond so my guess is that I routed the servo in the wrong location or connected the schematic incorrectly.

To make an interface with Python, After installing all the necessary things to get Python up and running (PySerial), I navigated to the py directory where my python script lies through the terminal. Then I typed in:

            python hello.mic.44.py /dev/cu.usbserial-FTF4BJVR 115200