INPUT
In this assignment I had to measure something: add a sensor to a microcontroller board that I've designed and read it.
LESSON >> video recording - web
In this assignment I had to measure something: add a sensor to a microcontroller board that I've designed and read it.
LESSON >> video recording - web
>>> MANUFACTURING
I wished to make the hello mic circuit and I used the knowledge of my assignment 04: Electronic Production.
Here the board:
Programming
I used the knowledge acquired in my assigment 07: Embedded Programming.
But I had some connections errors so I decided to created a new circuit.
So finally I made the Hello light circuit. This is the board.

The purpose of this board is to take input from a phototransistor and display it visually using a python program when the board is connected to a computer via a FTDI cable.
Here you can see how a phototransistor works.
This is my board:
Programming 2.0
In this case I will use Ubuntu to program my board.
After connect the FabIsp and FTDI cables donwload make file open ubuntu Terminal, go to the same folder that you have make file and type:
sudo make -f hello.light.45.make program-usbtiny
[sudo] password for henry:
avr-gcc -mmcu=attiny45 -Wall -Os -DF_CPU=8000000 -I./
-o hello.light.45.out hello.light.45.c
avr-objcopy -j .text -O ihex hello.light.45.out hello.light.45.c.hex;\
avr-size --mcu=attiny45 --format=avr hello.light.45.out
AVR Memory Usage
----------------
Device: attiny45
Program: 426 bytes (10.4% Full)
(.text + .data + .bootloader)
Data: 0 bytes (0.0% Full)
(.data + .bss + .noinit)
avrdude -p t45 -P usb -c usbtiny -U flash:w:hello.light.45.c.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9206
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "hello.light.45.c.hex"
avrdude: input file hello.light.45.c.hex auto detected as Intel Hex
avrdude: writing flash (426 bytes):
Writing | ################################################## | 100% 1.27s
avrdude: 426 bytes of flash written
avrdude: verifying flash memory against hello.light.45.c.hex:
avrdude: load data flash data from input file hello.light.45.c.hex:
avrdude: input file hello.light.45.c.hex auto detected as Intel Hex
avrdude: input file hello.light.45.c.hex contains 426 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.77s
avrdude: verifying ...
avrdude: 426 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
>>> VIEWING
After donwload the python code you have to type:
python hello.light.45.py /dev/ttyUSB0