Hi,
Here the problem is, pin is not declared. Basically, now I am using Arduino Nano, and the pins are not 12, 11, 10 but D12, D11, D10. I don’t know why those pins are not declared. Below is the picture of Arduino Nano.
#include <Servo.h>
Servo Side, Up, Down, Forward, WL, WR;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Side.attach(D12);
Up.attach(D11);
Down.attach(D10);
Forward.attach(D9);
WL.attach(D8);
WR.attach(D7);
}
Error Message:
Build options changed, rebuilding all
Receiver_Final.ino: In function 'void setup()':
Receiver_Final:17: error: 'D12' was not declared in this scope
Receiver_Final:18: error: 'D11' was not declared in this scope
Receiver_Final:19: error: 'D10' was not declared in this scope
Receiver_Final:20: error: 'D9' was not declared in this scope
Receiver_Final:21: error: 'D8' was not declared in this scope
Receiver_Final:22: error: 'D7' was not declared in this scope
'D12' was not declared in this scope