'Ui' was not declared in this scope

What value do you want Ui to contain, particularly as it is never used in the sketch ?

Do you perhaps have in mind to declare U as an array and then to store values in it indexed by the value of i ?

2 Likes