Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 19528

GPIO Speed - in ARDUINO IDE

$
0
0

We were trying to use a HC-SR04 proximity sensor with the galileo board to measure in centimeters and inches the distance between the sensor and an object.

 

We realized that GPIO digitalRead() function was too slow to capture the echo pulse when the object was too close (< 20cm)

 

So, that sparked me to create some ARDUINO code to try to measure how many microseconds it does take to do read operations.

 

https://github.com/janunezc/GALILEO/tree/master/demo_measure_timings

 

So far it is reporting >2ms (>2000 microseconds)  to do DigitalRead and >8ms (8000 microseconds) to do AnalogRead...


Viewing all articles
Browse latest Browse all 19528

Trending Articles