// BBCC Main // Tim Hirzel // February 2008 // // Main file for the Bare Bones Coffee Controller PID // setup for Arduino. // This project is set up such that each tab acts as a // "module" or "library" that incporporates some more // functionality. Each tab correlates // to a particular device (Nunchuck), protocol (ie. SPI), // or Algorithm (ie. PID). // The general rule for any of these tabs/sections is that // if they include a setup* or update* function, those should be added // into the main setup and main loop functions. Also, in main loop, and in // extra code, delays should probably be avoided. // Instead, use millis() and check for a certain interval to have passed. // // All code released under // Creative Commons Attribution-Noncommercial-Share Alike 3.0 #include "eeprom_float.h" #include "Wire.h" void setup() { setupMachineState(); setupHeater(); setupSerialInterface(); Wire.begin(); setupDisplay(); clearLCD(); setupSwitches(); updateSwitches(true); // force all switches to recognize and act on initial state setupInterface(); } void loop() { updateSerialInterface(); updateSwitches(false); updateMachineState(); updateInterface(); } // END BBCC Main