Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Blynk' object has no attribute 'VIRTUAL_WRITE' on a raspberry pi pico w #77

Open
mas6y6 opened this issue Jul 27, 2023 · 3 comments
Open

Comments

@mas6y6
Copy link

mas6y6 commented Jul 27, 2023

I have an issue that the function 'VIRTUAL_WRITE' was not found and VIRTUAL_READ is broken for micropython

Here is the code

import BlynkLib
import connecttowifi
connecttowifi.connect()
AUTH_TOKEN = "*"
# Initialize Blynk
blynk = BlynkLib.Blynk(AUTH_TOKEN)

@blynk.VIRTUAL_WRITE(3)
def v3_write_handler(value):
    # execute the command echo it back
    blynk.virtual_write(3, 'Command: ' + value + '\n')
    blynk.virtual_write(3, 'Result: ')
    try:
        blynk.virtual_write(3, str(eval(value)))
    except:
        try:
            exec(value)
        except Exception as e:
            blynk.virtual_write(3, 'Exception:\n  ' + repr(e))
    finally:
        blynk.virtual_write(3, '\n')

while True:
    blynk.run()
@ebolisa
Copy link

ebolisa commented Jul 27, 2023

Maybe you're using the wrong library? Which version are you using?
(https://github.com/vshymanskyy/blynk-library-python/tree/master)

@mas6y6
Copy link
Author

mas6y6 commented Jul 27, 2023

I am using the latest version

@ssplatt
Copy link

ssplatt commented Aug 3, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants