Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

proximity sensing

Status
Not open for further replies.

kfas

Student
Joined
Mar 25, 2021
Messages
2
Location
UG
I need help to convert the following derivative integration pseudocode for proximity sensing to a matlab program

X[i-1] = X[0]
I[i-1] = 0
Loop1:
D = X - X[i-1]
Is (ABS(D) greater than DT)?
true:
I = I[i-1] + D
else:
I = I[i-1]
Is (I H/d)
true:
Object detected
I[i-1] = I
else:
Object not detected
I[i-1] = I*L
 
What have you come up with so far? Where does it break?


Dan - Owner
Footwell%20Animation%20Tiny.gif
 
I did zero verification if the algorithm itself was of any use... I just expect to see some work on the part of the student before offering feedback. I didn't see that here, just a cut and paste from a datasheet. Not attempt to actually code it, or show errors in trying to run said code.

Dan - Owner
Footwell%20Animation%20Tiny.gif
 
It is obvious Texas Instruments used it in whatever machine they wanted.From their documentation they could have corrected whatever errors it has.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top