For this week assigment we'll have to write an application that interfaces with an input device board.
I used my hello_input board, first I checked the python code of the application and then based on this code I wrote a new one and included in the original code, to show both in the window. I
At the left side we see the original indicator and a new circular indicator below, both indicating ambient light. The figure at the right indicates the light produced by a headlight beam. Basically I modified the original code including a Canvas for creating a circle and then I varied the width of the line border, wich turns narrow with incident light. The following tutorials were very useful http://effbot.org/tkinterbook/canvas.htm http://www.lomasdeterciopelo.co.cr/apache2-default/joomla_esp/index.php/apoyo-educativo/python/107-tkintercanvas.html
The following link hello.sun.45.py shows the modified python code, and there is a video also.
I also developed an interface with National Instruments's LabVIEW. To make this I had to read the serial port data and then processed this data in the same way as with the light sensor's python interface application program. The following links were usefull for this purpose, http://zone.ni.com/devzone/cda/tut/p/id/7466, http://www.ni.com/support/visa/vintro.pdf
The figure shows the graphical programming, first of all the program reads the port data, then the data is prepared to be processed and showed by the indicators.
The next figure displays two views of the front panel, with the indicators and the left one measures environmental light and the right one is measuring a headlight beam on the sensor. The numbers in the box displays the same amount of light as the pytnon's program displays. The LabVIEW file is in the link Light.vi
In this assigment I learned about data adquisition and interfacing, which will be very useful for my final project. This time I want to thanks to Jesus Fabian, https://github.com/jfabian, our advisor in phyton programming.