Posts: 6,311
Threads: 808
Joined: Oct 2020
Reputation:
154
#define ANALOG_A1 36
#define ANALOG_A2 39
#define ANALOG_A3 34
#define ANALOG_A4 35
IIC SDA:4
IIC SCL:5
Relay_IIC_address 0x24
Input_IIC_address 0x22
DS18B20/DHT11/DHT21/LED strip -2: 14
RF433MHz wireless receiver: 16
Ethernet (LAN8720) I/O define:
#define ETH_ADDR 0
#define ETH_POWER_PIN -1
#define ETH_MDC_PIN 23
#define ETH_MDIO_PIN 18
#define ETH_TYPE ETH_PHY_LAN8720
#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT
RS485:
RXD:GPIO32
TXD:GPIO33
GSM:
RXD:GPIO13
TXD:GPIO15
Buzzer:GPIO2
WS2812B RGBW LED:GPIO12
Posts: 16
Threads: 4
Joined: Dec 2022
Reputation:
0
Hello all, am planning to buy this board and connect to blynk cloud with it using simcard cellular data. please if you guys have a sample code to help me with it. also could you please define pins for the relays
Posts: 6,311
Threads: 808
Joined: Oct 2020
Reputation:
154
hello, i have not tried use blynk, you can try. the relay control by PCF8574 IIC extender chip.
Posts: 1
Threads: 0
Joined: Mar 2023
Reputation:
0
What about the relays? There are no pins associated with them in KC868-A8S. How to control them?
Posts: 6,311
Threads: 808
Joined: Oct 2020
Reputation:
154
do you have seen "Relay_IIC_address 0x24" ?
KC868-A8S relay output and digital input all use by PCF8574 I2C chip. just you know the address, then can use all relay. we have arduino demo source code how to use it.
Posts: 1
Threads: 0
Joined: Oct 2023
Reputation:
0
I'm trying to use the Digital Output but it doesn't work for the sensor HC-SR04 that I'm using.
I already tried to declarate the Digital Output through the IIC gpio expander PCF8074 with the adress 0x22 but it doesn't work.
I'm working with KC868-A8S.
This is the normal code for the HC-SR04:
const int Trigger = 2; //Pin digital 2 para el Trigger del sensor
const int Echo = 3; //Pin digital 3 para el Echo del sensor
void setup() {
Serial.begin(9600);//iniciailzamos la comunicación
pinMode(Trigger, OUTPUT); //pin como salida
pinMode(Echo, INPUT); //pin como entrada
digitalWrite(Trigger, LOW);//Inicializamos el pin con 0
}
void loop()
{
long t; //timepo que demora en llegar el eco
long d; //distancia en centimetros
digitalWrite(Trigger, HIGH);
delayMicroseconds(10); //Enviamos un pulso de 10us
digitalWrite(Trigger, LOW);
t = pulseIn(Echo, HIGH); //obtenemos el ancho del pulso
d = t/59; //escalamos el tiempo a una distancia en cm
Serial.print("Distancia: ");
Serial.print(d); //Enviamos serialmente el valor de la distancia
Serial.print("cm");
Serial.println();
delay(100); //Hacemos una pausa de 100ms
}