Program send and recieve commands with RS485 Ultrasonic Anemometer


I have already created a connection trough RS485 to the Anemometer.
I can read the parameters it sends when it starts up.
Now I need to send a command and than listen to the response.


Command: 00KY00001
Responce: !00KY00001
Command 2: 00ID00004
Responce 2: !04ID00004

How do i go about this?
Can i find some example code?

Thanks in advance

There are hundreds of anemometers. Please provide a data sheet (not a picture) for the anemometer and how it is connected to the Arduino. Which Arduino? The code that you have, so far, would be helpful as well.


Its the following Anemometer:

You can find the connection in the attachment. I use A MAX485E chip.

I don't have a lot yet but here's the code i have that works to read info from the sensor.

#define LED_PIN 13
#define controlpin 3
char inputVal;

void setup() {
pinMode(controlpin, OUTPUT);

Serial.println("Init() complete"); 


void loop() {

if (Serial.available() > 0) {
 digitalWrite(LED_PIN, LOW);
 inputVal =;
 Serial.print(inputVal);  // print als ASCII-encoded tekst 
 digitalWrite(LED_PIN, HIGH);


Thanks in advance