Numerical String Generator Widget

I just built an 8 head peristaltic dosing pump Project. In the code, a value is passed to the hardware from some Step widgets and a button, and math is performed with preset values, the output of which determines the duration of time that each motor spins for. That said, I would like the ability to adjust the preset values in the code so I can recalibrate each motor.

For my project, I only need to generate a string of 3 numbers, but perhaps other projects will become more workable if certain values can be manipulated β€˜on the fly’. What I have in mind is like the bicycle chain locks from the 1980s where the lock was built right onto the chain. This was a combination lock that consisted of a series of barrels or wheels with the numbers 0-9 embossed on each barrel. The number string between the lines on the lock was the combination to unlock the chain. A widget (of a defined string length) could be used to quickly dial in an exact value, then a button widget could be used in conjunction to pass the value on to hardware.

Just an idea. If anyone knows a work around, please let me know.

Check this thread out, use terminal, modify for your code :slight_smile:

Or use a slider it should be able to handle 0-9999 range if I remember correctly

1 Like

That other code looks to be highly complex and is currently out of my league. I will try the slider though. Thanks for the help AGAIN!

1 Like

Add the slider, if you are on the same code which I helped you with
then its as easy as

BLYNK_WRITE(SliderVpin)
{
   multiplier[x] = param.asInt();
} 

Edit:
@myggle you should also virtualWrite on that pin when you change index

Edit 2:
Brain missfire, I meant virtualWrite of course. To present the current value

1 Like