You are viewing an older revision! See the latest version

SCA61T

SCA61T is a single axis inclinometer, accessible via a digital SPI.

Hello World!

Import program

00001 #include "mbed.h"
00002 #include "SCA61T.h"
00003 
00004 SCA61T sca61t(p11,p12,p13,p21,0);                   // MOSI, MISO, SCLK, CSB, device selection
00005                                                     // 0=SCA61T-FAHH1G, 1=SCA61T-FA1H1G 
00006 Serial pc(USBTX, USBRX);
00007 
00008 int main(void)
00009 {
00010     while(1)
00011     {
00012         pc.printf("%i [C]\r\n",sca61t.ReadTemp());  // Writes the temperature to serial port.
00013         pc.printf("%.1f [deg]\r\n",sca61t.ReadX()); // Writes the angle to serial port.
00014         wait(1);                                    // Waits for one second and repeats.
00015     }
00016 }
SCA61T Signal Namembed pin
SCKp13
MISOp12
MOSIp11
GNDGND
CSBp21
STNC
OutNC
VDDVU

Library

Import library

Public Member Functions

float ReadX ()
Reads the angle.
int8_t ReadTemp ()
Reads the temperature.
void MeasMode ()
Sets the sensor to measurement mode.
uint8_t ReadStatus ()
Reads the status register.
void ReloadNV ()
Reloads NV.
void SelfTest ()
Sets the sensor to self test mode.

Reference


All wikipages