well it looks like i have cracked it thanks for all you help Ron and Tom the answer was arduino as soon as i get it up and running i will let you know how i did it me thinks a video on you tube wound
be the best way to show you ….. the idea as changed I little instead for 4 lager taps there will be 1 .
you come int the pub pay for 8 pints + deposit (for box) you are given a small box with 8 led’s on it and a button when you press the button at first all led’s will light up indicating you have 8 full pints left you plug “your box” into the bar and pull your first pint then unplug the box and keep it with them if you press the button again one of the lights will have gone out second pint two lights out and so on when you have pulled 8 pints the box not allow any more lager to be pulled until it is reset ……………..in the box is the arduino and a rechargeable 9v battery …… this is the code that works it ……I will keep you posted
int outputPin = 13;
int inputPin =10;
int fullPin =8;
int aPin = 1;
int bPin = 2;
int cPin = 3;
int dPin = 4;
int ePin = 5;
int fPin = 6;
int gPin = 7;
int maxCount =1600;
void setup()
{
digitalWrite (aPin, HIGH);
digitalWrite (bPin, HIGH);
digitalWrite (cPin, HIGH);
digitalWrite (dPin, HIGH);
digitalWrite (ePin, HIGH);
digitalWrite (fPin, HIGH);
digitalWrite (gPin, HIGH);
digitalWrite (fullPin, HIGH);
pinMode(aPin,OUTPUT);
pinMode(bPin,OUTPUT);
pinMode(cPin,OUTPUT);
pinMode(dPin,OUTPUT);
pinMode(ePin,OUTPUT);
pinMode(fPin,OUTPUT);
pinMode(fullPin,OUTPUT);
pinMode(gPin,OUTPUT);
pinMode(outputPin,OUTPUT);
pinMode(inputPin, INPUT);
}
void loop()
{
static int lastState = 0;
static int count = 0;
int newState = digitalRead(inputPin);
if (count >1)
{
digitalWrite (fullPin, LOW);
}
if (count >200)
{
digitalWrite (aPin, LOW);
}
if (count >400)
{
digitalWrite (bPin, LOW);
}
if (count >600)
{
digitalWrite (cPin, LOW);
}
if (count >800)
{
digitalWrite (dPin, LOW);
}
if (count >1000)
{
digitalWrite (ePin, LOW);
}
if (count >1200)
{
digitalWrite (fPin, LOW);
}
if (count >1400)
{
digitalWrite (gPin, LOW);
}
if (newState != lastState)
{
count ++;
lastState = newState;
if (count > maxCount * 2)
{
digitalWrite(outputPin, HIGH);
}
}
}