A game for Lab 4 of ECE 4180
Dependencies: 4DGL-uLCD-SE LSM9DS1_Library SDFileSystem mbed-rtos mbed wave_player
InputHandler.h
- Committer:
- Dogstopper
- Date:
- 2016-03-10
- Revision:
- 2:623f29bad35c
- Parent:
- 0:6a49493943be
File content as of revision 2:623f29bad35c:
#ifndef _InputHandler_H_ #define _InputHandler_H_ #include "LSM9DS1.h" #include "mbed.h" #include "rtos.h" class InputHandler { public: InputHandler(PinName sda, PinName scl, uint8_t xgAddr, uint8_t mAddr, PinName dio); float getXAccel(); float getYAccel(); float getZAccel(); bool getPushed(); Thread* start(); private: static void threadStarter(void const *p); void retrieveInputs(); LSM9DS1 imu; DigitalIn pushButton; float xAccel; float yAccel; float zAccel; bool isPushed; Mutex stdio_mutex; }; #endif