Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HC_SR04_Ultrasonic_Library PinDetect
radar.h
00001 #ifndef _RADAR_H_ 00002 #define _RADAR_H_ 00003 // must import HC_SR04_Ultrasonic_Library 00004 // https://os.mbed.com/components/HC-SR04/ 00005 #include <ultrasonic.h> 00006 00007 /* Range enum */ 00008 enum { 00009 RANGE_NONE=0, 00010 RANGE_FAR, 00011 RANGE_MID, 00012 RANGE_CLOSE, 00013 RANGE_MAX 00014 }; 00015 00016 extern void radar(void); 00017 00018 00019 /* Globals */ 00020 // Global position variable 00021 extern int volatile position; 00022 //Set the trigger pin to PC_8 and the echo pin to PC_6 00023 //have updates every .1 seconds and a timeout after 1 00024 //second, and call dist when the distance changes 00025 extern ultrasonic mu; 00026 00027 extern DigitalOut led1; 00028 extern DigitalOut led2; 00029 extern DigitalOut led3; 00030 00031 #endif //_RADAR_H_
Generated on Mon Jul 25 2022 02:11:50 by
1.7.2