0

I am trying to run a cod for LED on and off through blynk app but every thime it is showing this error: AttributeError: 'NoneType' object has no attribute 'send'

my code is

import RPi.GPIO as GPIO
import blynklib
import time
GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
GPIO.setup(12,GPIO.OUT)
BLYNK_AUTH = 'k6iLZ6jvfsGw3oZaNjCkhUlMUyRd0QT6'
# Initialize Blynk
blynk = blynklib.Blynk(BLYNK_AUTH)
# Register Virtual Pins
#@blynk.virtual_write("readV0")
@blynk.virtual_write(0)
def my_write_handler(value):
        x=(format(value[0]))
        print(x)
        if x=="0":
                print("LED Off")
                GPIO.output(12,0)
        if x=="1":
                print("LED On")
                GPIO.output(12,1)
while True:
        blynk.run()

please provide solution for this

2
  • Please post the entire stack trace in code tags so we can debug easier. Thanks :) – Unsigned_Arduino Mar 22 at 11:45
  • I can not see any relevance to the Raspberry Pi. This seems to be a problem with blynklib. – joan Mar 22 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.