Can you help me with this part?
I want my servo angle be [ arctan(5t/8.255) ] based on the variable of t (seconds)
I've been trying to declare different variable and even downloaded a couple libraries, but it's not working and I'm having problems.
This is the base code that I keep trying to get to work:
#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include <Servo.h>
#include <math.h>
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
Servo servo1;
Servo servo2;
void setup() {
Serial.begin(9600);
Serial.println("wrist");
AFMS.begin();
servo1.attach(10);
servo2.attach(9);
servo1.write(180);
servo2.write(0);
}
void loop() {
{
servo1.write(double atan2 (double __y, double __x);
}}
}