Setting memories on esp32

Hi I am a programming and Blynk noob so sorry if i sound confused.
I am using Blynk and a ESP32 to control a stepper motor and seem to have it working how I want but what I want to ask is this. I have 6 buttons on Blynk that move the stepper a set amount of steps these are coded into the Arduino sketch using int statements e.g
“int abc=1000” which can then be called by accelsteper in this way “stepper.moveTo(abc)” however since starting this I have found that I now would like to be able to vary the step movements. is there a way I could use the flash memory to make “abc” a dynamic(think that’s word I am looking for) variable that i can store and recall rather than the hardcoded type ? basically i want to move a stepper to a number of steps and then store that to button 1 then move to a different position and store to button 2 etc etc but rather than have this fixed i would like to be able to update at will bit like storing a radio station on your radio and then deciding you want a different one instead.

sorry if I am waffling but i know what I mean

Rather than storing these to “flash memory”, you’d be better storing these values on the Blynk server as nd rec as long them when your device connects to Zblynk at startup

You could have 6 step widgets that you use to control these values, a bit like this…

In this case the step widgets allow me to change the number of hours that each fan will run for.

The step widgets are attached to virtual pins, and the values are sent to the device whenever they are updated, or when a synchronisation request is issued

You can learn more about virtual pins by reading this.,.

Pete.

Thank you for that idea but could I store this directly from a Arduino sketch ? Say that the stepper moves 12000 steps to reach the first point I want to recall could I then store that position and allocate this to button without needing to rewrite the code? The biggest issue is that this is going to be used outdoors and will not have access to pc or laptop when it is in use

I don’t really I understand what you’re asking here.
The values are set in the Blynk app, and are available within your sketch. They can be updated dynacslly from the app, and used in real time from within the sketch as variables.

Will your ESP32 have a good and constant internet connection? If not then Blynk is a bad choice.

Pete.

Yes will be using a mobile hotspot but may have to investigate some of the pros and cons I guess may have to go down a dedicated app and sketch route was hoping not to have to go that way lol or maybe go back to a wired or Bluetooth controller

Are you referring to Blynk here, or something else?

I’m afraid I’m not reAlly following your train of thought here, maybe you should elaborate more on what it is that you are trying to achieve and what your concerns are.

Pete.