By Carlos Rimarachín

Input Devices

 

 

 

Input Devices :

In this assignment I chose two examples, hello.button.c and hello.mic.c, I used FabModules for milling the boards, then I soldered and finally I programmed those boards.

After that I used python for graphic interface, for this part I downloaded the serial.py (recognize Serial Port).

I use Windows, and I had some problems with the default archives.py (rx.py,term.py,hello.mic45.py):

Here are the problems and the solutions:

  1. I downloaded the archive.py and saved it in my Desktop, and when I run the program, I got an error because it was not recognized "import serial", the solution was copy the archive.py from Desktop (In my case) to python26 file directory (The version I installed - "C:/python26").
  2. Then the archive.py run but also finished suddenly, and that occured because in the program exist a condition that ordered exit the running program, and the solution in my case was edit and comment these code lines: #sys.exit()
    #port = sys.argv[1]
    #speed = int(sys.argv[2])
  3. The last one was edit that line code and choose the Port and Rate: serial.Serial(7,9600)

To find a Port I ran a program in python that scan all the Ports available and unavailable and it indicates the number of Port that you are using.(scan.py - search in web and download).

Running scan.py: COM8-port 7

For the first example exist two archives in python, rx.py and term.py, check the video(click on the image):

For the second example exist the archive hello.mic.45.py, check the video(click on the image):