2020-05-27 10:40:12 +02:00
|
|
|
#ifndef Config_h
|
|
|
|
#define Config_h
|
2020-06-11 14:35:16 +02:00
|
|
|
|
2020-05-26 13:44:02 +02:00
|
|
|
// This hardware configuration would normally be setup using a bunch of #ifdefs.
|
|
|
|
|
2020-07-12 01:36:56 +02:00
|
|
|
const byte UNUSED_PIN = 255;
|
|
|
|
|
2020-07-10 01:03:47 +02:00
|
|
|
const byte MAIN_POWER_PIN = 4;
|
|
|
|
const byte MAIN_SIGNAL_PIN = 7;
|
2020-07-12 01:36:56 +02:00
|
|
|
const byte MAIN_SIGNAL_PIN_ALT = UNUSED_PIN; // for hardware that flipflops signal pins
|
2020-05-26 13:44:02 +02:00
|
|
|
const byte MAIN_SENSE_PIN = A0;
|
2020-05-26 19:34:54 +02:00
|
|
|
const byte MAIN_BRAKE_PIN = 9;
|
2020-07-12 01:36:56 +02:00
|
|
|
const byte MAIN_FAULT_PIN = 12;
|
2020-05-26 13:44:02 +02:00
|
|
|
|
2020-07-10 01:03:47 +02:00
|
|
|
const int MAIN_MAX_MILLIAMPS=2000;
|
|
|
|
const float MAIN_SENSE_FACTOR=18; // analgRead(MAIN_SENSE_PIN) * MAIN_SENSE_FACTOR = milliamps
|
|
|
|
|
|
|
|
const byte PROG_POWER_PIN = 2;
|
|
|
|
const byte PROG_SIGNAL_PIN = 8;
|
2020-07-12 01:36:56 +02:00
|
|
|
const byte PROG_SIGNAL_PIN_ALT = UNUSED_PIN; // for hardware that flipflops signal pins
|
2020-05-26 13:44:02 +02:00
|
|
|
const byte PROG_SENSE_PIN = A1;
|
2020-07-10 01:03:47 +02:00
|
|
|
const byte PROG_BRAKE_PIN = 10;
|
2020-07-12 01:36:56 +02:00
|
|
|
const byte PROG_FAULT_PIN = UNUSED_PIN;
|
2020-07-10 01:03:47 +02:00
|
|
|
|
|
|
|
const int PROG_MAX_MILLIAMPS=250;
|
|
|
|
const float PROG_SENSE_FACTOR=18; // analgRead(PROG_SENSE_PIN) * PROG_SENSE_FACTOR = milliamps
|
2020-05-27 10:40:12 +02:00
|
|
|
|
2020-06-22 11:49:11 +02:00
|
|
|
// Allocations with memory implications..!
|
2020-06-28 11:21:27 +02:00
|
|
|
// Base system takes approx 900 bytes + 8 per loco. Turnouts, Sensors etc are dynamically created
|
2020-05-27 10:40:12 +02:00
|
|
|
const byte MAX_LOCOS=50;
|
|
|
|
|
|
|
|
#endif
|