Hello,
is there a way to get Blynk 2.0 work on Raspberry Pi (RPi) ?
I tried node.js… and failed…
Hardware model: RPiZeroW
Communication type: Wifi
Smartphone OS Android
Blynk server (cloud)
Blynk Library version
node -v :v11.15.0
npm -v : 7.20.5
asmv-module@1.0.0 /home/pi/asmv-module
├── blynk-library@0.5.4
└── onoff@6.0.3
It does connect to Blynk 1… and Blynk1 script seems to work.
As a newbee I had to learn and Blynk2 and Blynk 1… kind of frustrating.
I understand, I think, what Blynk 2 is about (deployment) and I like this idea.
BUT how do I get RPi to be working with Blynk 2, either node.js or else ?
Create project in Blynk with generation of Auth token
Setup of test.py file with the following code:
import blynklib
BLYNK_AUTH = '<YourAuthToken>' #my token was used here
blynk = blynklib.Blynk(BLYNK_AUTH)
while True:
blynk.run()
When executing the above test.py file, I see the Blynk logo appearing, but no further info or updates on succesful connection or initialisation.
Can the test.py file run without any Virtual Pin code or declaration?
I just wanted to get the RP3 online before I proceed with using the Virtual Pins or other functionality.
@MDurie Let me know if this test code worked for you. I’ve a project running with Blynk1.0 since BlynkLib was first written (2-3 years) and it’s been running like a charm. But, I cannot say the same for Blynk2.0. The latter is a bit immature for Python projects.
Sorry, my bad, I meant GPIO5 instead of pin5 as @PeteKnight has illustrated. The test code shown above is using arrays to hold relays and LEDs pins #s as I used them for a project implementing my own relays board. You may want to simplify the code to make it a bit easier on you. If you need further help, just post your code.