code help.
jay117
Posts: 5
I am reading a pot for a configuration menu. Is there an easier way to spread out numbers over a pots range, as opposed using lookdown, lookup?
I have a number of lines of code like this, all with different lookups, it starting to cram my bs2e..
need to stream line, any ideas?..
min and max commands on a variable from rctime, will not do..
ty
I have a number of lines of code like this, all with different lookups, it starting to cram my bs2e..
need to stream line, any ideas?..
min and max commands on a variable from rctime, will not do..
LOOKDOWN time, <= [3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90, 93,96,99,112,115,118,121,124,127,130,133,136,139,142,145,148,151,154,157,160,163,166,169,172,175,178,181,187,190,194], idx LOOKUP idx, [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29, 30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59], value
ty
Comments
i want to spread out the 0-59 across the full range of the pot. if i read the rctime, and apply min 0 and max 59 to the value returned, it ends up only using 1/3 of the pots full range.
this particular example is part of a function to set minutes to a clock in a setup menu, using a pot to determine the value, and a button to set it..