Table of Contents

CFDI-16B

This is a 16-point bi-directional Digital input module.

View at our online store.

Electrical specifications

Wiring method

Setting the module's address

* Up to 8 CFDI-16Bs can be used in one system with different address settings of 0~7.

How to use the API

1. <html>

#include "CFMEGA.h"

</html> library registration

2. CFNET object creation: CFNET object name CFNET cfnet;

3. Call the function(s): Object name.digitalRead();cfnet.digitalRead(0);

-u16 digitalRead(u8 address);

The input status of the entire specified address module is read as a 16-bit value.

-bool digitalRead(u8 address, u16 pin);

Returns the state of a single pin as a boolean value. (1 bit read)

#include "CFMEGA.h"
 
CFNET cfnet;
 
void setup() {
 Serial.begin(9600);
}
 
void loop() {
 
 u16 blockK0 = cfnet.digitalRead(0);
 bool portIn0 = cfnet.digitalRead(0, 0);
 
 Serial.print("Block0 : "); Serial.print(blockK0, HEX);
 Serial.print(" PortIn0 : "); Serial.print(portIn0,HEX);
 Serial.print("\n"); delay(200);
}

Modular FADUINO