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
distance/distance.h@0:489498e8dae5, 2017-08-25 (annotated)
- Committer:
- dudu941014
- Date:
- Fri Aug 25 21:10:23 2017 +0000
- Revision:
- 0:489498e8dae5
this code is for inverted pendulum balancer. it is based on two-loop PID controller. one PID controller is for angle and another one is for velocity.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dudu941014 | 0:489498e8dae5 | 1 | #include "mbed.h" |
dudu941014 | 0:489498e8dae5 | 2 | #include "hcsr04.h" |
dudu941014 | 0:489498e8dae5 | 3 | |
dudu941014 | 0:489498e8dae5 | 4 | extern HCSR04 usensor; |
dudu941014 | 0:489498e8dae5 | 5 | extern float home; |
dudu941014 | 0:489498e8dae5 | 6 | extern float offset; |
dudu941014 | 0:489498e8dae5 | 7 | extern float distance; |
dudu941014 | 0:489498e8dae5 | 8 | |
dudu941014 | 0:489498e8dae5 | 9 | |
dudu941014 | 0:489498e8dae5 | 10 | void get_distance(void); |