September 27, 2023, 16:43
ino //======================================================= #include <IRremote.hpp> #include <LiquidCrystal.h> const int TEMP=6; //Temp Sensor is on pin A0 int val = 0; //Variable to hold integer analog reading float temp_val; const int redLED= 12; const int greenLED= 10; const int buzz= 7; const int motor= 2; const int rs = 8, en = 6, d4 = 5, d5 = 4, d6 = 13, d7 = 11; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); //LCD RS IS IN PIN 8 //LCD E IS IN PIN 6 //LCD D4 IS IN PIN 5 //D5 IS IN PIN 4 //D6 IS IN PIN 13 //D7 IS IN PIN 11 #define IR_RECEIVE_PIN 3 #define DISABLE_CODE_FOR_RECEIVER void setup() { Serial.begin (9600); // set up serial communication pinMode(greenLED, OUTPUT); pinMode(redLED, OUTPUT); pinMode(buzz, OUTPUT); pinMode(motor, OUTPUT); IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK); // set up the LCD's number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD. lcd.print("hello, world!"); } void loop() { lcd.setCursor(0, 1); lcd.print(millis() / 1000); }//loop