10 Input Devices

Assignment

The assignment for this week is to measure something. I am going to build some board with sensors - input devices and run Python visualisation to see and measure sound, light and move.

Building boards and installing Python

I built several examples of input hello worlds and installed Python on my computer. I chosed Python 2.7.3 ( for Windows 7 64 bits).

Download Python here. After installing the programm add it to your Path. Go: Start-Computer-System Properties-Advanced System Settings-Environmental Variables-select Path and choose Edit.

Paste: C:\Tcl\bin;%PATH%;C:\Python27

You need also:

  • PySerial

For Windows 64 download pyserial-2.6.win-amd64-py2.7.‌exe

  • Tkinter

Get Tkinter here

 

Hello Microphone Board

Download files for hello mic board. ( c and makefile).

Connect the board with the Fab ISP and flash Microcontroller =

open terminal ( cmd) go to the same directory where you have saved files and paste:

make -f hello.mic.45.make program-usbtiny ( for Windows)

not success

after pasting this command and trying version without "sudo" I received twice message from my terminal that sudo and also make are not recognized as an internal or external command.

solution

I needed to reinstall avr drives. After this command MAKE worked and I was able to flash microcontroller. Unfortunetly microphone didnt work ( I am waiting for new order of microphones) and python animation wasnt running properly.

Hello Light Board

I soldered hello_light board. I flashed microcontroller this time without problems using FabISP.

To flash microcontroller you need to go to right directory ( where have you saved makefile). Open terminal ( start, write CMD) and type

make -f hello.light.45.make program-usbtiny

after this command you should recieve messega back from the terminal which ends like :

If you want to see python code wrote by Niel type:

python hello.light.45.py CAM12 ( CAM12 is a number of usb port, you can check number of the CAM going to START -> Devices and Printers ).

Then will pop up new window with a graphic which shows how much light is captured by the the sensor.


Hello Temperature Board

Published on   May 24th, 2013