Input Devices

This assignment has three parts:

---Make Board Electronics---Programming Board
---Python Interface

Observation: I tried in Windows, and so far I have not been able to finish, so that I had to do in Ubuntu.

Electronics Board
For this part use the filesTraces and Interior, work is done in the modela and proceed to solder, the only observation is in photoresistor because it has an orientation.

Programming Board
Use the following tutorials:

Tuto1
Tuto2
Tuto3

After observing and understanding all, I think I'm ready to program the board, I decided to make the light sensor, files that are downloaded are hello.light.c and makefile The archive hello.light.45.c is used to generate the hex, the makefile used to build the file hello.light.45.hex is important that all files are in one folder.
Let's start with the list of commands:

sudo make -f hello.light.45.make program-usbtiny
avrdude -p t45 -c usbtiny -U flash:w:hello.light.45.c.hex
sudo make -f hello.light.45.make program-usbtiny
---- You may leave them some kind of error, don´t worry, what matters is that you have created the "hello.light.45.hex", that´s all. Other commands are done with python

DSCF6306

Python Interface
Install Python, type in console "apt-get install python". is important to determine the serial port. For that we open a "console", we do as an administrator and type ls /dev we find "ttyUSB0" o "ttyUSB1" or the name of our serial cable. In my case I used "ttyUSB1"
The next step is to put in console python hello.light.45.py /dev/ttyUSB1, if everything went right, the assignment is completed.

DSCF6304DSCF6312