Hello Blynkers,
After a few days of playing around with Blynk a came across some thing that I dont really understand.
At first, I am quite new to the world of Arduino, I started like 8 months ago with the programming and soldering etc. I think I have learned alot, but dont be mad if I make stupid mistakes .
At this point I have hooked up Blynk to some lamps and a temperature sensor (DHT11) in and around my room, on an homemade Arduino UNO. It works perfectly, because Blynk is amazing!
What I would love to do is to hook the DHT11 up to the graph widget, which i did, but at this point every time when i re-open the Blynk app the graph widget is blank. Is there a way to store the values from the DHT11 every hour or so, so when i open the app I can actually see the temperature from the last hours?
Right now I have this in my code:
BLYNK_WRITE(0)
{
Blynk.virtualWrite(1, getTemp());
Blynk.virtualWrite(2, getHumi());
Blynk.virtualWrite(3, getTemp());
}
So everytime i click the button attached to virtual pin 0 the data gets updated and printed to two displays (1 and 2) and the graph widget (3). I tried to display the temperature and a â°Câ on the display:
Blynk.virtualWrite(1, getTemp() + â°Câ);
But this only shows a value of 0 on the display. Is this because the display cant actually display characters?
One last question:
The lamps on my room are simple connected to a button, which was amazingly easy to do.
To have some kind of feedback from the Arduino in the Blynk app I have a virtual pin continuously copying the state of the digital ouput.
void LEDcheck() // This function is called in the void loop
{
if (digitalRead(7) != state7) { // state7 is a boolean set to LOW by default.
state7 = digitalRead(7);
Blynk.virtualWrite(7, state7);
}
This works perfectly, but when i re-open the Blynk app while the virtual pin is high the led does not update or check the state of the virtual pin and so it does not turn on. I could of course update this state periodically, but that would only cause unnecessary trafic on your servers. Is this just the way the app (or the LED widget) works, or did I do something wrong?
< My dashboard
This was way more text than I expectedâŠ
Seriously, Blynk is amazing! I really love to play around with it and i am looking forward to the next update!
Thanks,
Bas Peter