Contiki-NG

Driver for the Sensortag Opt3001 light sensor. More...

#include "contiki.h"
#include "lib/sensors.h"
#include "opt-3001-sensor.h"
#include "sys/ctimer.h"
#include "ti-lib.h"
#include "board-i2c.h"
#include "sensor-common.h"
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <stdio.h>
#include <math.h>

Go to the source code of this file.

Functions

static void select_on_bus (void)
 Select the sensor on the I2C bus.
 
static void enable_sensor (bool enable)
 Turn the sensor on/off. More...
 
static bool read_data (uint16_t *raw_data)
 Read the result register. More...
 
static float convert (uint16_t raw_data)
 Convert raw data to a value in lux. More...
 
static int value (int type)
 Returns a reading from the sensor. More...
 
static int configure (int type, int enable)
 Configuration function for the OPT3001 sensor. More...
 
static int status (int type)
 Returns the status of the sensor. More...
 

Detailed Description

Driver for the Sensortag Opt3001 light sensor.

Definition in file opt-3001-sensor.c.