# AirDCC: AirWire-compatible Arduino Library



## ereuter (Feb 7, 2017)

I have written an AirWire-compatible library for the Arduino, called AirDCC. Here is a link to the repository on GitHub: https://github.com/ereuter/AirDCC

To make this work, you need a CC1101 module such as this one: (Link to Amazon)

These run at 3.3 V, so to connect to a 5 V Arduino, such as the Uno, you need one of these: (Link to Amazon)

Both parts are cheaper on eBay if you want to wait for shipping from China.


To install, download the zip file, unzip into your /arduino/libraries folder, wherever that is on your computer.


There is an example accessory decoder program included, available under the examples submenu. This uses the DCC_Decoder library that is available in the Arduino Library Manager. The example decoder decodes 4 accessories and toggles separate pins for on & off, plus a servo pin. You can define the accessory addresses, the pins you want to use, and the two limits for each servo. All of the states are saved to EEPROM and restored on power-up. You can also define the AirWire channel. This is hard-coded at the moment, but will eventually be a CV.


The library also works for transmitting. I have successfully used it to control and program AirWire boards with JMRI. More on that soon.


----------



## Greg Elmassian (Jan 3, 2008)

So that transceiver module will work with AirWire transmitters?

Greg - 200 - the end is in sight!


----------



## ereuter (Feb 7, 2017)

Yes. CVP uses the same chip (CC1101) in their products.


----------

