Table of Contents

CFADC-A4L

A 4-channel AD input module that can measure voltage and current. You can select current (0~20mA) or voltage (0~10V) input by setting the dip switch.

View at our online store.

Electrical specifications

Wiring method

Measurement dip switch settings

Setting the module's address

How to use the API

1. #include "CFMEGA.h" library registration

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

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

-u16 analogRead(u8 address, u8 channel)

Reads the analog value of the corresponding channel of the specified address module. (about 0~26,666)

#include "CFMEGA.h"
 
CFNET cfnet;
 
void setup() { Serial.begin(9600); }
void loop() {
 
 u16 CH0 = cfnet.analogRead(0, 0);
 u16 CH1 = cfnet.analogRead(0,1);
 
 Serial.print("CH0:"); Serial.print(CH0); Serial.print("\n");
 Serial.print("CH1:"); Serial.print(CH1); Serial.print("\n");
 delay(200);
 Serial.print("\n");
}

Modular FADUINO