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

Easier way to declare a virtualpin in nodejs? #24

Open
ngohuunam opened this issue Nov 15, 2016 · 2 comments
Open

Easier way to declare a virtualpin in nodejs? #24

ngohuunam opened this issue Nov 15, 2016 · 2 comments
Assignees

Comments

@ngohuunam
Copy link

As normal, I declare a Virtualpin like your example: var v1 = new blynk.VirtualPin(1);
If I have "some" virtualpin, it's fine, but in case of many pins, about 40 - 50 pin? Is there any way to more quick and easier to declare a virtual pin instead of write 40 - 50 lines ? I know this is personal question, but hope you can help me.

@vshymanskyy
Copy link
Owner

Any ideas?

@BLavery
Copy link

BLavery commented May 2, 2017

Try:

for (v=0; v<=30; v++)
eval("var V" + v + " = new blynk.VirtualPin(" + v + ");");

@vshymanskyy vshymanskyy self-assigned this Feb 14, 2019
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