I’m looking for an effective method to enter multiple variables. I’m sure I’m not the first who is asking this question but I don’t know the proper keywords so I’m not finding much.
I need to control switching frequency and pulse duration of a LED string. The frequency is changing in 100 to 10000 Hz range. In 100 to 1000 Hz range the frequency is changing with 100Hz step and in 1000 to 10,000 Hz range with 1000Hz step. I’d like to be able to set at least 10 different values for the pulse width. I’m using Attiny.
The only method that I’m familiar with is using multiple buttons on one pin so in theory I can do it with buttons but it is just not practical.
Just look at how electronic devices in your house allow you to enter data and select the one you like best. Arduinos can have all kind of input interfaces:
Mechanical e.g. buttons, potentiometers, touch, rotary encoders, mouse wheels, ...
sending data over serial using Serial Monitor
sending data from computers, phones and tablets using Bluetooth
WiFi access point with a web page you can control from your phone
When you figured out what you like best we can point you to examples and tutorials to get you started.
As I'm using Attiny so non of the methods would work for me except mechanical but adding 30 buttons does not really make much sense. I was thinking about one button going up, one button going down and one button switching between frequency and pulse and other parameters if I need to add some. I suppose this can be only implemented with the screen. Rotary encoder sounds intriguing if I'm getting it right.
I almost forgot, if you want a keyboard for typing numbers and little hardware on your Arduino you can use an infrared remote control. I am not sure how much flash memory you have. I guess this option would need some space for a library that decodes the IR signal.
I like to use Attiny 85 because it is very small and more importantly needs very little current so I can power it up with single LM but I can use Atmega as long as I can get nc pulse out of it or I can use it as a master. At this point it is only one LED string but later I will probably add some pulsed LDs , each controlled by its own controller so IR keyboard may be a right solution for me.