Hello there... new to the forums. Hello all!. I'm new to arduino and C programming. I'm familiar with programming in assembly language and was wondering if i could get a little assistance in a particular function i want to accomplish. Im using a distance sensor and want to compare readings from two different directions and have it decide which direction has a greater distance. In assembly i could store data and do a mathematical comparison to decide. Haven't been able to figure out how in C.
Idea:
Distance 1 Data Read
Distance 2 Data Read
Distance 1 - Distance 2 = X
X>0 ; Do something
X<0; Do something else
Thanks in Advanced ![]()