-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add loconet turnout decoder rev a board
- Loading branch information
Showing
4 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#pragma once | ||
|
||
#include "Arduino.h" | ||
|
||
//=========================================================================== | ||
//======================== Loconet ========================================== | ||
//=========================================================================== | ||
|
||
#define USE_LOCONET | ||
#define PIN_LOCONET_RX 8 | ||
#define PIN_LOCONET_TX 6 | ||
|
||
//=========================================================================== | ||
//======================== Outputs ========================================== | ||
//=========================================================================== | ||
|
||
#define USE_OUTPUTS | ||
#define OUTPUT_COUNT 20 | ||
|
||
// outputs 1-20 (no output number 0 because they are labelled on the pcb) | ||
#define OUTPUT_1 10 | ||
#define OUTPUT_2 11 | ||
#define OUTPUT_3 12 | ||
#define OUTPUT_4 13 | ||
#define OUTPUT_5 25 | ||
#define OUTPUT_6 26 | ||
#define OUTPUT_7 14 | ||
#define OUTPUT_8 15 | ||
#define OUTPUT_9 16 | ||
#define OUTPUT_10 17 | ||
#define OUTPUT_11 18 | ||
#define OUTPUT_12 19 | ||
#define OUTPUT_13 0 | ||
#define OUTPUT_14 1 | ||
#define OUTPUT_15 2 | ||
#define OUTPUT_16 7 | ||
#define OUTPUT_17 3 | ||
#define OUTPUT_18 4 | ||
#define OUTPUT_19 23 | ||
#define OUTPUT_20 24 | ||
|
||
// create output pin array | ||
// TODO: Create array in configuration.h with C preprocessor macro | ||
const uint8_t OUTPUTS[OUTPUT_COUNT] = { | ||
OUTPUT_1, | ||
OUTPUT_2, | ||
OUTPUT_3, | ||
OUTPUT_4, | ||
OUTPUT_5, | ||
OUTPUT_6, | ||
OUTPUT_7, | ||
OUTPUT_8, | ||
OUTPUT_9, | ||
OUTPUT_10, | ||
OUTPUT_11, | ||
OUTPUT_12, | ||
OUTPUT_13, | ||
OUTPUT_14, | ||
OUTPUT_15, | ||
OUTPUT_16, | ||
OUTPUT_17, | ||
OUTPUT_18, | ||
OUTPUT_19, | ||
OUTPUT_20}; | ||
|
||
//=========================================================================== | ||
//======================== LEDs ============================================= | ||
//=========================================================================== | ||
|
||
#define STATUS_LED | ||
#define PIN_STATUS_LED 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"build": { | ||
"core": "arduino", | ||
"f_cpu": "16000000L", | ||
"mcu": "atmega328pb", | ||
"variant": "standard" | ||
}, | ||
"bootloader": { | ||
"efuse": "0xFD", | ||
"file": "optiboot/optiboot_atmega328.hex", | ||
"hfuse": "0xDE", | ||
"lock_bits": "0x0F", | ||
"lfuse": "0xFF", | ||
"unlock_bits": "0x3F" | ||
}, | ||
"debug": { | ||
"simavr_target": "atmega328pb", | ||
"avr-stub": { | ||
"speed": 115200 | ||
} | ||
}, | ||
"frameworks": [ | ||
"arduino" | ||
], | ||
"name": "Loconet Turnout Decoder Rev A", | ||
"upload": { | ||
"maximum_ram_size": 2048, | ||
"maximum_size": 32256, | ||
"protocol": "arduino", | ||
"require_upload_port": true, | ||
"speed": 115200 | ||
}, | ||
"url": "https://github.com/markatk/loconet-turnout-decoder", | ||
"vendor": "MarkAtk" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters