the fish that looks like a jet
Dependencies: ADXL345 ADXL345_I2C IMUfilter ITG3200 mbed Servo
motor_controller.h@13:5ed8fd870723, 2014-02-03 (annotated)
- Committer:
- rkk
- Date:
- Mon Feb 03 21:04:35 2014 +0000
- Revision:
- 13:5ed8fd870723
- Parent:
- 12:7eeb29892625
change control approach to have bang bang and impulse length defining
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sandwich | 0:ff9bc5f69c57 | 1 | #pragma once |
sandwich | 0:ff9bc5f69c57 | 2 | #include "mbed.h" |
rkk | 11:8ec915eb70f6 | 3 | |
rkk | 6:a4d6f3e4bf28 | 4 | #define FREQ_MIN 0.5 //Hz |
sandwich | 7:e005cfaff8d1 | 5 | #define FREQ_MAX 3 //Hz |
sandwich | 7:e005cfaff8d1 | 6 | |
sandwich | 7:e005cfaff8d1 | 7 | float sigm(float input); |
sandwich | 0:ff9bc5f69c57 | 8 | |
sandwich | 0:ff9bc5f69c57 | 9 | class PololuMController |
sandwich | 0:ff9bc5f69c57 | 10 | { |
sandwich | 0:ff9bc5f69c57 | 11 | private: |
rkk | 11:8ec915eb70f6 | 12 | PwmOut pwm; |
rkk | 11:8ec915eb70f6 | 13 | DigitalOut outA; |
rkk | 11:8ec915eb70f6 | 14 | DigitalOut outB; |
rkk | 11:8ec915eb70f6 | 15 | |
rkk | 8:0574a5db1fc4 | 16 | |
sandwich | 0:ff9bc5f69c57 | 17 | public: |
sandwich | 0:ff9bc5f69c57 | 18 | PololuMController(); |
sandwich | 0:ff9bc5f69c57 | 19 | PololuMController(PinName pwmport, PinName A, PinName B); |
sandwich | 0:ff9bc5f69c57 | 20 | void setpolarspeed(float speed); //-1 to 1 |
sandwich | 0:ff9bc5f69c57 | 21 | }; |