Page MenuHomec4science

strain_gauge.h
No OneTemporary

File Metadata

Created
Sat, Jun 8, 19:16

strain_gauge.h

#ifndef __STRAIN_GAUGE_H
#define __STRAIN_GAUGE_H
#include "../main.h"
#include "adc.h"
/** @defgroup StrainGauge Driver / Strain gauge
* @brief Driver for a strain gauge.
*
* This driver uses an ADC input, ANIN1 or ANIN2 (see ADC).
* To use this, connect wire the sensor as this:
* * sensor + -> +5V (pin 1 or 5 of J2).
* * sensor - -> GND (pin 2 or 6 of J2).
* * sensor sense -> ANINX+ (pin 3 or 7 of J2).
* * 2.5V (with a voltage divider between 5V and GND) -> ANINX- (pin 4 or 8 of
* J2).
*
* Set the sensitivity switches to +-33mV.
*
* Call sg_Init() first in the initialization code. Then, call sg_Get() to
* get the force.
*
* @addtogroup StrainGauge
* @{
*/
void sg_Init(AdcChannel channel);
float32_t sg_Get(void);
/**
* @}
*/
#endif

Event Timeline