I’ve got an problem with the Virtual Pin combinded with the Joystick widget. I want that the value from my joystick widget sends constantly an value to the virtual pin. I already tested the Joystick example for the serial output and realised that there is no constantly sending of values. The values are only sending when i move my joystick a little bit.
So my question is, is it possible that i can send constantly an value of the joystick without moving the joystick?
Thanks for your fast reply. I am using the joystick for my Stepper Motor project, so i can move the joystick forward and the motor should go constantly forward, but when there is no constantly sending of values from the joystick widget, then it’s is useless for me. Do you have an another suggestion about my problem?
Hello. You can do that in your code as they told you. There is no need for the widget to send the value constantly.
Maybe you will need to re-write or re-think your code, but is completely possible.
@Luciano Hi, do you have an example for that type of code ?
Because i don’t have any ideas, i have researched everywhere.
That’s the reason why i made an new topic. It would be great if you or someone else has any ideas.
@Luciano I already wrote the code like that, but it doesn’t work like that with constantly sending of values. I also set the Code in a while loop in the BLYNK_WRITE(V1) but it only starts the motor but never stops again.
PS: I am using an l298n Module with the combination of Stepper Motor, Arduino Mega and an HC-06 Bluetooth Module.
It should work… maybe you have to change your program (the motor moving part)
This way if you pull the joystick UP, moveDirection will stay UP unless yo move it to other position (DOWN; LEFT or RIGHT) or press STOP button.
Then you need to use that information to move the motors, that has nothing to do with Blynk, its coding.
Maybe if you post your complete code I can help you, but I dont know much about stepper motors.
@Luciano Without Blynk, only the code and an normal hardware joystick I can move the motor. But when i implement the code in blynk and want to configure everything so that it work like i think it should. I upload the programm, but it doesn’t work. However i can send you the code tomorrow and maybe some screenshots of my Code and my Blynk programm.
Anyway thank you for your helping and time, i really appreciate that.
I think you are describing the AccelStepper Library, which has nothing to do with the Arduino Stepper.h Library i think.
What I want to use the Blynk for:
I want to use Blynk for the Stepper motor control and i want this manually not with Timer or something else.
My idea is that i can move the Stepper Motors forwards and backwards with the joystick and that constantly. I just want the joystick movement forward, backward, left and right i will add too only if the forward and backward is possible with Blynk App and Library.
@IBK Thanks for your reply.
When i use the timer is it possible that i can move the joystick forward and the Stepper Motor is constantly moving forward or is it not possible with the timer?