Week 11

Introduction to this week

I have some input devices used during the whole semester. I have made a "Button game in week 8", which acturlly includes an input device--- The button.
Their are a lot of input device aroud our life, usually been called SENSORS.

1. ADXL345 digital three axis accelerometer

ADXL345 three-axis accelerometer is a small, thin, ultra-low power 3-axis accelerometer with a resolution of up to 13 bits. This time. To use this sensor module, I connected to arduino Uno, with the following connection: avatar And I use a ADXL345 library programmed in Arduino IDE. Realized the function that Arduino collect vales of 3-axis acceleration and print to my laptop. avatar
The Source codeHere

2. Light sensor

A light sensor can sense the brightness of light, which can be used in many applications. And This time I am going to have a light sensor designed for my final project --- The Zombie shooter.
In my final project, there are many sensors on zombie's body to sense the attack, which is a laser ray. And Arduino Uno again been chose to obtain the light brightness. As it's very easy to use use the analogRead() function from arduino to do the A/D conventer, I am not going to show more details.

3. Gun Trigger

Still in my final project, there is an trigger for the laser gun. It also can be regarded as an input device. Eagle file avatar
When the switch be touched, the Micro-controller can sens the change. Then release a laser ray... avatar