Professional Documents
Culture Documents
Robotika Arduino Serve
Robotika Arduino Serve
h>
#include <servo.h>
void setup()
Servo servo_1;
Servo servo_2;
Servo servo_3;
servo_1.attach();
servo_2.attach();
servo_3.attach();
int angle = 0;
Double ax;
Double ay;
Double az;
void loop()
servo_1.write(theta1(ay,ax));
delay(15);
servo_2.write(theta2(ax,ay,az));
delay(15);
}
for(angle = 0; angle < 180; angle += 1)
servo_3.write(angle);
delay(15);
If (y>=0) {
Return Derajat1deg;
If (y<0) {
Return Derajat1deg;
If (y>=0) {
If (y<0) {
Return Derajat2deg;