![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Demo application for librairie HX711 Cr300-Litho
Dependencies: HX711 TextLCD mbed
main.cpp
- Committer:
- BB50
- Date:
- 2015-06-12
- Revision:
- 0:c4eaea48d411
File content as of revision 0:c4eaea48d411:
#include "mbed.h" #include "TextLCD.h" //Librairie Ecran text #include "HX711.h" //Librairie HX711 en dévellopement TextLCD lcd(D2, D3, D4, D5, D6, D7, TextLCD::LCD20x4); // Déclaration TextLCD. HX711 scale(A1,A0,64); //(pinData, pinSCK, gain [128|32|64]) DigitalIn mybutton(USER_BUTTON);//Boutton int main() { int weight; while(1) { if (!mybutton) scale.tare(); weight = scale.getGram(); lcd.cls(); lcd.locate(0,0); lcd.printf("Value = %i g", weight); } }