Professional Documents
Culture Documents
Code
Code
h>
#include "EmonLib.h" // Include Emon Library
int depositpulse = 0;
volatile float revenue = 0.00; //start running total
volatile float deposit = 0.00; //start total
volatile float money = 0.00; //start total
int totalcan1 = 12; //total possible cans to fit in machine
int freestate = 0;
float AMP=0;
int coinsecurity = 0;
int currentMillis = 0;
int oldMillis = 0;
const int coinInt = 0;
volatile float coinsValue = 0.00; //start current credit
int coinsChange = 0;
void setup()
{
Serial.begin(9600);
///////////////////////////
attachInterrupt(coinInt, coinInserted, RISING);
///////////////////////////////////////////////////////////////////////////////
void coinInserted()
//The function that is called every time it recieves a pulse
{
void displayEnergyScreen()
{
lcd.setCursor(0, 1);
lcd.print(watt);
lcd.print("W");