[Solved] I can’t see a mistake in my Arduino code. [closed]


On line 4 it says
#define PinOut1
try adding a space to make it
#define PinOut 1

EDIT:
There were also a few other things I noticed after this post so I compiled a fixed version of your code:

#include <Servo.h>
#define trigPin 13
#define echoPin 12
#define PinOut1 11
Servo myservo; 
int AnalogIn=A0;
int buttonState = 0;
int integer1 = 3;
float floating1 = PI;
String string1 = "words and numbers123";
int array1[5] = {100, 200, 300, 400, 500};


int PinIn1 = 2;
int PinOut = 11;
int button = 0;


void setup() {
  pinMode(PinOut, OUTPUT);
  pinMode(PinIn1, INPUT);
  Serial.begin(9600);
  myservo.attach(9);
}
void loop() {
Conditional1();
}

void Conditional1() {
   button = digitalRead(PinIn1);

  if (buttonState == HIGH) {
digitalWrite(PinOut1, HIGH);
    myservo.write(60);

  } else{
    digitalWrite(PinOut1, LOW);
    myservo.write(0);

  }
}

2

solved I can’t see a mistake in my Arduino code. [closed]