Greetings fellow programmers! Yesterday I asked a question on how to install blynk for python3, and thanks to some generous help I got it to install itself. However, now I need to know how to control Widget LEDs on the app through python. As it turns out, no tutorials exist on how to do this. I checked Youtube, The official blynk website, and other reliable sources. Can anyone here tell me how to do this or at least point me to a tutorial that I might have overlooked?
-
1Please answer if you can. I really need to finish this project!– UNKNOWNApr 26, 2020 at 20:11
-
1Well, you really need to watch this pretty lady, at least three times. :) Blynk an LED on Raspberry Pi - 49,930 views 2017apr17 youtube.com/watch?v=LJ3ic8C8CcA. Happy watching Cheers.– tlfong01Apr 27, 2020 at 1:54
-
1And are you sure you want to do it using python on Rpi? Why not cheat by doing everything in the Blynk cloud?– tlfong01Apr 27, 2020 at 1:56
-
1And two more must watch YTs:(1) blynk.io, (2) youtube.com/watch?v=3KFvoDDs0XM. Cheers.– tlfong01Apr 27, 2020 at 2:01
-
1Nice videos. Sorry, but I was looking for how to control the LED on the Blynk app. Thanks for trying.– UNKNOWNApr 27, 2020 at 21:14
1 Answer
Well everyone, if you have the same problem I would recommend joining the Blynk community. Their site is a lot like this one to find answers. Use these commands to turn it on and off.
#to turn it on
blynk.virtual_write(10,255)
# to turn it off
blynk.virtual_write(10,0)
I would not expect immediate results because it takes a few seconds for python to connect to Blynk. So I would run this code in a loop, waiting a few seconds between commands.
-
1How nice to see the easy solution. I thought it would take me hours to study how to "Virtual Blynk Write LED and Read Button. Cheers.– tlfong01Apr 29, 2020 at 2:41