Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <LiquidCrystal.h>
- LiquidCrystal lcd(13,12,11,10,9,8);
- const int reset=6;
- const int countup=7;
- int count=0;
- void setup() {
- lcd.begin(16,2);
- pinMode(countup, INPUT);
- pinMode(reset, INPUT);
- }
- void loop() {
- if (digitalRead (countup) == HIGH) {
- count++;
- }
- if (digitalRead (reset) == HIGH){
- count = 0;
- }
- lcd.clear;
- lcd.setCursor(0,0);
- lcd.print(count++);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement