Set Propertys of an buttton with a Digital pin

And It makes errors wenn I make (NameError: Name V2 is not defined or something)

‘blynk.set_property(V2, “offBackColor”, “#000000”)’

I am back tommorow,
It’s late (Where I live).

You’re trying to program a Pi, using Python, so C++ syntax won’t work.

As I’ve said before, the Pi is an awful choice of MCU for most Blynk projects. They are expensive, require an operating system to be installed, are slow to boot, need beefy power supply and are extremely hard on SD cards (which leads to failures in the long term).

I’ve suggested an alternative, much simpler MCU which is cheaper, doesn’t need an SD card, has lower power consumption and can be programmed in C++
In response, you’ve made some cryptic comments about requiring a graphical UI, but you won’t elaborate on that - so it’s impossible to know what sort of MCU is really required.

I certainly can’t help you any further unless you elaborate on the UI side of the project requirement.

Pete.

1 Like

@Doom_guy Old Blynk Python support was very basic, but here is what you need to look at to figure it out…

As far as I recall with RPi/Python/Blynk there was no direct GPIO control, all that is done with vPins and whatever Python GPIO library you chose to use.

Instructions are minimal, and there are some limited examples in the Blynk Python library. But nothing I could see on how to properly use set_property so you will have to look into the library and compare/extrapolate it for yourself.

image

New Blynk Python is still pending…

1 Like

OK, looks like you may have been close…

As in other examples, try without the V

blynk.set_property(2, "offBackColor", "#000000")

Hello,
It works with only an number (but I did it already).
But there are only vituel pins included, I need Digital pins.

PS: Please stop saying Arduino (MCU) is better than a raspberry pi.

Arduino’s are an awful choice of board in my opinion, and if you re-read what I wrote you’ll see that I suggested a NodeMCU or ESP32, neither of which are made by Arduino.

It seems that what you are trying to achieve with your combination of hardware, programming language and digital pins isn’t achievable. You’ll need to change at least one of those choices to achieve the result you require.

But’ as you clearly aren’t interested in my thoughts on the matter I’ll bow-out and leave you to it.

Good lick with your project.

Pete.

Ok,

But then can someone tell me how to read virtuel pins in python blynklib.

It is in the library examples I already posted above. Particularly

You can also try searching this forum for Python examples, but there are very few.

1 Like