6 Software
User Manual 83/374
6.7 Temperature Sensor
Low Level Hardware Access
/sys/bus/spi/devices/spi32766.1/temp1_input
This user space interface reads
the current temperature of the
temperature sensor in degrees
celsius.
p1:
< 0..n > = Temperature in in
degrees celsius multiplied by
1000
Example: Read and calculate the temperature
1. Read out the temperature
# cat /sys/bus/spi/devices/spi32766.1/temp1_input
54750
2. Calculate the temperature in degrees celsius manually
54750 / 1000 = 54,750 °C
6.8 GPS
For GPS handling use the GPS daemon that handles the GPS interface automatically.
Precondition:
The GPS daemon must be started. The GPS daemon is not started during the boot up automatically.
How to activate the network daemon see GPS daemon (see "GPS daemon" on page 95)
Library functions for the GPS
ygpsd_get_gps_data (see
"ygpsd_get_gps_data" on page
229)
The TAF library function receives the data from the GPS module.
High Level Hardware Access
This shell script starts and stops the internal GPS receiver
connected via /proc/stw_gps/port. It is already started by
the boot up sequence.
p1: