yutaro iijima / Mbed 2 deprecated FootileSoftware_20191218_experiment

Dependencies:   mbed FootileSoftware

Revision:
0:03cdee95fb5a
Child:
1:7fb4f7e80d92
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Footile.h	Wed May 30 02:34:33 2018 +0000
@@ -0,0 +1,71 @@
+/*
+    Taku Hachisu 06/01/2017
+
+    Footile demo for WHC2017
+*/
+
+#ifndef FOOTILE_H
+#define FOOTILE_H
+
+#include "mbed.h"
+#include "DRV2605.h"
+
+#include "wave.h"
+
+
+
+class Footile
+{
+
+public:
+    /**
+        Constructor for Footile Objects
+    */
+    Footile(PinName led1, PinName led2, PinName led3, PinName trg, PinName ad, PinName tx, PinName rx, PinName io1, PinName io2, PinName sda, PinName scl, PinName en);
+
+    /**
+        functions
+    */
+    void doFunctions(void);
+
+private:
+    DRV2605 _Vibration;
+    DigitalOut _led1;   // for debugging
+    DigitalOut _led2;   // for debugging
+    DigitalOut _led3;   // for debugging
+    DigitalOut _trg;
+    AnalogIn _prssr;
+    Serial _bt;
+    DigitalOut _btDummy1; // LPC11U24 does not support flow control
+    DigitalOut _btDummy2; // LPC11U24 does not support flow control
+    Ticker _heart;
+    Ticker _trans;
+    
+    Ticker _viber;
+    
+    int _volumeBuf;
+    float _sens;
+    char _buf[5];
+    int _countSize;
+    int _on;
+    
+    
+    bool ChangeFlag;
+    bool SteadyMode;
+    bool SinewaveMode;
+    bool CorrespondMode;
+    bool ConnectCheck;
+    bool snowMode;
+    bool grassMode;
+    
+    void _onReceive(void);
+    void _beat(void);
+    void _transmission(void);
+    unsigned short ctoi(char c);
+    void _modeChange(unsigned short c);
+    void VibeTimer();
+    void OnVibe(const float* wave, int size);
+    
+};
+
+#endif
\ No newline at end of file