Go Down

Topic: Project 10 off book Zoetrope (Read 4927 times) previous topic - next topic


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

void loop() {
  onOffSwitchState = digitalRead(onOffSwitchStateSwitchPin);
  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.


Dear All,

I found the problem.

It's not ! =
but !=

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131