Skip to content

Commit

Permalink
Clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
evisvasiu committed Jun 24, 2023
1 parent ffbdc76 commit 17bec30
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions esp32-modbus-wifi-manager.ino
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,16 @@ void setup() {
//PWM, 10kHz, 12bit. only high speed channel
ledcSetup(pwmchannels[i], 10000, 12);
ledcAttachPin(i, pwmchannels[i]);
}
}
}

for (int i = 0; i<40; i++){

/*
Register offsets:
Write Coils: 0
Discrete Inputs : 100
Holding registers : 200
Input registers : 300
*/

mb.addCoil(i);
mb.addIsts(100+i);
mb.addHreg(200+i);
Expand All @@ -86,10 +83,6 @@ void setup() {
if (pinconfig[i] < 5 ){
//33333 is the initial value. (Assigned for debugging)
pinvalues[i] = 33333;

if (pinconfig[i] == 1 || pinconfig[i]== 3 || pinconfig[i] == 4){
pinctrlvalues[i] = 33333;
}
}

else {
Expand All @@ -98,7 +91,7 @@ void setup() {
pinctrlvalues[i] = 22222;
}
}

ts = millis();
}

Expand Down

0 comments on commit 17bec30

Please sign in to comment.