Z-UNO 2 RS-485
Posted: 08 Feb 2025 21:00
I am trying to makde and install a sketch for a flowmeter that communicate with RS-485.
Are using the new configurator and select like this picture con1.jpg (attached)
I get the SKECTH below.
I am uploading thsi to the Z-UNO 2 in Arduino 1.8.19 version using the 3.0.10 version of the boards manager.
Then I pair the Z-UNO 2 board with my Z-WAY system version v4.0.3
The pairing of the device is successful. But the device show no measurements, see enclosed file device.jpg.
**SKETCH START
/*
* This code was generated using the configurator
* https://z-uno.z-wave.me/configurator/#/ ... l=XKyjz0A7
*/
#include "ZUNO_SHIELD.h" // Shield library
ZUNOShield shield; // Shield object
void setup() {
Serial1.begin(9600);
pinMode(2, OUTPUT);
digitalWrite(2, LOW);
}
void loop() {
// read values
// check rules
// set values and send reports
}
// Functions
char readByteRS485() {
while(Serial1.available() <= 0) delay(1);
return Serial1.read();
}
void writeRS485(char b) {
digitalWrite(2, HIGH);
delay(5);
Serial1.write(b);
delay(5);
digitalWrite(2, LOW);
}
**SKETCH END
Are using the new configurator and select like this picture con1.jpg (attached)
I get the SKECTH below.
I am uploading thsi to the Z-UNO 2 in Arduino 1.8.19 version using the 3.0.10 version of the boards manager.
Then I pair the Z-UNO 2 board with my Z-WAY system version v4.0.3
The pairing of the device is successful. But the device show no measurements, see enclosed file device.jpg.
**SKETCH START
/*
* This code was generated using the configurator
* https://z-uno.z-wave.me/configurator/#/ ... l=XKyjz0A7
*/
#include "ZUNO_SHIELD.h" // Shield library
ZUNOShield shield; // Shield object
void setup() {
Serial1.begin(9600);
pinMode(2, OUTPUT);
digitalWrite(2, LOW);
}
void loop() {
// read values
// check rules
// set values and send reports
}
// Functions
char readByteRS485() {
while(Serial1.available() <= 0) delay(1);
return Serial1.read();
}
void writeRS485(char b) {
digitalWrite(2, HIGH);
delay(5);
Serial1.write(b);
delay(5);
digitalWrite(2, LOW);
}
**SKETCH END