Question DC Motor is interfaced with Arduino UNO through L293D IC, which is connected on pins 8, 9 and temperature sensor LM35 is connected on pin A4. LCD is connected on pins 2,3,4,5,11, 12. Write a program to: • Rotate the Motor in Clockwise direction, if Temperature in Fahrenheit is more than 100. LCD should display "AIR Fan ON". • If Temperature in Fahrenheit is less than 100 then LCD should display "EXHAUST Fan ON ". Motor should start rotating in anti-clockwise direction. Formula: Temperature in Fahrenheit = ( Input Value from Sensor * 0.48818125)*1.8/32 DO UNO 0 ELE

ZJZ8U9 The Asker · Electrical Engineering

Transcribed Image Text: DC Motor is interfaced with Arduino UNO through L293D IC, which is connected on pins 8, 9 and temperature sensor LM35 is connected on pin A4. LCD is connected on pins 2,3,4,5,11, 12. Write a program to: • Rotate the Motor in Clockwise direction, if Temperature in Fahrenheit is more than 100. LCD should display "AIR Fan ON". • If Temperature in Fahrenheit is less than 100 then LCD should display "EXHAUST Fan ON ". Motor should start rotating in anti-clockwise direction. Formula: Temperature in Fahrenheit = ( Input Value from Sensor * 0.48818125)*1.8/32 DO UNO 0 ELE
More
Transcribed Image Text: DC Motor is interfaced with Arduino UNO through L293D IC, which is connected on pins 8, 9 and temperature sensor LM35 is connected on pin A4. LCD is connected on pins 2,3,4,5,11, 12. Write a program to: • Rotate the Motor in Clockwise direction, if Temperature in Fahrenheit is more than 100. LCD should display "AIR Fan ON". • If Temperature in Fahrenheit is less than 100 then LCD should display "EXHAUST Fan ON ". Motor should start rotating in anti-clockwise direction. Formula: Temperature in Fahrenheit = ( Input Value from Sensor * 0.48818125)*1.8/32 DO UNO 0 ELE
Community Answer
QQD5JP

The following is the required code to run the motor in clockwise if temperature is greater than 100 fahrenheit and in anti-clockwise if the temp is less than 100 fahrenheit. Also the respective message is displayed. Pre-work Since the terminals of motor are not initially marked for rotation purpose. Connect the terminals to battery and see the direction of rotation. If the rotation is anti clockise then change the terminals. Now for the configuration in which the rotation is clockwise, take the pin of motor, to which the positive terminal of battery is connected. Connect this pin to Arduino PIN 8 and other pin of motor to Arduino PIN 9. Also check the pin configuration of LCD and change accordingly in the code.   Code start #include <LiquidCrystal.h> LiquidCrystal lcd(2,3,4,5,11,12); // Declaring the LCD pins as specified int sensorValue; int temp; void se ... See the full answer