Console app to control popular relay board based on FTDI's FT245R chip.
It requires D2XX drivers installed. Available at: https://www.ftdichip.com/Drivers/D2XX.htm
relay_ft245r.exe is available to run. Just connect a unique relay board and run it. Use "help" or "?" to see the menu. Also, see "Run" and "Limitation" sessions below.
Compiled with MinGW (original 32bits version). MinGW64 did not work even forcing -m32 option.
https://osdn.net/projects/mingw/downloads/68260/mingw-get-setup.exe
Select the dev toolkit and C++ compiler:
Open a DOS console and "cd" to where you cloned this project. Then add MinGW into the path wit the command:
cd <where_you_clonned>
path=C:\MinGW\bin;%path%
another option is to install Codeblocks: http://codeblocks.org/
Default path would be different, use:
cd <where_you_clonned>
path=c:\Program Files (x86)\CodeBlocks\MinGW\bin;%path%
then just run the batch file: build.bat
build.bat
Run the relay_ft245r.exe To turn a relay on use the "r" command. For example, for turning relay 2 on type:
r 2 on
You can use "all" to operate all relays, for example:
r all off
The current code grabs the first FT245R device from the enumeration. It operates only one relay board.
Support multiple boards.