I would like to connected the ARTEKIT AK-DS2480B-UART to some of the Silicon Labs development board to test DS18b20 temperature sensor with Z-Wave and Matter over Thread.
I have in the past connected a Winsen MH-Z14A like shown in this picture: zwave-multilevel-sensor/images/sensor_hardware.jpg at main · olavt/zwave-multilevel-sensor (github.com)
It was no problem writing commands to the CO2-sensor and getting answers back.
I have been trying to get the same to work with the ARTEKIT AK-DS2480B-UART, but have not been able to get the communication going. Sending data seems successful, but I always get 0 bytes when calling reads from the UART.
This some code I have tested with:
char buffer[10];
sl_iostream_t* sensor_stream = sl_iostream_get_handle("exp");
uint8_t command = _UART1WIRE_COMMAND_MODE;
sl_status_t status = sl_iostream_write(sensor_stream, &command, sizeof(command));
command = _UART1WIRE_RESET;
status = sl_iostream_write(sensor_stream, &command, sizeof(command));
size_t bytes_read;
status = sl_iostream_read(sensor_stream, &buffer, sizeof(buffer), &bytes_read);
The baud rate is set to 9600 baud, 1 stop bit, no parity, no flow control.
I’,m not sure what pins are required to connect. I have tried with GND, +5V, RX, TX. I have also tried with VPP in addition connected to +5V.
Right now, there are no DS18b20 connected to the 1-wire.
It should still be possible to communicate with the ARTEKIT AK-DS2480B-UART?
What could be the problem?