Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F62244481
hall.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, May 11, 21:51
Size
762 B
Mime Type
text/x-c
Expires
Mon, May 13, 21:51 (2 d)
Engine
blob
Format
Raw Data
Handle
17623998
Attached To
R2671 HHRI-software
hall.h
View Options
#ifndef __HALL_H
#define __HALL_H
#include "../main.h"
#include "adc.h"
/** @defgroup Hall Driver / Hall sensor
* @brief Driver for a Hall-effect angular sensor.
*
* This driver uses an ADC input, ANIN1 or ANIN2 (see ADC).
* To use this, connect wire the sensor as this:
* * hall red -> +5V (pin 1 or 5 of J2).
* * hall yellow -> GND (pin 2 or 6 of J2).
* * hall blue -> ANINX+ (pin 3 or 7 of J2).
* * GND (pin 2 or 6 of J2) -> ANINX- (pin 4 or 8 of J2).
*
* Set the sensitivity switches to +-10V.
*
* Call hall_Init() first in the initialization code. Then, call hall_Get() to
* get the angle of the paddle.
*
* @addtogroup Hall
* @{
*/
void
hall_Init
(
AdcChannel
channel
);
float32_t
hall_Get
(
void
);
/**
* @}
*/
#endif
Event Timeline
Log In to Comment