From 81dae99c3b560dd2988e2e496540b888e3671199 Mon Sep 17 00:00:00 2001 From: ClemensGruber <36139413+ClemensGruber@users.noreply.github.com> Date: Tue, 12 Feb 2019 15:05:05 +0100 Subject: [PATCH] Update HX711ESP8266.ino move pin definition out of constructor, fix comment in ESP8266 example --- examples/HX711ESP8266/HX711ESP8266.ino | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/HX711ESP8266/HX711ESP8266.ino b/examples/HX711ESP8266/HX711ESP8266.ino index 3d2022b..a564aa2 100644 --- a/examples/HX711ESP8266/HX711ESP8266.ino +++ b/examples/HX711ESP8266/HX711ESP8266.ino @@ -1,14 +1,14 @@ #include "HX711.h" -// HX711.DOUT - pin #D2 -// HX711.PD_SCK - pin #D3 +// HX711.DOUT - pin #2 +// HX711.PD_SCK - pin #3 -HX711 scale(D2, D3); // parameter "gain" is ommited; the default value 128 is used by the library +HX711 scale; // parameter "gain" is ommited; the default value 128 is used by the library void setup() { Serial.begin(38400); // usually the begin method is called by the class builder but in case of esp8266 must be called explicitly in the setup - scale.begin(D2,D3); //esp specific statment + scale.begin(2,3); //esp specific statment Serial.println("HX711 Demo"); Serial.println("Before setting up the scale:"); @@ -55,4 +55,4 @@ void loop() { scale.power_down(); // put the ADC in sleep mode delay(5000); scale.power_up(); -} \ No newline at end of file +}