Robin2:
in preference toint myPwmVal = nnn;
- probably because I'm strange ...
I can appreciate the simplicity of your code what I want to eventually do is create a library so that all I will need to do is put
#include <MyWebInterface.h>
at the top of any sketch hook up a network cable and have complete access to the arduino's input and outputs in what ever state they may be in (input/output/digital/analog). My original question I was able to solve with the code I provided and it should with all current arduino boards and it could be simplified if it looks like too much for a single board. so yes you are correct that is what would work for any program just get the value at the time you send it to the PWM output. My origional question and post was to get it after some code some where set it. so i didn't have to worry if I have a good value or not it is what is there in one simple sweep.
Thank to all that comments and help.