Arduino UNO - Only display value of internal variable - is it possible?


#1

Hello all,
I’m a new user here and I’m interested whether is possible only display an internal variable (float)?
If yes, which device use??

I have my old project - Anemometer which operate fine. The value I display on LCD 2x16 display.
Because in cayenne I didn’t found any device for connecting the anemometer I’d like to use my sketch and let to display the variable with wind value on the cayenne…

If somebody can help me I very appreciate it.

Many thanks
BR
Martin :slight_smile:


#2

Welcome to cayenne community @dartanan

Cayenne.virtualWrite(0, x);

this lines sends the value of x to MQTT channel 0 and this value is displayed on cayenne dashboard.

you have to find a anemometer which can get connected to arduino like this http://cactus.io/hookups/weather/anemometer/davis/hookup-arduino-to-davis-anemometer
and then use the above line to send the values.


#3

Dear user,
many thanks - I’ll try it :slight_smile:
By the “device” I thought the widget. (which choose?)

Many thanks :slight_smile:
BR
Martin


#4

the solution i gave above is using cayenne MQTT library so the code line automatically adds the widget to the dashboard. and have a look at different data types Data types for Cayenne MQTT API


#5

Dear,
it really works!!! :slight_smile:
My last question is - does use <CayenneMQTTEthernet.h> or <CayenneEthernet.h> some internal Timer?
It is important for me because I use Timer for measure the time between 2 edges of the anemometer.

Many thanks
BR
Martin


#6

i dint get what you are trying to achieve.


#7

it is easy… :slight_smile:
A time ago I programmed an RC switch in to a ATTiny85 and used there a function “millis()” and at the same time I had to measure an input PPM signal.
(the function millis() uses a Timer0 => I had to use for measuring PPM a Timer 1 to avoid a collision - it is not easy programme by beginner Arduino C language)

It was the purpouse of my question :slight_smile:

What I’ll do is to use my working anemometer I’ve wrote ago.
I’ll only send to cayenne a value of an internal variable to web thanks to MQTT API.

Thanks
BR
Martin