Hello, my name is Samuel Adranyi,
I am an IoT enthusiast and content creator. I have been following your products for some time and would like to request some free samples. This is my youtube channel where I do a lot of IoT stuff and also community engagement: https://www.youtube.com/live/9bGSxDGeS5c?feature=share
I am also a Microsoft Most Valuable Professional (MVP) in the Azure and IoT Category; you can find my profile here: https://mvp.microsoft.com/en-us/PublicProfile/5003737
I want to create content around your products and educational projects for the IoT community here in Ghana.
I want to sample the KC868-A4 Bundle E. I welcome any other device or product you want me to test or create a project.
Thank you, and awaiting your kind response.
Next program works correctly when I use only one PCF8574 (adress: 0x22; I2C pins: 4,15) that controls DI inputs on the board:
1.png
But it doesn't work when I uncomment code in red frames, trying to add another PCF8574 (adress: 0x24; I2C pins: 4,15) that controls DO outputs on the board.
2.png
Correct code for using digital input PCF8574 without errors "1.png"
Code:
// Library: PCF8574_Library by RENZO MISCHIANTI
// https://mischianti.org/2019/01/02/pcf8574-i2c-digital-i-o-expander-fast-easy-usage/
#include "Arduino.h"
#include "PCF8574.h"
// Set i2c address
PCF8574 pcf8574i(0x22,4,15);
// PCF8574 pcf8574(0x24,4,15);
I bought this AM2120 Temperature and Humidity Sensor and I am not able to get it to read input sensor on my ESPHOME. I have bought AM2301 and it works fine with the same ESPHOME code as below:
- platform: dht pin: 33 model: AM2302 ## New Sensor AM2120 NOT WORKING - NA reading temperature: name: "S4-Temp" accuracy_decimals: 1 humidity: name: "S4-Humidity" accuracy_decimals: 1 update_interval: 30s
I am having difficulty for coding my script, I would like to make a GSM relay which activates the GPIO 15 relay upon the module receipt a call ! but I cannot do it can you help me?
I think my problem is from the command of call detection.
Thanks
Code:
#include <SoftwareSerial.h>
// Create software serial object to communicate with A6
SoftwareSerial mySerial(13, 34); // A6 Tx & Rx is connected to Arduino #3 & #2
int relayPin = 15; // GPIO 15 connected to the relay
void setup()
{
// Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
Serial.begin(115200);
// Begin serial communication with Arduino and A6
mySerial.begin(115200);
Serial.println("Initializing...");
pinMode(relayPin, OUTPUT); // Set the relay pin as an output
digitalWrite(relayPin, LOW); // Initialize the relay as OFF
}
void loop()
{
updateSerial();
checkCall();
}
void updateSerial()
{
delay(500);
while (Serial.available())
{
mySerial.write(Serial.read()); // Forward what Serial received to Software Serial Port
}
while(mySerial.available())
{
Serial.write(mySerial.read()); // Forward what Software Serial received to Serial Port
}
}
void checkCall()
{
if (mySerial.available())
{
String response = mySerial.readString();
if (response.indexOf("+CLCC: 1,1,2,4,0") != -1) // Check if "+CLCC: 1,1,2,4,0" is present in the response
{
activateRelay();
}
}
}
void activateRelay()
{
digitalWrite(relayPin, HIGH); // Turn ON the relay
delay(5000); // Keep the relay ON for 5 seconds
digitalWrite(relayPin, LOW); // Turn OFF the relay
}
try:
# Open the RS485 serial port
ser = serial.Serial(
port=rs485_port,
baudrate=rs485_baud_rate,
parity=rs485_parity,
stopbits=rs485_stop_bits,
bytesize=rs485_data_bits,
timeout=1
)
# Send a command via RS485 in RTU mode
command = [0x64, 0x01, 0x02, 0x20, 0x00, 0x00, 0x01, 0x43, 0xCA] # Modify the command in hexadecimal format
crc = calculate_crc(command)
command.append(crc & 0xFF) # Low byte
command.append((crc >> 8) & 0xFF) # High byte
ser.write(bytes(command))
# Read the RS485 response
response_rs485 = ser.readline()
hex_response_rs485 = ' '.join(hex(byte) for byte in response_rs485)
print("RS485 Response:", hex_response_rs485)
# Close the RS485 serial port
ser.close()
except serial.SerialException as e:
print("Error opening or accessing the serial port:", str(e))
This is the code I wrote. The checksum passes, and everything else is fine. But when I run the code, it doesn't reflect any changes on the Inverter/ Motor. Please help.
The connections on the RS485 can be found in the images attached below.
Dobrý den,
chtěl bych získat zkušební bezplatný vzorek ovladače KC868-A4. Pracuji jako elektrikář v automobilovém průmyslu nákladních automobilů, kde jsme také prodejci značek TATRA Trucks CZECH a dále speciální nástavby na přání, kde jsme museli požádat o jinou firmu o vývoj hardwaru a pro daný typ zákazníka. Díky Vašemu ovladači bychom tyto věci zvládli sami a určitě bychom dokázali další udělat na nákup více kusů a vašich zařízení. Velmi bych ocenil vzorek zdarma.
Posted by: admin - 06-22-2023, 01:00 AM - Forum: News
- No Replies
KC868-1U is a esp32 diy pcb board. it can install to 1U size box, let your relay controller become smart. if you have a power sequencer, KC868-1U will easy connect it, so that smart control your rack power strip. You can DIY one smart power sequencer. It will support arduino IDE, home assistant by ESPHome, also support Tasmota open source home automation platform.
i am trying to configure a Light/humidity/temperature modbus sensor with kincony Ap modbus port in esphome. below is my configuration and sensor data sheet is attached,I am getting this error in the esphome logs
- id: 'pcf8574_hub_in_2' # for input channel 9-16
address: 0x21
sensor:
- platform: modbus_controller
modbus_controller_id: light_sensor1
id: light_intensity
name: "Light Intensity"
address: 0x02
unit_of_measurement: "Lux" ## for any other unit the value is returned in minutes
register_type: read
value_type: U_WORD
accuracy_decimals: 1
- platform: modbus_controller
modbus_controller_id: light_sensor1
id: temp
name: "Temperature"
address: 0x01
unit_of_measurement: "C" ## for any other unit the value is returned in minutes
register_type: read
value_type: U_WORD
accuracy_decimals: 1
- platform: modbus_controller
modbus_controller_id: light_sensor1
id: humidity
name: "Humidity"
address: 0x00
unit_of_measurement: "%" ## for any other unit the value is returned in minutes
register_type: read
value_type: U_WORD
accuracy_decimals: 1
Serial2.println("RS485 SEND is OK!!");
Serial2.println("******************");
}
void loop() {
/*print the received data of RS485 port*/
while(Serial2.available()>0)
{
Serial2.print((char)Serial2.read());//Read rs485 receive data and print it
}
delay(200);
}