@Gunner when you tested the C++ stuff on your Pi was it a Pi 3?
Wondered if you could test something for me if you have a Pi 3. Does the gpio pin still go high and low if you remove the button tied to the digital pin i.e. control just by the button tied to a virtual pin?
Works OK for my Pi Zero’s but not for @schmersgahoven’s Pi 3.
No fansnazzy new stuff for me, I am afraid… My RPi is one of the originals (RPi Model B ver 2.0). But so far all GPIO’s I have tested do what they should with either Virtual or Physical buttons in both C++ and Javascript clients.
Well the 3 would be good for me as I’m terrible with a soldering iron as the Zero’s don’t have any headers.
For the Zero as a Blynk server it doesn’t need any headers but when you move on to client stuff it generally needs headers.
SimpleTimer should now be available, from the Master branch, for the Pi as @vshymanskyy pushed an update a few days ago. Intervals should be set at > 10ms.
@costas can you give me an example how the now updated timer under C should work? I see that the timer is called in the loop: timer.run(); but I did not get how to define interval like for simple timer for Arduino with: timer.setInterval(1000L, blinkLedWidget); under void setup.
@costas maybe not 100% familar but I thougt reading enough to come along with easy (simple) timer functions but it seems that not. I read your hints and thought I am doing right. I do not used blinkLedWidget() function but tried another simple code just a modification of yours from the top.
But the function will not repeat writing uptime to V0
@schmersgahoven have you added a digital pin in your project as I believe that you established the virtual pins are only updated if they are tied to digital pins?
@costas I do not think that this is the reason. Due to this I tried to repeat the repeateMe() by using millis() but here I came into trouble with delayed reaction of app and offline erros. So I deleted my code and go back to the beginning by putting your code from above in the main.cpp and tried this. And I have the same issue. If I push a button it displays and offline message and Uptime is sconds are counted wih delay of 4-5 seconds. I think this is caused due to flood error because terminl gives me the trouble message. But the problems appears with new update. I do not have them before with your example from above. And my try with simpleTimer from my last poste is not working as well.
Can you mayb verify that your code from above is not working anymore with update of library or is it just a problem of my set up?
I’m still having a ton of trouble getting the C++ example working
I’ve done everything but when I do ./build.sh raspberry I get
In file included from main.cpp:45:0:
./BlynkApiWiringPi.h: In instantiation of ‘void BlynkApi<Proto>::processCmd(const void*, size_t) [with Proto = BlynkProtocol<BlynkTransportSocket>; size_t = unsigned int]’:
../src/Blynk/BlynkProtocol.h:349:9: required from ‘bool BlynkProtocol<Transp>::processInput() [with Transp = BlynkTransportSocket]’
../src/Blynk/BlynkProtocol.h:166:31: required from ‘bool BlynkProtocol<Transp>::run(bool) [with Transp = BlynkTransportSocket]’
main.cpp:97:13: required from here
./BlynkApiWiringPi.h:177:9: error: ‘class BlynkProtocol<BlynkTransportSocket>’ has no member named ‘currentMsgId’
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_RESPONSE, static_cast<Proto*>(this)->currentMsgId, NULL, BLYNK_ILLEGAL_COMMAND);
^
Makefile:70: recipe for target 'main.o' failed