Generates reference based on analog input

Dependents:   locomotion_pid_action_refactor_EMG

refGen.h

Committer:
tvlogman
Date:
2017-10-22
Revision:
4:38af2aa14a3f
Parent:
3:43d9f8db93b7
Child:
5:7186da6f562f

File content as of revision 4:38af2aa14a3f:

#ifndef REFGEN_H
#define REFGEN_H

#include "mbed.h"
#include "biquadChain.h"


class refGen {
public:
    refGen(PinName, float); // Constructor sets up the pin to read the reference from
    float getReference(); // Gets reference position on specified pin
    float getFilteredReference(biquadChain BQC); // Gets reference position and filters using filter specified as a biquadChain
    float maxAngle;
    bool r_direction;
    
private:
    AnalogIn refPin;
    };
#endif