Pages: 1 [2]   Go Down
Author Topic: programming maxbotix and ping sensor  (Read 1541 times)
0 Members and 1 Guest are viewing this topic.
Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49080
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
i am getting an issue that how should i arrange it so i can retrieve value from here and can pass commands to my motors?
Create a function, just like you did before (except with a better name). Return a value (inches) from that function, rather than using a global variable.

You have two incompatible sets of code that purport to read data from the sensor. Only one can possibly be correct. It is that code, whichever one it is, that is the basis for a robust application.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thank you so much i will work on the code on thursday and will show you then thank you so much for helping me
Logged

Pages: 1 [2]   Go Up
Jump to: