I'm working on a data acquisition and graphing app for my greenhouse.
In order to not rewrite virtually identical code a huge bunch of times or getting into a zillion nested if...thens while processing the data I'm gathering and generating the graphs, I need to do a thing idk what to call, but an example is pretty easy: (apologies for bad pseudo code)
var PPM_DB = TinyDB1;
var PH_DB = TinyDB2;
var Temp_DB = TinyDB3;
var Amount_DB = TinyDB4;
var list = [PPM_DB, PH_DB,_Temp_DB,Amount_DB];
function Example(int val);
var Current_List = list[val];
Is there a way to do this? Not only with TinyDB, but with most other "programming blocks?"