can any one tell me whats wrong with line 71.... Serial.println("You Have £",cred);it will not compile
thanks
static int lastState = 0;
static int count = 0 ; //number of pulses for each card
static int countb = 0 ;
static int cred = 0 ;
int outputPin = 13; //names pins
int inputPin =10;
int fullPin =8;
int breakPin =5;
int maxCount ; //number of pulse's before this card shuts off
//int newcard = 0;
void setup()
{
Serial.begin(9600); //just for now so i can see what's going on
digitalWrite (fullPin, HIGH);
pinMode(outputPin,OUTPUT);
pinMode(inputPin, INPUT); //make's pin 10 input pin
pinMode(breakPin, INPUT); //this is used to breakout of while loop
digitalWrite (outputPin, LOW);
}
void loop()
{
bailout: // this is for the goto statment ( sorry but i can not thing of any other way but goto )
digitalWrite(outputPin, LOW);
Serial.println("Place Card on Bar");
while (Serial.available() == 0); // this is going to be input from card
int val = Serial.read(); //will be input from card reader
Serial.println("do not remove until you have finished");
if (val == '1') //if this is the card number do the next stuff if not keep looking
{
Serial.println("card 1 ");
while(!digitalRead(5))
{
int maxCount =20;
if (count > maxCount) //when count gets to the set number sends 5v to pin 13
{
Serial.println("NO CREDIT LEFT");
digitalWrite(outputPin, LOW); // power to relay to shut flow
goto bailout;
}
digitalWrite (outputPin, HIGH);
int newState = digitalRead(inputPin); //pulse from flow meter
if (newState != lastState) //detect change
{
count ++; //adds one to count
cred = (maxCount - count);
Serial.println("You Have £",cred);
lastState = newState;
}
}
}
// looks for next card number
}