Skip to content

Commit

Permalink
Fixed a couple comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoric committed May 29, 2023
1 parent 3c8fec8 commit 51a274d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
12 changes: 5 additions & 7 deletions examples/deepSleep/deepSleep.ino
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
* GND------------------------->GND (Make sure to connect both GND's!)
* DAT------------------------->PIN_DAT, set by user
* SCK------------------------->PIN_SCK, set by user
*
*
* HX711 load-cell amplifier Load-cell
* (E+)------------------------>RED
* (E-)------------------------>BLACK
* (A-)------------------------>GREEN
* (A+)------------------------>WHITE
*
*
*/

// Create the HX711 object on the right pins
Expand All @@ -53,28 +53,26 @@ void setup()

// Wait a bit until it initializes fully
delay(200);


}

void loop()
{
// Wake up the HX711 in deep sleep
// Wake up the HX711 from deep sleep
hx711.setDeepSleep(false);

// Wait a bit until it initializes fully
delay(200);

// Make raw reading and store in variable
long reading = hx711.getRawReading();

// Print the reading
Serial.print("HX711 Reading: ");
Serial.println(reading);

// Place the HX711 in deep sleep
hx711.setDeepSleep(true);

// Wait a long while until the next reading
delay(15000);
}
2 changes: 1 addition & 1 deletion examples/easyCExample/easyCExample.ino
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* Connecting diagram:
*
* HX711 load-cell amplifier Dasduino
* HX711 load-cell amplifier Dasduino
* EasyC----------------------->EasyC
*
* HX711 load-cell amplifier Load-cell
Expand Down
4 changes: 1 addition & 3 deletions examples/readInUnits/readInUnits.ino
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ void setup()

void loop()
{
// Make raw reading of the calibrated sensor and store in variable
// Note that this is not the same function as getRawReading()
// The applied offset is the calibration
// Make reading in units
double readingInUnits = hx711.getReadingInUnits();

// You may also call getReadingInUnits(n) for the result to be an average of n readings
Expand Down
3 changes: 3 additions & 0 deletions extras/attiny_firmware/attiny_firmware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ void receiveEvent(int howMany)

uint8_t c = Wire.read();

// In this function, we recieve a single byte which sets the gain of the amplifier

switch(c)
{
case SET_GAIN_32:
Expand All @@ -84,6 +86,7 @@ void receiveEvent(int howMany)

void requestEvent()
{
// In this function, sensor data is sent as a deconstructed long
byte bytes[4];

bytes[0] = (sensorData >> 24) & 0xFF;
Expand Down

0 comments on commit 51a274d

Please sign in to comment.