I am not a programmer. I am trying to control ten (10) LED's and a 4 x 20 i2c LCD display in seventeen (17) different variations. I have ~ 375 lines of Python code with comments. I have inserted several prints statements and breaks to debug the code.
I can pass two string variables (Rules and Aspects) to the display in a for loop sixteen times. I have created and tested functions to turn the ten LED's on, off, and flash with PWM. In this for loop I would like to call a function with a variable. I am using "text" in the for loop with "Rules" and "Aspects" from lists successfully. So I would like to call LEDs1() through LEDs16() by item in range (1, 16) calling LEDs{item}(). I am calling LEDs(0) separately as a LED test. I have lately tried to create nested functions. Again I am not a programmer and know enough to be dangerous. I guess I need to be pointed in a direction that will work. Thank you, Doug.