Veikko Soininen
/
SCA61T_example
SCA61T Example
Revision 0:da4b7bd0b350, committed 2011-02-24
- Comitter:
- Veino
- Date:
- Thu Feb 24 10:51:05 2011 +0000
- Child:
- 1:7ec2e17b7a96
- Commit message:
- v1.0
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SCA61T.lib Thu Feb 24 10:51:05 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/Veino/code/SCA61T/#663ebf72b607
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Feb 24 10:51:05 2011 +0000 @@ -0,0 +1,16 @@ +#include "mbed.h" +#include "SCA61T.h" + +SCA61T sca61t(p11,p12,p13,p21,0); // MOSI, MISO, SCLK, CBS, device selection + // 0=SCA61T-FAHH1G, 1=SCA61T-FA1H1G +Serial pc(USBTX, USBRX); + +int main(void) +{ + while(1) + { + pc.printf("%i [C]\r\n",sca61t.ReadTemp()); // Writes the temperature to serial port. + pc.printf("%.1f [deg]\r\n",sca61t.ReadX()); // Writes the angle to serial port. + wait(1); // Waits for one second and repeats. + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Feb 24 10:51:05 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912