Crash Sensor Car

Crash Sensor Car

1. Connect cable of analog A0 with photosensor and resistency in one row.

2. Connect cable of v5 to the other leg of photosensor.

3. Connect the other leg of resistency to GND next to V5

4. Connect LED to 13 digital and other to GND

Task 1: Connections

Crash Sensor Car
Crash Sensor Car
Crash Sensor Car

Task 2: Arduino code

Crash Sensor Car
Crash Sensor Car

//PHOTORESISTOR ARDUINO

//ANALOG PIN int _analogPin = 0; //LED PIN int _pinLED = 13; void setup() { //SERIAL PORT FOR DEBUGING Serial.begin(9600); //CONFIGURING OUTPUT OF PIN LED pinMode(_pinLED, OUTPUT); } void loop() { //READING ANALOG VALUE OF PIN int value = analogRead(_analogPin); //TURN OFF LED PING digitalWrite(_pinLED, LOW); //DEBUGING VALUE IN ARDUINO MONITOR SERIAL Serial.println(value); if(value

Task 3: Video

Crash Sensor Car

Crash Sensor Car – Task #3

arduino – Crash Sensor Car, in category: technology

Written by admin