Reputation: 29
I followed this guide to get my Raspi and Blynk connected : http://help.blynk.cc/how-to-connect-different-hardware-with-blynk/raspberry-pi/raspberry-pi-and-blynk . However, when I try to turn on my LED from the app I get the following error:
No direct pin operations available.
Maybe you need to install mraa or onoff modules?
I have installed the modules and it still doesn’t work
Upvotes: 0
Views: 940
Reputation: 11
Better to use blynk library in python it works fine using python instead of running a node server.
Steps for running Blynk on Raspberry Pi (3B/3B+/4B/Zero) :
pip3 install blynklib
pip3 install gpiozero
import gpiozero
import blynklib
red = LED(17)
BLYNK_AUTH = '<YourAuthToken>' #insert your Auth Token here
blynk = blynklib.Blynk(BLYNK_AUTH)
@blynk.handle_event('write V4')
def write_virtual_pin_handler(pin, value):
print('Current V1 value: {}'.format(value))
if(value):
LED.on()
else:
LED.off()
while True:
blynk.run()
Upvotes: 1