This code is for Ultrasonic HCSR04 with FRDM-KL25Z
Dependencies: mbed HC_SR04_Ultrasonic_Library
Diff: main.cpp
- Revision:
- 3:5fb712f78508
- Parent:
- 2:3566c2d1e86b
--- a/main.cpp Tue Sep 13 18:16:42 2016 +0000 +++ b/main.cpp Tue Sep 03 12:28:35 2019 +0000 @@ -7,7 +7,7 @@ printf("Distance %d mm\r\n", distance); } -ultrasonic mu(p6, p7, .1, 1, &dist); //Set the trigger pin to D8 and the echo pin to D9 +ultrasonic mu(PTC, PTC, .1, 1, &dist); //Set the trigger pin to D8 and the echo pin to D9 //have updates every .1 seconds and a timeout after 1 //second, and call dist when the distance changes