-
Hi, I'm part way through a guitar pickup winder project. The machine is built and to all intents and purposes, is working. I'm not a programmer (more of a builder) so I'm struggling a little with coding. I have taught myself thus far by studying example code and tutorials. For the bobbin spindle I am using FastAccelStepper to drive a nema17 stepper motor. It needs only to run continuously for the specified amount of turns. I'm using two Esp32's to do this. One Esp32 receives data from a Firebase RTDB. The RTDB holds all the parameters for quite a large - and growing - number of pickup configurations so it makes sense to auto populate as many parameters as is possible. This Esp32 then transmits the retrieved stepper motor variables (for example, setAcceleration, setSpeed and setMovement) to the other Esp32 over ESP-NOW. The messaging from the transmitting Esp32 is being received on the second Esp32 successfully and is working as expected. I'm using Preferences on the second Esp32 to store the stepper motor variables (amongst other data) and what I want to achieve is to be able to populate the required parameters in the stepper code from the data stored in its Preferences. I'm struggling with this part of the code. Is what I am expecting possible? I'm scratching my head here. Manually entering speed, accel and move parameters works as you would expect but is not what I want. I can post the ESP-NOW receiver sketch containing the stepper code if required and any help would be much appreciated. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
One final attempt last night before chucking in the towel. Well worth the effort because I fixed it by bypassing Esp32 Preferences. I must have something amiss inside my prefs code. It stores correctly but somehow will not retrieve the stored values properly. Anyhow, irrelevant now as I can now populate my stepper code sent over ESP-NOW. |
Beta Was this translation helpful? Give feedback.
One final attempt last night before chucking in the towel. Well worth the effort because I fixed it by bypassing Esp32 Preferences. I must have something amiss inside my prefs code. It stores correctly but somehow will not retrieve the stored values properly. Anyhow, irrelevant now as I can now populate my stepper code sent over ESP-NOW.