Hi, this is my program. I don't know what's the error.
#include <Servo.h>
int servoPin=3;
Servo Servo1;
int angle=0;
int potPin=A0;
int potValue;
int remainder;
const int redPin=9,greenPin=10,bluePin=11;
const int buzz=8;
void setup() {
// put your setup code here, to run once:
Servo1.attach(servoPin);
pinMode(potPin,INPUT);
pinMode(redPin,OUTPUT);
pinMode(greenPin,OUTPUT);
pinMode(bluePin,OUTPUT);
pinMode(buzz,OUTPUT);
Serial.begin(9600);
}
if you have a module that is not working, do not say "A GPS" or "the fingerprint sensor". Show us a link to the particular sensor, and a link to the datasheet if available
jeez26:
Hi, this is my program. I don't know what's the error.
Clearly "(potValue%5 == )" is wrong. There has to be a value between the '==' and ')'.
Clearly "buzz(tone, 250);" is wrong. Did you mean to use the 'tone' function? Like "tone(buzz, 250);"?
Clearly there should be another "}" at the end of the sketch.
Once those three syntax errors are fixed the sketch will compile without error.
Beyond that it's all a matter of what you want the sketch to do. The sketch only ever sets the servo to 30 degrees, only ever sets the LED to yellow, and only ever turns the buzzer on. That doesn't make much sense and without knowing what you WANT the sketch to do it's hard to say what parts you got right and what parts you got wrong.