Pages: [1]   Go Down
Author Topic: Project 10 off book Zoetrope  (Read 4157 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have made the programming like in the book but I get an error

void loop() {
  onOffSwitchState = digitalRead(onOffSwitchStateSwitchPin);
  delay(1);
  directionSwitchState = digitalRead(directionSwitchPin);
  motorSpeed = analogRead(potPin)/4;


  if(onOffSwitchState ! = previousOnOffSwitchState) {  // error: expected ')' before '!" token
this is the error place   

 if(onOffSwitchState == HIGH) {
      motorEnabled = !motorEnabled;

I have programmed it like in the book, so I think I make a mistake but I don't know what the mistake is.

Thank you for helping me.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Dear All,

I found the problem.

It's not ! =
but !=

Logged

Pages: [1]   Go Up
Jump to: