Skip to main content

Reply to "Arduino TMCC signalling"

Hi David - replying to your post on this thread, but continuing here to keep everything in one place.

Let's take this one step at a time.  First let's see if we can successfully compile the two zip files I posted above. (Apologies if this seems elementary, but I'm not sure where the hangups are).

When you expand each zip file you should get a folder. The TMCC_Snippets folder should go on your computer at Documents/Arduino/ (hopefully you already have this folder).  The ByteBuffer2 folder is a library, so it should go in Documents/Arduino/libraries.

Now go to the TMCC_Snippets folder and open the TMCC_snippets.ino file.  Hopefully that should launch the Arduino IDE, and you should get a sketch with three tabs.  Can you compile that sketch?



Second, let's make sure you have a working serial connection to the Command Base. Here is a simple echo program.  It assumes you have your Arduino serial monitor connected to Serial, and your RS232 converter from the Command Base connected to the Mega Serial1 TX and RX pins (you can use Serial2 or Serial3 as well).

#define TMCCPort Serial1

void setup() {
Serial.begin(115200);
Serial.println("Echo starting");
TMCCPort.begin(9600);
}

void loop() {
if (TMCCPort.available()) {
Serial.print(TMCCPort.read(), HEX);
Serial.print(" ");
}
}

Run this program and use your Legacy CAB remote to send some TMCC commands (doesn't matter what they are).  Do you see commands being echoed to your computer screen?  If they are TMCC commands they should be in the form of three bytes,  FE XX XX.

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
330-757-3020

www.ogaugerr.com
×
×
×
×
×