Using an Arduino Due to control DCC for motor

Hi,

My group and I are writing code on the Arduino to try and control a motor connected to preprogrammed digital command control circuits. We know the addresses of each one, however we are struggling to know how to code it.

We have looked into it and were told that we need to send a DCC Format preamble ,address Byte, data Byte and error Byte but we are unsure how to do this.

Please advise?

Imagine how much further ahead of us you are since you actually know what sort of motor controllers and what sort of motors you have? It is impossible for someone to tell you how to code for something when you don't even tell them what it is. Why would you leave out that sort of detail? Are we supposed to guess?

Post a datasheet to your motor controller and surely someone can help you put together what it needs.

madeofclae:
to try and control a motor connected to preprogrammed digital command control circuits. We know the addresses of each one, however we are struggling to know how to code it.

Perhaps you mean that you want your Arduino to send commands to an existing DCC controller such as a Lenz, Digitrax, Gaugemaster or Hornby unit?

If so that is very different from generating DCC signals.

You need to post details about the devices you want to communicate with.

...R