Go Down

Topic: More than one OR statement? (Read 352 times) previous topic - next topic

How do I add more than one OR statement?

I currently have;
Code: [Select]
if(dT > 0.2 || dT < -0.2) {


how do I add another OR statement to it?

I want to add x=360

UKHeliBob

Code: [Select]
if(dT > 0.2 || dT < -0.2 || x = 360)
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

JimboZA

Bzzzzzzzzzzt... shouldn't that be x == 360?
"Could you do the egg bacon spam and sausage without the spam then? "

No PMs for help please.
DO NOT power servos from Arduino 5V: give them their own power and connect the grounds.

Ah thats where I was going wrong.  I too was only using one '=' not two

Thanks for your help  :)

UKHeliBob

BONG !

Yes, of course it should.  In my defence he did say that he wanted x=360 and that is what he got !
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Go Up