To use I/O modules, you must register and use this library.
Write #include “CFMEGA.h”, and below that you need CFNET syntax to create an object.
#include "CFMEGA.h" CFNET cfnet;
This is an example program that turns on and off all ports of address 0 CFDO-16N module every 1 second.
#include "CFMEGA.h" CFNET cfnet; void setup() { } void loop() { cfnet.digitalWrite(0x00, 0xffff);delay(1000); cfnet.digitalWrite(0x00, 0x0000);delay(1000); }