I am trying to control a servo with an Arduino by using WiFi (using the Arduino Uno R4 WiFi). I have tested this code (below) with an Arduino Mega 2560 and it has proven to work as expected. However, when using the same code with the Uno R4, and with the same connections, the servo does not respond at all.
I think declaring servoPin = 6 makes it D6 in an UNO. No idea what pin it makes on a Mega. Maybe that's the reason, pin 6 on the Mega is different from an UNO.
The Servo library on the R4 is not ready for prime time just yet.
I tried out the sweep example on an R4 and while it did run, it was not the smooth back and forth that you'd see on an Uno or Mega. About every second it jerked about 10 degrees, which is in line with the issue raised against the library above. Your values of 90 and 100 are probably just within the same "step" interval that the R4 Servo implementation suffers from.
Yes, upon reading more I see that the physical pin should be irrelevant in the Arduino IDE. I think your code is correct, but did you change the board type before uploading?
Yes. The board and com port were both verified before uploading the code. I am leaning toward the possibility that the Servo library just isn't compatible with the R4 as @van_der_decken pointed out.