Arduino Exit Status 1 Error?

Hello,

I have to keep this brief because we're in the computer lab. We're working on the Arduino in NWT, and my friend is having a problem. With this code:

int p;

int h;

void setup() {

pinMode(9,INPUT_PULLUP);

pinMode(10,INPUT_PULLUP);

}

void loop() {

p=digitalRead(9);

h=digitalRead(10);

if(p=0){tone(9,82);

if(h=0){tone(10,659);

}

}

}

When using this code, he always gets an Exit Status 1 error. Strangely, the exact same code works perfectly for me. Can you help me?

Thank you very much. Regards

(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
1 Answer
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Ginpanse
1 year ago

the clips are set wrong.

if (p=0) {
tone(9,82);

}

if (h=0) {
tone(10, 659);

}