mxbi / sourcebots

RGS Student Robotics Git
6 stars 0 forks source link

Rewrite ultrasound #3

Closed mxbi closed 6 years ago

mxbi commented 6 years ago

At the moment, the ultrasound command asks the arudino to measure distance in a loop three times, then takes the median on the Pi.

This can be sped up by taking the median directly on the Arduino and saving having to do very costly 3 I/O operations

totietje commented 6 years ago

How necessary is this though? Will the speed up really be that significant? In any case I feel this should be low priority.

Sent with GitHawk

mxbi commented 6 years ago

I don't have numbers, but if I had to guess, it's probably adding 150ms minimum onto the function call. We're talking a 3x slowdown @totietje

Remember it's 1ms for every single byte sent back or forth.

mxbi commented 6 years ago

This has been done yay. #6 still needs to be done though - importing standard libraries breaks the software on the arduino unfortunately.