Re: Controls for a project

Robin2:
I find myself in a difficult position here.

I have already suggested an approach which IMHO would be simpler and clearer, and probably shorter.

However you are under absolutely no obligation to take any notice of my suggestions and I won't be offended if you don't. But (without intending any offense) I am not going to produce a second set of advice because you don't like the first one.

If there is something about my suggested approach that you don't understand let me know and I will try to explain.

One of the things that I think is sub-optimal in your code is that there is repetition in each of your functions BUC() JIB() etc. Unnecessarily repeating code leaves you open to two risks. First, you may change one function and forget to change another. Second you may need to change something that the functions depend on and then you need to update all of the functions.

...R

i appologize Robin2. i asked for help and i went my own way. first time programming. got a little excited. how do i separate the code you suggested to read 4 pots then move the servos accordingly without having a function for each servo/pot.