slow down i2c because it didn't work at 1MHz ATMega

This commit is contained in:
2020-03-19 12:46:54 +03:00
parent c48567645d
commit 5a9496e222
2 changed files with 3 additions and 1 deletions

View File

@@ -21,6 +21,7 @@
void setup() { void setup() {
Serial.begin(115200); Serial.begin(115200);
Wire.begin(12, 13); Wire.begin(12, 13);
Wire.setClock(10000);
power.enable12v(); power.enable12v();
configManager.load(); configManager.load();
wifiManager.init(); wifiManager.init();

View File

@@ -112,10 +112,11 @@ void execCommand(Command cmd) {
} }
void setup() { void setup() {
Serial.begin(115200); Serial.begin(9600);
Wire.begin(8); Wire.begin(8);
Wire.onReceive(receiveEvent); Wire.onReceive(receiveEvent);
Wire.onRequest(requestEvent); Wire.onRequest(requestEvent);
Wire.setClock(10000);
Serial.println("Hello!"); Serial.println("Hello!");
eggStepperRPM = servoStepperRPM = curRPM; eggStepperRPM = servoStepperRPM = curRPM;
pinMode(A0, OUTPUT); pinMode(A0, OUTPUT);