Go Down

Topic: Arduino beginner (Read 2 times) previous topic - next topic


i was trying to define a variable called obstacle which have a number range between 0 and 50,
to be more clear with you i wanted to say that if eg sensor1 read a value between 0 and 50 then that is an obstacle.

so i was thinking that creating defining an obstacle using this constrain and equating to the sensor was gona work but apparently it doesnt,

could anyone give me a more easier way to do this, please as if I've spent the last 5 hours trying to figure how to debug this problem and now im frustrated, i would really appreciate your help


Try spending time finding out how C works instead of why it doesn't fit your ideas of how it works.

Your PC has an FPU, Arduino does not. Don't use floating point unless you really need to.

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Go Up