Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:a7cc807c718f, committed 2015-05-21
- Comitter:
- shaoziyang
- Date:
- Thu May 21 16:37:26 2015 +0000
- Commit message:
- First version. Modify from mbed tsi libary.
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TSI.lib Thu May 21 16:37:26 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/shaoziyang/code/TSI/#4b7c5856807e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu May 21 16:37:26 2015 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+#include "TSISensor.h"
+
+int main(void) {
+ PwmOut led1(LED_BLUE);
+ PwmOut led2(LED_GREEN);
+
+ TSISensor tsi;
+
+ led1.period_ms(1);
+ led2.period_ms(1);
+
+ while (true) {
+ printf("\r\n");
+ for(uint8_t i = 0; i < ELECTRODE_NUM; i++)
+ printf("%d:%d-%f ", tsi.Pressed(i), tsi.readTSI_u16(i),tsi.readTSI(i));
+
+ led1 = 1-tsi.readTSI(0);
+ led2 = 1-tsi.readTSI(1);
+
+ wait(0.1);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu May 21 16:37:26 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/dbbf35b96557 \ No newline at end of file