-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
54 additions
and
1 deletion.
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,41 @@ | ||
// myCMRI.h to be included in myAutomation.h | ||
|
||
// see myHal.cpp_example.txt for explanation of parameters | ||
|
||
#include "IO_CMRI.h" // CMRI nodes | ||
// in config.h #define ARDUINOCMRI_COMPATIBLE | ||
|
||
// define CMRI bus | ||
HAL(CMRIbus, 0, Serial5, 9600, 500, 51) | ||
|
||
// define CMRI nodes | ||
HAL(CMRInode, 900, 72, 0, 4, 'M') | ||
|
||
// define the pins - this is S-MINI emulation 24/48 I/O | ||
// 16 of 24 input pins | ||
//JMRI_SENSOR(900,16) // broadcast <Q/q sensor for state changes | ||
// ... these pins do not need to be defined unless needed for JMRI | ||
|
||
// 16 turnouts require definition with vPin, id | ||
// define as PIN_TURNOUT in DCC-EX -- the servo parameters are done within the CMRI sketch | ||
PIN_TURNOUT(924, 924, "Pin 0 on PCA module") | ||
PIN_TURNOUT(925, 925, "Pin 1 on PCA module") | ||
PIN_TURNOUT(931, 931, "Pin 7 on PCA module") | ||
// ... thru 939 | ||
|
||
// define 16 or 32 pins for digital outputs | ||
//PARSE("<Z 940 940 0>") | ||
// ... these pins do not need to be defined unless needed for JMRI | ||
|
||
// a testing sequence | ||
// pin 941 is wired to pin 907. LED on pin 943 | ||
// pin 942 is wired to pin 911. | ||
// use commands <z 941> <z -941> etc. | ||
AUTOSTART | ||
SEQUENCE(99) | ||
AT(907) SET(943) | ||
AT(911) RESET(943) | ||
FOLLOW(99) | ||
|
||
// CMRI sketch used for testing available here | ||
// https://www.trainboard.com/highball/index.php?threads/24-in-48-out-card-for-jmri.116454/page-2#post-1141569 |
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