Greetings!, recently i got a new project from my office to monitor the weather. But first i want to try the sensors individually. So here's the thing, I want to display the data that written in the code, but in the serial monitor it displays

and the connection of my sensor to arduino uno (from cybertice)
#include <SoftwareSerial.h>
#include <Wire.h>
#define RE 8
#define DE 7
const byte a2[] = {0x01 ,0x03 ,0x00 ,0x00 ,0x00 ,0x02 ,0xC4 ,0x0B};
byte values[20];
SoftwareSerial mod(2, 3);
void setup() {
Serial.begin(4800);
mod.begin(4800);
pinMode(RE, OUTPUT);
pinMode(DE, OUTPUT);
}
void loop() {
int val1 = 0 ;
Calculate();
val1 = ((values[5]*256)+values[6]);
Serial.print("Direction: ");
Serial.println(val1);
if (val1 == 0){
Serial.println("N");
}
if (val1 == 45){
Serial.println("NE");
}
if (val1 == 90){
Serial.println("E");
}
if (val1 == 135){
Serial.println("SE");
}
if (val1 == 180){
Serial.println("S");
}
if (val1 == 225){
Serial.println("SW");
}
if (val1 == 270){
Serial.println("W");
}
if (val1 == 315){
Serial.println("NW");
}
delay(2000);
}
byte Calculate() {
digitalWrite(DE, HIGH);
digitalWrite(RE, HIGH);
delay(10);
if (mod.write(a2, sizeof(a2)) == 8) {
digitalWrite(DE, LOW);
digitalWrite(RE, LOW);
for (byte i = 0; i < 11; i++) {
//Serial.print(mod.read(),HEX);
values[i] = mod.read();
//Serial.print(values[i], HEX);
//Serial.print(" ");
}
Serial.println();
}
return values[6];
}
Is there any problem in the code and connections? Thanks for your future answers!
