Trying to do something I thought was simple… I am trying to control a servo for a door lock with the push button in blynk and a particle photon chip. I can get servo to work with slider but not the push button. Any ideas. I am using pin Do… how can I make the button variable
In order to move the servo reliably with just a button (assuming ON is one position and OFF is another), then you need to use Virtual Pins and some code.
https://www.arduino.cc/en/Reference/ServoWrite
BLYNK_WRITE(V0) // Button/Switch on V0 with MIN - MAX settings of 0 - 180 - adjust as needed for particular servo
{
myservo.write(param.asInt());
}
thanks for the response… I am very new to codding. do you have a working example of some code that will move a servo in blynk. I should be able to alter it to fit my needs. I am also wanting one red led to be triggered when it is one way and a green led to be triggerd when it is the other way… Any help you could give would be great… Thanks so much…
No problem… but best to keep question in the open forum for the benefit of all.
And for more… simply search this forum for keywords like servo as there are many examples around… and basically most any servo script found on Google will work just fine with Blynk libraries… it is only necessary to keep code from blocking the Blynk library from it’s loop that needs to be taken into consideration when merging those scripts with Blynk…
ok I know how to make a led blink over the internet using a particle photon chip and the blynk app… I built the hardware for a door unlocker… It has a servo and 2 led lights one light stays on when door is locked and the other when unlocked. I can not figure out the code. I want to be able to use the single push button in blynk. I am very new to coding. Anyone have a sketch or willing to walk me through it…
There is an example generator.
Please note that this is not a forum to learn C++ or coding. You should really to using google to learn to code.
@Michael_Smith This is all the same forum… please keep your questions about this issue in this same topic… I have merged your 2nd help request back into this one.
@Jamin is correct… There are many other Web sites that will teach you how to code in various different languages… but this is not really one of them
The purpose of this forum is to share Blynk projects and assist with Blynk related issues, and answer questions about Blynk commands, projects, etc.
That link @Jamin provided can be set up for your hardware type and different examples… including a basic Servo example.