Device driver interface for the MQ-3 alcohol sensor. More...

Detailed Description

#include "periph/adc.h"
+ Include dependency graph for mq3.h:

Go to the source code of this file.

Data Structures

struct  mq3_t
 device descriptor for a MQ-3 sensor More...


#define MQ3_MAX_RAW_VALUE   (1023U)
 maximum unprocessed value fetched form the sensor


int mq3_init (mq3_t *dev, adc_t adc_line)
 Initialize a MQ-3 alcohol sensor. More...
int mq3_read_raw (const mq3_t *dev)
 Read the RAW sensor value, can be between 0 and MQ3_MAX_RAW_VALUE. More...
int mq3_read (const mq3_t *dev)
 Read the scaled sensor value of PPM of alcohol. More...