this code is for inverted pendulum balancer. it is based on two-loop PID controller. One controller is for Angle and another one is for velocity.
Dependencies: HCSR04 L298HBridge mbed
Diff: distance/distance.h
- Revision:
- 0:489498e8dae5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/distance/distance.h Fri Aug 25 21:10:23 2017 +0000 @@ -0,0 +1,10 @@ +#include "mbed.h" +#include "hcsr04.h" + +extern HCSR04 usensor; +extern float home; +extern float offset; +extern float distance; + + +void get_distance(void); \ No newline at end of file