#include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); const int buttonPin = 0; //кнопка int buttonState = 0; //статус кнопки при офф положении enum { SYMBOL_HEIGHT = 8 }; byte crSYMBOL_HEIGHT = { B00001, B00011, B00101, B01001, B10001, B11011, B10101, B10001, }; enum { LCD_WIDTH = 16, LCD_HEIGHT = 2 }; void setup() { lcd.createChar(1, cr); pinMode(buttonPin, INPUT); //делаем кнопку входом lcd.begin(16, 2); //вклучаем нужные строки lcd.begin(LCD_WIDTH, LCD_HEIGHT); } void loop() { buttonState = digitalRead(buttonPin); //считываем сигнал из кнопки if (buttonState == HIGH) { lcd.setCursor(0, 0); lcd.print("NoJob time:"); lcd.setCursor(12, 0); lcd.print(millis() / 1000); lcd.setCursor(2,2); lcd.print("Write plese \1"); delay(500); } else { lcd.clear(); lcd.blink(); lcd.setCursor(0, 0); lcd.print("1"); delay(99999999); } }#include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); const int buttonPin = 0; //кнопка int buttonState = 0; //статус кнопки при офф положении enum { SYMBOL_HEIGHT = 8 }; byte crSYMBOL_HEIGHT = { B00001, B00011, B00101, B01001, B10001, B11011, B10101, B10001, }; enum { LCD_WIDTH = 16, LCD_HEIGHT = 2 }; void setup() { lcd.createChar(1, cr); pinMode(buttonPin, INPUT); //делаем кнопку входом lcd.begin(16, 2); //вклучаем нужные строки lcd.begin(LCD_WIDTH, LCD_HEIGHT); } void loop() { buttonState = digitalRead(buttonPin); //считываем сигнал из кнопки if (buttonState == HIGH) { lcd.setCursor(0, 0); lcd.print("NoJob time:"); lcd.setCursor(12, 0); lcd.print(millis() / 1000); lcd.setCursor(2,2); lcd.print("Write plese \1"); delay(500); } else { lcd.clear(); lcd.blink(); lcd.setCursor(0, 0); lcd.print("1"); delay(99999999); } }#include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); const int buttonPin = 0; //кнопка int buttonState = 0; //статус кнопки при офф положении enum { SYMBOL_HEIGHT = 8 }; byte crSYMBOL_HEIGHT = { B00001, B00011, B00101, B01001, B10001, B11011, B10101, B10001, }; enum { LCD_WIDTH = 16, LCD_HEIGHT = 2 }; void setup() { lcd.createChar(1, cr); pinMode(buttonPin, INPUT); //делаем кнопку входом lcd.begin(16, 2); //вклучаем нужные строки lcd.begin(LCD_WIDTH, LCD_HEIGHT); } void loop() { buttonState = digitalRead(buttonPin); //считываем сигнал из кнопки if (buttonState == HIGH) { lcd.setCursor(0, 0); lcd.print("NoJob time:"); lcd.setCursor(12, 0); lcd.print(millis() / 1000); lcd.setCursor(2,2); lcd.print("Write plese \1"); delay(500); } else { lcd.clear(); lcd.blink(); lcd.setCursor(0, 0); lcd.print("1"); delay(99999999); } }#include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); const int buttonPin = 0; //кнопка int buttonState = 0; //статус кнопки при офф положении enum { SYMBOL_HEIGHT = 8 }; byte crSYMBOL_HEIGHT = { B00001, B00011, B00101, B01001, B10001, B11011, B10101, B10001, }; enum { LCD_WIDTH = 16, LCD_HEIGHT = 2 }; void setup() { lcd.createChar(1, cr); pinMode(buttonPin, INPUT); //делаем кнопку входом lcd.begin(16, 2); //вклучаем нужные строки lcd.begin(LCD_WIDTH, LCD_HEIGHT); } void loop() { buttonState = digitalRead(buttonPin); //считываем сигнал из кнопки if (buttonState == HIGH) { lcd.setCursor(0, 0); lcd.print("NoJob time:"); lcd.setCursor(12, 0); lcd.print(millis() / 1000); lcd.setCursor(2,2); lcd.print("Write plese \1"); delay(500); } else { lcd.clear(); lcd.blink(); lcd.setCursor(0, 0); lcd.print("1"); delay(99999999); } }#include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); const int buttonPin = 0; //кнопка int buttonState = 0; //статус кнопки при офф положении enum { SYMBOL_HEIGHT = 8 }; byte crSYMBOL_HEIGHT = { B00001, B00011, B00101, B01001, B10001, B11011, B10101, B10001, }; enum { LCD_WIDTH = 16, LCD_HEIGHT = 2 }; void setup() { lcd.createChar(1, cr); pinMode(buttonPin, INPUT); //делаем кнопку входом lcd.begin(16, 2); //вклучаем нужные строки lcd.begin(LCD_WIDTH, LCD_HEIGHT); } void loop() { buttonState = digitalRead(buttonPin); //считываем сигнал из кнопки if (buttonState == HIGH) { lcd.setCursor(0, 0); lcd.print("NoJob time:"); lcd.setCursor(12, 0); lcd.print(millis() / 1000); lcd.setCursor(2,2); lcd.print("Write plese \1"); delay(500); } else { lcd.clear(); lcd.blink(); lcd.setCursor(0, 0); lcd.print("1"); delay(99999999); } }

Теги других блогов: Arduino кнопка LiquidCrystal