address_storage.ino

/*
 * address_storage.ino
 * Eric Ayars
 * 5/22/12
 *
 * Simply writes a list of addresses to the Arduino EEPROM, so that the
 * ThermoPlate.ino program can recall those addresses in the 
 * correct order and send data to the computer for plotting.
 *
 */

#include <EEPROM.h>

byte j,k;               // Used for counting loops

// These are the addresses of the 100 sensors on the (current) board,
// in "page" order: the first 10 are the top row, the second 10 the 
// next row, and so on.
// Note that this data is only valid for the particular 100 sensors
// on our particular board! You'll have to fill in your own data 
// for your own apparatus.
byte addr[100][8] = {
{0x28, 0x0B, 0x15, 0xB0, 0x02, 0x00, 0x00, 0x96},
{0x28, 0x6C, 0x05, 0x0C, 0x03, 0x00, 0x00, 0x84},
{0x28, 0x9F, 0x3D, 0x0C, 0x03, 0x00, 0x00, 0x15},
{0x28, 0xF8, 0x2A, 0x0C, 0x03, 0x00, 0x00, 0x7E},
{0x28, 0x61, 0x0B, 0x0C, 0x03, 0x00, 0x00, 0x6C},
{0x28, 0x4F, 0x50, 0x0C, 0x03, 0x00, 0x00, 0x2C},
{0x28, 0xE7, 0x33, 0x0C, 0x03, 0x00, 0x00, 0x8E},
{0x28, 0x78, 0x06, 0xB0, 0x02, 0x00, 0x00, 0x65},
{0x28, 0x32, 0x54, 0x0C, 0x03, 0x00, 0x00, 0xE1},
{0x28, 0xFC, 0x27, 0x0C, 0x03, 0x00, 0x00, 0x4E},
{0x28, 0xD5, 0x26, 0x0C, 0x03, 0x00, 0x00, 0xA3},
{0x28, 0xBD, 0x0E, 0x0C, 0x03, 0x00, 0x00, 0x07},
{0x28, 0x35, 0x10, 0x0C, 0x03, 0x00, 0x00, 0x92},
{0x28, 0x70, 0x15, 0x0C, 0x03, 0x00, 0x00, 0xDE},
{0x28, 0x5F, 0x08, 0x0C, 0x03, 0x00, 0x00, 0xDC},
{0x28, 0xED, 0x48, 0x0C, 0x03, 0x00, 0x00, 0x5C},
{0x28, 0x3D, 0x1F, 0x0C, 0x03, 0x00, 0x00, 0x5C},
{0x28, 0x56, 0x16, 0x0C, 0x03, 0x00, 0x00, 0x94},
{0x28, 0x86, 0x54, 0x0C, 0x03, 0x00, 0x00, 0x3A},
{0x28, 0xD5, 0x05, 0x0C, 0x03, 0x00, 0x00, 0x15},
{0x28, 0x74, 0x46, 0x0C, 0x03, 0x00, 0x00, 0xD9},
{0x28, 0x48, 0x41, 0x0C, 0x03, 0x00, 0x00, 0x18},
{0x28, 0x92, 0x55, 0x0C, 0x03, 0x00, 0x00, 0x70},
{0x28, 0x12, 0x0D, 0x0C, 0x03, 0x00, 0x00, 0x31},
{0x28, 0x21, 0x0B, 0x0C, 0x03, 0x00, 0x00, 0x19},
{0x28, 0x36, 0x51, 0x0C, 0x03, 0x00, 0x00, 0xEF},
{0x28, 0x44, 0x53, 0x0C, 0x03, 0x00, 0x00, 0x9A},
{0x28, 0x81, 0x54, 0x0C, 0x03, 0x00, 0x00, 0xBF},
{0x28, 0x2F, 0x20, 0x0C, 0x03, 0x00, 0x00, 0x82},
{0x28, 0x90, 0x34, 0x0C, 0x03, 0x00, 0x00, 0xC2},
{0x28, 0x55, 0x1C, 0x0C, 0x03, 0x00, 0x00, 0x70},
{0x28, 0xDC, 0x08, 0x0C, 0x03, 0x00, 0x00, 0x6F},
{0x28, 0x96, 0x26, 0x0C, 0x03, 0x00, 0x00, 0x8F},
{0x28, 0xED, 0x2A, 0x0C, 0x03, 0x00, 0x00, 0xCE},
{0x28, 0x1A, 0x0E, 0x0C, 0x03, 0x00, 0x00, 0xDE},
{0x28, 0xB6, 0x18, 0x0C, 0x03, 0x00, 0x00, 0x1F},
{0x28, 0x9A, 0x4C, 0x0C, 0x03, 0x00, 0x00, 0x5E},
{0x28, 0x6A, 0x50, 0x0C, 0x03, 0x00, 0x00, 0x71},
{0x28, 0x9A, 0x3F, 0x0C, 0x03, 0x00, 0x00, 0x7D},
{0x28, 0x0E, 0x44, 0x0C, 0x03, 0x00, 0x00, 0x0D},
{0x28, 0x03, 0x3F, 0x0C, 0x03, 0x00, 0x00, 0x5A},
{0x28, 0xCF, 0x0F, 0x0C, 0x03, 0x00, 0x00, 0x3C},
{0x28, 0x6F, 0x0C, 0x0C, 0x03, 0x00, 0x00, 0x2E},
{0x28, 0x0F, 0x39, 0x0C, 0x03, 0x00, 0x00, 0xBB},
{0x28, 0xC6, 0x18, 0x0C, 0x03, 0x00, 0x00, 0x87},
{0x28, 0x03, 0x17, 0x0C, 0x03, 0x00, 0x00, 0x9C},
{0x28, 0x62, 0x42, 0x0C, 0x03, 0x00, 0x00, 0x2F},
{0x28, 0x1B, 0x21, 0x0C, 0x03, 0x00, 0x00, 0x7E},
{0x28, 0x78, 0x0C, 0x0C, 0x03, 0x00, 0x00, 0xF0},
{0x28, 0xFF, 0x37, 0x0C, 0x03, 0x00, 0x00, 0x6B},
{0x28, 0x7B, 0x21, 0x0C, 0x03, 0x00, 0x00, 0xBD},
{0x28, 0x5A, 0x35, 0x0C, 0x03, 0x00, 0x00, 0x5F},
{0x28, 0xA3, 0x30, 0x0C, 0x03, 0x00, 0x00, 0x69},
{0x28, 0xFE, 0x46, 0x0C, 0x03, 0x00, 0x00, 0xFC},
{0x28, 0xB9, 0x36, 0x0C, 0x03, 0x00, 0x00, 0x61},
{0x28, 0xD6, 0x0D, 0x0C, 0x03, 0x00, 0x00, 0x72},
{0x28, 0xA2, 0x1A, 0x0C, 0x03, 0x00, 0x00, 0x1B},
{0x28, 0xB8, 0x52, 0x0C, 0x03, 0x00, 0x00, 0x58},
{0x28, 0x3E, 0x4D, 0x0C, 0x03, 0x00, 0x00, 0x13},
{0x28, 0xAC, 0x1D, 0x0C, 0x03, 0x00, 0x00, 0x59},
{0x28, 0x67, 0x57, 0x0C, 0x03, 0x00, 0x00, 0x6A},
{0x28, 0xF1, 0x51, 0x0C, 0x03, 0x00, 0x00, 0xF5},
{0x28, 0x48, 0x09, 0x0C, 0x03, 0x00, 0x00, 0xCF},
{0x28, 0x06, 0x12, 0x0C, 0x03, 0x00, 0x00, 0xA5},
{0x28, 0xE6, 0x0F, 0x0C, 0x03, 0x00, 0x00, 0x1C},
{0x28, 0x26, 0x43, 0x0C, 0x03, 0x00, 0x00, 0x4B},
{0x28, 0x05, 0x19, 0x0C, 0x03, 0x00, 0x00, 0x8C},
{0x28, 0xB6, 0x33, 0x0C, 0x03, 0x00, 0x00, 0x97},
{0x28, 0xB9, 0x11, 0x0C, 0x03, 0x00, 0x00, 0xC8},
{0x28, 0x35, 0x3D, 0x0C, 0x03, 0x00, 0x00, 0x86},
{0x28, 0x0A, 0x4C, 0x0C, 0x03, 0x00, 0x00, 0xEF},
{0x28, 0x59, 0x1D, 0x0C, 0x03, 0x00, 0x00, 0xC0},
{0x28, 0x0B, 0x44, 0x0C, 0x03, 0x00, 0x00, 0xE6},
{0x28, 0x92, 0x1F, 0x0C, 0x03, 0x00, 0x00, 0x24},
{0x28, 0x3B, 0x52, 0x0C, 0x03, 0x00, 0x00, 0xEB},
{0x28, 0x60, 0x41, 0x0C, 0x03, 0x00, 0x00, 0x0F},
{0x28, 0x7F, 0x56, 0x0C, 0x03, 0x00, 0x00, 0x5D},
{0x28, 0x54, 0x42, 0x0C, 0x03, 0x00, 0x00, 0x70},
{0x28, 0x40, 0x51, 0x0C, 0x03, 0x00, 0x00, 0xC5},
{0x28, 0xD8, 0x4C, 0x0C, 0x03, 0x00, 0x00, 0x45},
{0x28, 0x58, 0x57, 0x0C, 0x03, 0x00, 0x00, 0xA3},
{0x28, 0x28, 0x0B, 0x0C, 0x03, 0x00, 0x00, 0x8F},
{0x28, 0x65, 0x44, 0x0C, 0x03, 0x00, 0x00, 0x36},
{0x28, 0x2B, 0x49, 0x0C, 0x03, 0x00, 0x00, 0xBC},
{0x28, 0x32, 0x10, 0x0C, 0x03, 0x00, 0x00, 0x17},
{0x28, 0x7B, 0x1E, 0x0C, 0x03, 0x00, 0x00, 0x56},
{0x28, 0xDC, 0x4D, 0x0C, 0x03, 0x00, 0x00, 0x54},
{0x28, 0x47, 0x43, 0x0C, 0x03, 0x00, 0x00, 0xBF},
{0x28, 0x36, 0x7A, 0xE3, 0x03, 0x00, 0x00, 0xB4},
{0x28, 0x07, 0xC7, 0xAF, 0x02, 0x00, 0x00, 0x94},
{0x28, 0xC1, 0xFF, 0xAF, 0x02, 0x00, 0x00, 0x03},
{0x28, 0x32, 0xF0, 0xAF, 0x02, 0x00, 0x00, 0x47},
{0x28, 0x06, 0xD5, 0xAF, 0x02, 0x00, 0x00, 0x5C},
{0x28, 0x94, 0x3B, 0x0C, 0x03, 0x00, 0x00, 0x71},
{0x28, 0xCF, 0x4D, 0x0C, 0x03, 0x00, 0x00, 0x56},
{0x28, 0x2D, 0x30, 0x0C, 0x03, 0x00, 0x00, 0x90},
{0x28, 0x1C, 0x48, 0x0C, 0x03, 0x00, 0x00, 0x19},
{0x28, 0x43, 0xE7, 0xAF, 0x02, 0x00, 0x00, 0xC5},
{0x28, 0x80, 0x24, 0x0C, 0x03, 0x00, 0x00, 0xE5},
{0x28, 0x0D, 0xD9, 0xAF, 0x02, 0x00, 0x00, 0x85}
};

void setup() {

    for (j=0;j<100;j++) {   // Loop through 100 addresses
        for (k=0;k<8;k++) { // Loop through 8 bytes per address
            EEPROM.write(((j*8)+k), addr[j][k]);
        }
    }

    // Let me know that something happened by flashing the LED.
    pinMode(13, OUTPUT);
    for (j=0;j<5;j++) {
        digitalWrite(13, HIGH);
        delay(200);
        digitalWrite(13, LOW);
        delay(200);
    }
}

void loop() {
    // Loop does nothing.
    delay(1000);
}



Generated by GNU enscript 1.6.4.