Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <LiquidCrystal.h>
- LiquidCrystal lcd(11, 10, 9, 8, 7, 6);
- int reply;
- int switchStatemal = 0;
- int switchState1 = 0;
- int switchState2 = 0;
- int zwischenspeicher1;
- int zwischenspeicher2;
- int zwischenspeichermal;
- int taste1 = 1;
- int taste2 = 2;
- void setup() {
- lcd.begin(16, 2);
- pinMode(2, INPUT);
- pinMode(3, INPUT);
- pinMode(5, INPUT);
- }
- void loop() {
- switchStatemal = digitalRead(2);
- switchState1 = digitalRead(3);
- switchState2 = digitalRead(4);
- if (switchStatemal == HIGH) {
- zwischenspeichermal = 1;
- }
- else if (switchState1 == HIGH) {
- zwischenspeicher1 = 1;
- }
- else if (switchState2 == HIGH) {
- zwischenspeicher2 = 1;
- }
- if (zwischenspeicher1 = 1 && zwischenspeicher2 = 1 && zwischenspeichermal = 1) {
- lcd.print(taste1 * taste2);
- }
- else if && zwischenspeicher2 = 1 && (zwischenspeichermal = 0 {
- lcd.print(taste1 + taste2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement