Skip to main content

Reply to "TMCC Control With Arduino"

One thing that came to mind immediately when I saw the TMCC command specification was how to express binary literals in C++ and the Arduino. The newer standards allow the form:

variable = 0B011010;
alternate = 0b10010;

The prefix 0B (zero, B) in either case indicates a binary literal. This is consistent with the octal and hexadecimal versions; leading 0 for octal, and leading 0x for hex. I wasn't sure about the binary version until I looked it up. Then I ran a quick check on the Arduino IDE and it compiled without complaining.

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

×
×
×
×
×