/* * Tool to capture the raw samples generated by the Atmega 328P processor * during one or more mains cycles. The data is displayed on the Serial Monitor, * and is also available for subsequent processing using a spreadsheet. * * This version is based on similar code that I posted in December 2012 on the * OpenEnergyMonitor forum. The original version, and other related material, * can be found on my Summary Page at www.openenergymonitor.org/emon/node/1757 * * The pin-allocations have been changed to suit my PCB-based hardware for the * Mk2 PV Router. The integral voltage sensor is fed from one of the secondary * coils of the transformer. Current can be measured via Current Transformers * at the CT1 and CT1 ports. * * Voltage samples are displayed as 'v' * Current samples via CT1 are displayed as '1' * Current samples via CT2 are displayed as '2' * * The display is more compact if not every set of samples is shown. This aspect * can be changed at the second of the two lines which contain a '%' character. * * Robin Emley * www.Mk2PVrouter.co.uk * February 2014 */