Enhanced Gauge Help

Hi folks,

I have a weather station that sends data to weatherunderground.com, and everything is functioning correctly. My question is about an indicator, specifically the wind heading or direction. I’ve created an Enhanced Gauge set to a circle, but I’m struggling to make it display the correct wind direction. The screenshot shows the accurate wind direction in numbers, but the indicator (dot) is 180 degrees reversed.

Your help will be much appreciated.

Regards,
Alex

I don’t think there’s a way to make the origin (0/360) appear at 12 o’clock on the enhanced gauge.

Pete.

Yes Pete, you are correct, I need to work on the code myself to get the degrees inverted just for the enhanced gauge, while keeping the correct wind direction for everything else.

If you do that then the number that’s displayed in the gauge will be wrong. You can get around that by hiding it, by changing its font colour, but kind of defeats the object of using the gauge.

You seem to be using a wind direction sensor that can detect individual degrees of wind direction, is that correct?
My sensor gives only 12 directions (N, NNE, NE, ENE, E etc etc). That would make it feasible to use the Image Gallery widget to display the wind direction, but that’s not really feasible with 360 potential options.

Pete.

Post will be updated soon.

1 Like

I would recommend using the image widget and rotate it using setProperty API

Hi Pavel, I added the following lines, but the setProperty seems to have no effect.

  Blynk.virtualWrite(V10, heading);
  Blynk.setProperty(V10, "rotation", 180); //0-360 degrees

V10 is a virtual pin. I am using the Adafruit ESP32 V2 and the Arduino IDE.

Regards,
Alex

I’m not quite sure why you’re doing this…

I just did the following…

  • Add an Image Gallery widget
  • Connected it to a virtual pin with an integer data type
  • Added one image. I chose this url…
    https://community.blynk.cc/uploads/default/original/3X/4/a/4a22d66cc853cd9346048882c0a63b487a89322b.png
    which is this image from the image sharing topic…
  • Hit the tick icon to save the image

Used the HTTP set property API to rotate it by x degrees (I was too lazy to write a sketch and upload it to a device :grinning:)

It works fine, although part of the image is cropped-of at angles around the 45, 135, 225 and 315 degrees areas, but that’s just the design of the image I chose.

Pete.