Fraise  2.1
FRAmework for Interfacing Software and Electronics
hx711.h
Go to the documentation of this file.
1 /*********************************************************************
2  *
3  * Load Cell Amplifier HX711 library for Fraise pic18f device.
4  * thanks to https://github.com/bogde/HX711 arduino library.
5  *
6  *********************************************************************
7  * Author Date Comment
8  *********************************************************************
9  * Antoine Rousseau sept 2016 Original.
10  ********************************************************************/
11 
12 /*
13 # This program is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU General Public License
15 # as published by the Free Software Foundation; either version 2
16 # of the License, or (at your option) any later version.
17 #
18 # This program is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
22 
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
26 # MA 02110-1301, USA.
27 */
28 #ifndef _HX711_H_
29 #define _HX711_H_
30 
46 #include <fruit.h>
47 
48 #ifndef HX711_SCK_PIN
49 #error you must define HX711_SCK_PIN before calling hx711.h
50 #endif
51 #ifndef HX711_DATA_PIN
52 #error you must define HX711_DATA_PIN before calling hx711.h
53 #endif
54 
64 // The following parameters can be overloaded:
65 
67 
69 
76 void hx711Init(unsigned char gainA);
78 
82 void hx711Service();
83 
84 
85 
93 long hx711Read(unsigned char channel);
95 
99 #endif // _HX711_H_
100 
hx711Service
void hx711Service()
Module service routine, to be called by the main loop().
hx711Init
void hx711Init(unsigned char gainA)
Init the module in setup()
fruit.h
hx711Read
long hx711Read(unsigned char channel)
Read last measure of a channel.