Direction of the wind


#1

Is there any way to display the direction of the wind at Cayenne. Sorry if is very simple but i can`t find the way.


#2

what is the device you are using to get wind direction? there is no data type for widget but you can use value widget to display the wind reading.


#3

I use a device that give me an analog readin, between 0 - 5v, 0v is north , 2,5v is south …


#4

so you want to display this value on cayenne?
Next, which device are you using to connect to cayenne?


#5

I’m using an arduino with ethernet, i would like to show something like N, S, W, E …


#6

you can create 4 two state widget on the cayenne dashboard to show the respective direction and code your arduino to publish 1 to the respective widget.
exampels

CAYENNE_OUT_DEFAULT()
{
if (wind == 0)
{
    Cayenne.virtualWrite(1, 1, "digital_sensor", "d");
    Cayenne.virtualWrite(2, 0, "digital_sensor", "d");
    Cayenne.virtualWrite(3, 0, "digital_sensor", "d");
    Cayenne.virtualWrite(4, 0, "digital_sensor", "d");
}
}

this will make the widget with channel 1 HIGH indicating that the wind is blowing in the north.
similarly, do for other values.


#7

Thanks for your answer !


#8

To add on to what Shramik said, there are not yet text widgets which is why he suggested that workaround.


#9

Ok, thanks, do you think that will be available text widgets soon ?


#10

@shramik_salgaonkar might be able to answer. I do not know.


#11

not soon, maybe in the third quarter.


#12

Perfect, I will be attentive.