#include <Servo.h>
#include <SoftwareSerial.h>
Servo SERVO
void setup() {
Serial.begin(9600);
pinMode(11, OUTPUT);
}
{
void loop() {
if(Serial.available()){
char data=Serial.read();
Serial.println(data);
if (data==‘T’){
SERVO.write(170);
pinMode(11,HIGH);
}
else if (data==‘F’){
SERVO.write(90);
pinMode(11, LOW);
}
}
}
Here is your code Auto Formatted and in code tags when posted here
#include <Servo.h>
#include <SoftwareSerial.h>
Servo SERVO
void setup()
{
Serial.begin(9600);
pinMode(11, OUTPUT);
}
{
void loop()
{
if (Serial.available())
{
char data = Serial.read();
Serial.println(data);
if (data == 'T')
{
SERVO.write(170);
pinMode(11, HIGH);
}
else if (data == 'F')
{
SERVO.write(90);
pinMode(11, LOW);
}
}
}
There are several things wrong with it such as missing semicolons at the end of a line and spurious curly braces.