Skip to content

Commit

Permalink
fix loadcell
Browse files Browse the repository at this point in the history
  • Loading branch information
vospascal committed May 1, 2021
1 parent 5efd125 commit 2e0e464
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions PedalBox/Pedal.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ class Pedal
HX711 _loadCell;
int _loadcell_gain = 128;
int _loadcell_tare_reps = 10;
int _loadcell_max_val = 2000000;
int _loadcell_scaling = 1100;
long _loadcell_max_val = 2000000;
long _loadcell_scaling = 1000;
int _loadcell_sensitivity = 64; //Medium = 64, High = 128;

ADS1115 _ads1015;
Expand Down
24 changes: 12 additions & 12 deletions PedalBox/PedalBox.ino
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ void setup() {
// initialize serial communication at 115200 bits per second:
Serial.begin(115200);
pedals.setThrottleBits("10bit", "10bit");
// pedals.setThrottleAnalogPin(A0);
//pedals.setThrottleADSChannel(1);
pedals.setThrottleLoadcell(6,5);
//
pedals.setThrottleAnalogPin(A0);
// pedals.setThrottleADSChannel(1);
// pedals.setThrottleLoadcell(6,5);

pedals.setBrakeBits("10bit", "10bit");
// pedals.setBrakeAnalogPin(A3);
//pedals.setBrakeADSChannel(1);
pedals.setBrakeLoadcell(7,5);
//
pedals.setBrakeAnalogPin(A3);
// pedals.setBrakeADSChannel(1);
// pedals.setBrakeLoadcell(7,5);

pedals.setClutchBits("10bit", "10bit");
// pedals.setClutchAnalogPin(A1);
//pedals.setClutchADSChannel(1);
pedals.setClutchLoadcell(8,5);
//
pedals.setClutchAnalogPin(A1);
// pedals.setClutchADSChannel(1);
// pedals.setClutchLoadcell(8,5);

pedals.setup();

// delay(2000);
Expand Down

0 comments on commit 2e0e464

Please sign in to comment.