Control multiple Servos over Wi-Fi

I have an Arduino Uno Wi-Fi rev 2. I have connected it to Wi-Fi. I want to be able to control a servo with the arrow keys on my computer. I want to have it that when i hit the up arrow the servo moves up until I let it go. and the same for the down arrow. thanks

That’s a good start, now you need to decide whether you want to write your own code from scratch, start learning, or pay someone to get you tuning.

This is my code so far (I have just removed the ssid and password for obvious reasons):

#include <Servo.h>
#include <SPI.h>
#include <WiFiNINA.h>

char ssid[] = "";
char pass[] = "";
int keyIndex = 0;

int status = WL_IDLE_STATUS;
WiFiServer server(80);

void setup() {
Serial.begin(9600);

while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to Network named: ");
Serial.println(ssid);
status = WiFi.begin(ssid, pass);
delay(10000);

server.begin();

Serial.print("SSID: ");
Serial.println(WiFi.SSID());
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);

}
Servo Elevator;
Servo Right_Aileron;
Servo Left_Aileron;
Servo Right_Flap;
Servo Left_Flap;

Elevator.attach(1);
Right_Aileron.attach(2);
Left_Aileron.attach(3);
Right_Flap.attach(4);
Left_Flap.attach(5);
}

void loop()
{

}

Please use code tags. Else parts of the code show up as smileys.

Sorry, I am new to the forum. Is this better?

#include <Servo.h>
#include <SPI.h>
#include <WiFiNINA.h>

char ssid[] = "";
char pass[] = "";
int keyIndex = 0;

int status = WL_IDLE_STATUS;
WiFiServer server(80);


void setup() {
    Serial.begin(9600);

  while (status != WL_CONNECTED) {
    Serial.print("Attempting to connect to Network named: ");
    Serial.println(ssid);
    status = WiFi.begin(ssid, pass);
    delay(10000);
 
    server.begin();

    Serial.print("SSID: ");
    Serial.println(WiFi.SSID());
    IPAddress ip = WiFi.localIP();
    Serial.print("IP Address: ");
    Serial.println(ip);

}
Servo Elevator;
Servo Right_Aileron;
Servo Left_Aileron;
Servo Right_Flap;
Servo Left_Flap;

Elevator.attach(1);
Right_Aileron.attach(2);
Left_Aileron.attach(3);
Right_Flap.attach(4);
Left_Flap.attach(5);
}

void loop() 
{
 
}

So, how does it go?
Does it compile ok?
If that’s all good, start on reading the inputs, check that’s working, then move on to the servo control.

Remember Serial.print can help a lot while you’re debugging.

It compiles ok and I am able to move the servos when I add in a line like servo.write etc. I want to do something like this but instead of the sliders I want it to be the arrow keys.

https://create.arduino.cc/projecthub/igorF2/wi-servo-wi-fi-browser-controlled-servomotors-66176e

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.