![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
This project will enable remote control of a motorised turntable via a WiFi enabled TCP link using ACKme's (http://ack.me/) Wi-Fi enablement platform
Diff: TurntableControl.h
- Revision:
- 2:a73037a7d85d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TurntableControl.h Wed Aug 27 12:28:48 2014 +0000 @@ -0,0 +1,24 @@ +#pragma once + +#include "mbed.h" + +class TurntableControl +{ +private: + int encoderMax; // Calibrated maximum value for the encoder + int encoderCurrent; // Keeps track of the current position of the turn table + DigitalIn encoder; + DigitalIn limitSW; + DigitalOut ttdriver; +public: + TurntableControl(); + TurntableControl(PinName, PinName, PinName); + void initialise(); + int calibrate(); // synchronises and calibrates MCU to turntable + void incrementTurntable(int); // increments value i, used as an interrupt target + void reset(); + int getEncoderCurrent(); + int getEncoderMax(); + int getEncoder(); + void quarterTurns(int); +}; \ No newline at end of file