 
 
 /******************************************************************************************************************
- * ComposterSketch Arduino sketch, the main program, for the Composter Controller
+ * ComposterSketch, an Arduino sketch, the main program, for the Composter Controller
  * 
  * Control Panel Functionality
  *  Button1 press:    Rotate drum clockwise (CW) until released

static long  totalLoopTime;                          //milliseconds in loop()
static long  nTimesLoopInvoked;                      //Counts invocations of loop()

//Initialize the composter system
void setup() {

  //Reset the loop timing data
  totalLoopTime=0L;
  nTimesLoopInvoked=0L;
  
  state=IDL;                              //Initial state is IDL

  //Try to setup 32U4 USB communication with host computer if present, blinking 3X or until USB is ready
  Serial.begin(57600);
  for(int i=1;(i<=3)&&(!SerialUSB);i++) {
    audio.doBeep(FREQG);

  attachInterrupt(digitalPinToInterrupt(pinB2),intHan,CHANGE);
  attachInterrupt(digitalPinToInterrupt(pinB3),intHan,CHANGE);

  //Startup the composter's autorun scheduler
  sked.start();                              

}

//------------------------------------------------------------------------------------------------------------
//  The arduino kernel repeatedly invokes loop() which drives the composter's state machine
//------------------------------------------------------------------------------------------------------------
void loop() {

  //The loop-timing feature is for software developers, not the end-user of the composter
  long t0 = millis();                             //Time at start of a pass through loop()
  
  //Poll and Update the status of objects that won't get updated otherwise
  b3t.update();
