PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Convert
libabvolts
abvoltsF.c
1
/*
2
* @file abvoltsF.c
3
*
4
* @author Andy Lindsay
5
*
6
* @copyright
7
* Copyright (C) Parallax, Inc. 2013. All Rights MIT Licensed.
8
*
9
* @brief Measure ADC124S021 voltage as a floating point value.
10
* @n @n <b><i>CONSTRUCTION ZONE:</i></b> This library is preliminary, major revisions
11
* pending, not for release.
12
*/
13
14
#include "
abvolts.h
"
15
16
float
ad_volts
(
int
channel)
17
{
18
return
((
float
)
ad_in
(channel)) * 5.0 / 4096.0;
19
}
20
ad_in
int ad_in(int channel)
Get input value that corresponds to voltage measurement on one of the A/D converter's input channels....
Definition:
abvolts.c:29
ad_volts
float ad_volts(int channel)
Get a voltmeter style floating point voltage measurement from one of the A/D converter's input channe...
Definition:
abvoltsF.c:16
abvolts.h
Functions for setting voltages with D/A0, D/A1 outputs and measuring voltages with A/D0....
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17