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

Committer:
dudu941014
Date:
2017-08-25
Revision:
0:489498e8dae5

File content as of revision 0:489498e8dae5:

#include "mbed.h"
#include "hcsr04.h"

extern HCSR04 usensor;
extern float home;
extern float offset;
extern float distance;


void get_distance(void);