Skip to main content

Reply to "Arduino TMCC signalling"

Ok, definitely start by reading pp. 3-6 of the document MED posted.  This explains the format of the 3-byte TMCC command strings.

The function I wrote takes these parameters:

sendTMCCCommand (SysTypes deviceType, byte deviceID, byte commandField, byte dataField, byte repeats) 

For your example (blowing a horn on a TMCC engine)

  • deviceTYPE = ENGType (B00000000 as I've defined it in the defs.h tab)
  • deviceID = xx (whatever TMCC ID# you've assigned your engine)
  • commandField = 00 (as shown on page 5 of the Lionel document for horn command)
  • dataField = B11100 (also as shown as page 5 for horn command)
  • repeats = 1  (transmit this command 1 time)

so our call is:

sendTMCCCommand(ENGType, xx, B00, B11100, 1);  //blow horn 

Some other examples:

sendTMCCCommand(ENGType, xx, B11, 10, 1); // set engine speed to step 10

sendTMCCCommand(ENGType, xx, B00, B10101, 1); // numeric 5 for slow dialogue

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)