Contains the main execution of the clock uses headers to import functions
Dependencies: RTC-DS1307 SPI_TFT_ILI9341 TFT_fonts mbed tsi_sensor
Fork of TFT_Mikroelectronika_IL9341_sketchpad by
slider.h
- Committer:
- mlin
- Date:
- 2017-05-25
- Revision:
- 31:3255668e6b08
- Parent:
- 11:1da15361a35b
File content as of revision 31:3255668e6b08:
#include "tsi_sensor.h" #if defined (TARGET_KL25Z) || defined (TARGET_KL46Z) #define ELEC0 9 #define ELEC1 10 #elif defined (TARGET_KL05Z) #define ELEC0 9 #define ELEC1 8 #else #error TARGET NOT DEFINED #endif float tsi_current, tsi_last = 0; TSIAnalogSlider tsi(PTB16, PTB17, 40); float tsi_d() { //wait(0.5); tsi_current = tsi.readPercentage(); float delta = 0; if (tsi_current != 0 && tsi_last != 0) delta = tsi_current - tsi_last; else delta = 0; tsi_last = tsi_current; pc.printf("%f\n\r",tsi_current); return delta; }