| 1 | /* |
|---|
| 2 | * Config Parameters, for arduino_ethernet.pde |
|---|
| 3 | * |
|---|
| 4 | * The idea is to keep all config parameters in this file, |
|---|
| 5 | * and leave arduino_ethernet.pde to be source modifyable. |
|---|
| 6 | */ |
|---|
| 7 | |
|---|
| 8 | #define SEND_FREQ 600 // Mill-seconds |
|---|
| 9 | #define SEND_IDLE_FREQ 10000 // Mill-seconds |
|---|
| 10 | |
|---|
| 11 | #define SERVER_TIMEOUT 5000 // In milliseconds |
|---|
| 12 | |
|---|
| 13 | /* My mac address - if you connect more than one arduino, |
|---|
| 14 | take care to modify this to be unique */ |
|---|
| 15 | byte mac[] = { 0xFE, 0xED, 0xBE, 0xEF, 0xDE, 0xAD }; |
|---|
| 16 | /* My IP. Should be modified accordingly */ |
|---|
| 17 | byte ip[] = { 10, 1, 1, 10 }; |
|---|
| 18 | /* My gateway to Internet */ |
|---|
| 19 | byte gateway[] = { 10, 1, 1, 1 }; |
|---|
| 20 | |
|---|
| 21 | /* GoodRobot server */ |
|---|
| 22 | byte server[] = {174, 129, 245, 223 }; |
|---|
| 23 | // byte server[] = {10, 1, 1, 1 }; |
|---|
| 24 | |
|---|
| 25 | /* Specify the robot/component name here correctly */ |
|---|
| 26 | /* PROGMEM added to place these strings in flash memory and leave more RAM empty */ |
|---|
| 27 | char putString[] PROGMEM = "PUT /api/testing.resource.csv HTTP/1.1\r\n"; |
|---|
| 28 | char hostString[] PROGMEM = "Host: www.goodrobot.com\r\n"; |
|---|
| 29 | char secret_key[] PROGMEM = "X-GoodRobotKey: LM2SDT3IJJVU2JZXQ1EVOTYWZ8MMIDIZHM3762UQ\r\n"; |
|---|
| 30 | |
|---|
| 31 | char putString2[] PROGMEM = "PUT /api/walking.resource.csv HTTP/1.1\r\n"; |
|---|
| 32 | char secret_key2[] PROGMEM = "X-GoodRobotKey: WMDSP0PWBCZ5CE26X7Y46E3NOR2LO80YP0NS3TLP\r\n"; |
|---|
| 33 | |
|---|
| 34 | void config() |
|---|
| 35 | { |
|---|
| 36 | /* Pre-Configure Pins for usage and for reset |
|---|
| 37 | * Read arduino_ethernet.pde for help |
|---|
| 38 | * These are just examples! |
|---|
| 39 | cfg_pins[3] = 'p'; // Pin 3 is set for PWM mode |
|---|
| 40 | cfg_pins[4] = 'i'; // Pin 4 is set for digital Input mode |
|---|
| 41 | cfg_pins[5] = 'o'; // Pin 5 is set for digital Output mode |
|---|
| 42 | cfg_apins[2] = 'a'; // Pin 2 analog mode |
|---|
| 43 | |
|---|
| 44 | reset_pins[3] = 'p'; // Pin 3, PWM mode, should be reset to 0 |
|---|
| 45 | reset_pins[4] = 'o'; // Pin 4, digitalOut mode, should be reset to LOW |
|---|
| 46 | reset_pins[5] = 't'; // Pin 5, PWM mode/Tank drive, should be reset to 127 |
|---|
| 47 | reset_pins[6] = 's'; // Pin 6, Servo mode, should be reset to 0 |
|---|
| 48 | |
|---|
| 49 | cfg2_pins[10] = 'p'; // Pin 10, PWM mode, sent as component 2 |
|---|
| 50 | |
|---|
| 51 | */ |
|---|
| 52 | } |
|---|
| 53 | |
|---|