Hi, in the Sketch below, the wind direction is shown in letters but I'd like to also have the actual compass heading from the array of Floats.
I tried things like this
Serial.print(winddirections[dataBytes[4] & 0x0F]);
// or
int winddir = dataBytes[4] & 0x0F;
Serial.print(winddirections[winddir]);
// or
int winddir = dataBytes[4] & 0x0F;
Serial.print(winddirections[winddir],2);
But, I keep getting weird numbers like "S = 180.00175" even though I thought I had defined it to 2-places.
Where am I going wrong?
Oooops, Sketch was rejected as too big to include as text, so have attached it.
WeatherStation.ino (22 KB)