C:\Users\SP Bel\Documents\Arduino\fogingMachine\fogingMachine.ino:16:1: error: 'boolean' does not name a type; did you mean 'bool'?
boolean userBalance = false;
^~~~~~~
bool
C:\Users\SP Bel\Documents\Arduino\fogingMachine\fogingMachine.ino:17:1: error: 'boolean' does not name a type; did you mean 'bool'?
boolean noCoin = false;
^~~~~~~
bool
C:\Users\SP Bel\Documents\Arduino\fogingMachine\fogingMachine.ino: In function 'void loop()':
C:\Users\SP Bel\Documents\Arduino\fogingMachine\fogingMachine.ino:68:7: error: 'noCoin' was not declared in this scope
if (noCoin == false) {
^~~~~~
C:\Users\SP Bel\Documents\Arduino\fogingMachine\fogingMachine.ino:68:7: note: suggested alternative: 'noTone'
if (noCoin == false) {
^~~~~~
noTone
C:\Users\SP Bel\Documents\Arduino\fogingMachine\fogingMachine.ino:77:7: warning: init-statement in selection statements only available with -std=c++1z or -std=gnu++1z
if (pulse == 20; buttonState == 1 && COUNTDOWN_TIME > 0 && userBalance) {
^~~~~
C:\Users\SP Bel\Documents\Arduino\fogingMachine\fogingMachine.ino:77:13: warning: statement has no effect [-Wunused-value]
if (pulse == 20; buttonState == 1 && COUNTDOWN_TIME > 0 && userBalance) {
^
C:\Users\SP Bel\Documents\Arduino\fogingMachine\fogingMachine.ino:77:62: error: 'userBalance' was not declared in this scope
if (pulse == 20; buttonState == 1 && COUNTDOWN_TIME > 0 && userBalance) {
^~~~~~~~~
C:\Users\SP Bel\Documents\Arduino\fogingMachine\fogingMachine.ino:99:26: error: 'low' was not declared in this scope
digitalWrite(pump, low);
^~~
C:\Users\SP Bel\Documents\Arduino\fogingMachine\fogingMachine.ino:99:26: note: suggested alternative: 'pow'
digitalWrite(pump, low);
^~~
pow
C:\Users\SP Bel\Documents\Arduino\fogingMachine\fogingMachine.ino:102:26: error: 'high' was not declared in this scope
digitalWrite(pump, high);
^~~~
C:\Users\SP Bel\Documents\Arduino\fogingMachine\fogingMachine.ino:102:26: note: suggested alternative: 'sinh'
digitalWrite(pump, high);
^~~~
sinh
C:\Users\SP Bel\Documents\Arduino\fogingMachine\fogingMachine.ino:108:5: error: 'noCoin' was not declared in this scope
noCoin = false;
^~~~~~
C:\Users\SP Bel\Documents\Arduino\fogingMachine\fogingMachine.ino:108:5: note: suggested alternative: 'noTone'
noCoin = false;
^~~~~~
noTone
C:\Users\SP Bel\Documents\Arduino\fogingMachine\fogingMachine.ino:129:5: error: 'userBalance' was not declared in this scope
userBalance = true;
^~~~~~~~~~~
exit status 1
Compilation error: 'boolean' does not name a type; did you mean 'bool'?
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
#define coinSlot 6
#define buzzer 13
#define button 4
#define heater 5
#define pump 6
#define uvLight 7
int coinSlotStatus;
int pulse;
boolean userBalance = false;
boolean noCoin = false;
char lcdBuffer[16];
int buttonState;
#define interval 1000
#define CLK 2 // pin D2 - CLK
#define DIO 3 // pin D3 - DIO
#include <Arduino.h>
#include <TM1637Display.h>
int COUNTDOWN_TIME =0; // in seconds
int minutes = 0;
int seconds = 0;
TM1637Display display(CLK, DIO);
void setup() {
display.setBrightness(3); // set brightness of tm1637, 0 (lowest brightness) to 7 (highest brightness)
lcd.init();
lcd.backlight();
lcd.clear();
pinMode(buzzer, OUTPUT);
pinMode(10, OUTPUT);
digitalWrite(10, LOW);
pinMode(coinSlot, INPUT_PULLUP);
pinMode(button, INPUT);
pinMode(heater, OUTPUT);
pinMode(pump, OUTPUT);
digitalWrite(heater, HIGH); // turn off heater relay
digitalWrite(pump, HIGH); // turn off pump relay
tone(buzzer, 262);
delay(150);
tone(buzzer, 294);
delay(150);
tone(buzzer, 330);
delay(150);
tone(buzzer, 349);
delay(150);
tone(buzzer, 392);
delay(150);
tone(buzzer, 440);
delay(150);
tone(buzzer, 394);
delay(150);
tone(buzzer, 563);
delay(150);
noTone(buzzer);
delay(1000);
}
void loop() {
if (noCoin == false) {
noCoin = true;
lcd.setCursor(0, 0);
lcd.print(" Insert Coin");
}
buttonState = digitalRead(button);
if (pulse == 20; buttonState == 1 && COUNTDOWN_TIME > 0 && userBalance) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("WARMING UP");
digitalWrite(heater, LOW);
delay(180000);
digitalWrite(heater, HIGH);
COUNTDOWN_TIME = COUNTDOWN_TIME - 180000;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Pumping Liquid");
for (int i = COUNTDOWN_TIME; i > 0; i--) {
minutes = COUNTDOWN_TIME / 60;
seconds = COUNTDOWN_TIME % 60;
display.showNumberDecEx(minutes * 100 + seconds, 0b01000000, true);
COUNTDOWN_TIME -- ;
lcd.setCursor(0, 1);
lcd.print(" ");
lcd.setCursor(0, 1);
lcd.print(i);
tone(buzzer,523);
digitalWrite(pump, low);
delay(500);
noTone(buzzer);
digitalWrite(pump, high);
delay(500);
}
pulse = 0;
display.showNumberDecEx(0000, 0b01000000, true);
noCoin = false;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" Thank You Bye!");
delay(1700);
tone(buzzer, 3000);
delay(200);
noTone(buzzer);
delay(50);
tone(buzzer, 3000);
delay(50);
noTone(buzzer);
display.clear();
}
coinSlotStatus = digitalRead(coinSlot);
delay(30);
if (coinSlotStatus == 0) {
userBalance = true;
lcd.setCursor(0, 0);
lcd.print("Press a Button");
pulse += 1;
COUNTDOWN_TIME=15*pulse;
lcd.setCursor(0, 1);
sprintf(lcdBuffer, "Bal. Php %d.00", pulse);
lcd.setCursor(0, 1);
lcd.print(lcdBuffer);
delay(30);
}
noTone(buzzer);
}