wheelchair code for driver assitance

Dependencies:   mbed

Fork of wheelchairalexa by ryan lin

wheelchair.cpp

Committer:
ryanlin97
Date:
2018-07-12
Revision:
1:c0beadca1617
Parent:
0:fc0c4a184482
Child:
3:a5e71bfdb492

File content as of revision 1:c0beadca1617:

#include "wheelchair.h"

Wheelchair::Wheelchair(PinName xPin, PinName yPin)
{
    x = new AnalogOut(xPin);
    y = new AnalogOut(yPin);
}

void Wheelchair::move(float degrees)
{
}

void Wheelchair::forward()
{
    x->write(high);
    y->write(def);
}

void Wheelchair::backward()
{
    x->write(low);
    y->write(def);
}

void Wheelchair::right()
{
    x->write(def);
    y->write(high);
}

void Wheelchair::left()
{
    x->write(def);
    y->write(low);
}

void Wheelchair::stop()
{
    x->write(def);
    y->write(def);
}