Hata Kodu:
Arduino:1.8.19 (Windows 10), Kart:"Arduino Uno"
Arduino:1.8.19 (Windows 10), Kart:"Arduino Uno"
Kod:
C:\Users\Oneri\Desktop\sketch_jan13a\sketch_jan13a\sketch_jan14a\sketch_jan14a\sketch_jan14a\sketch_jan14a\sketch_jan14a\sketch_jan14a.ino: In function 'void loop()':
sketch_jan14a:18:32: error: too few arguments to function 'long int map(long int, long int, long int, long int, long int)'
derece = map(deger, 0,1023,180);
^
In file included from sketch\sketch_jan14a.ino.cpp:1:0:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:254:6: note: declared here
long map(long, long, long, long, long);
^~~
exit status 1
too few arguments to function 'long int map(long int, long int, long int, long int, long int)'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Yazdığım Kod:
#include <Servo.h>
Servo motor;
int deger;
int derece;
void setup() {
motor.attach(3);
}
void loop() {
deger = analogRead(A0);
derece = map(deger, 0,1023,180);
motor.write(derece);
}
Son düzenleyen: Moderatör: