Measure something: add a sensor to a microcontroller board that you have designed and read it.
There are many input devices such as:
Temperature sensor : Thermistors are thermally sensitive resistors whose prime function is to exhibit a large, predictable and precise change in electrical resistance when subjected to a corresponding change in body temperature.
Flex sensor : is a sensor that measures the amount of deflection or bending. Usually, the sensor is stuck to the surface, and resistance of sensor element is varied by bending the surface.
And a lot more like switch, motion sensor , sound sensor, light, sensor, magnetic field , motion sensor.
I am using Attiny 45 and my servo motor is connected to PB3 pin
.
.
.
.
Since I am using connection pis that needs drilling holes in the board the bottom layer copper will short circuit them so I had to remove it using electric grinder
.
.
Then I soldered the pins, checked the shorts and everything is good
.
.
.
I used this code to program the board to move the servomotor :
This is the output when the sensor detect somthing:
This is the output when nothing is detected:
Download Files :
Download brd file here
Download sch file here