mirror of
https://github.com/usatiuk/EggbotWireless.git
synced 2025-10-26 08:47:49 +01:00
[AVR] initialize pen before everything else
This commit is contained in:
@@ -113,6 +113,8 @@ void execCommand(Command cmd) {
|
|||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
|
servoStepper.setPos(xLimit);
|
||||||
|
pen.init();
|
||||||
Wire.begin(8);
|
Wire.begin(8);
|
||||||
Wire.onReceive(receiveEvent);
|
Wire.onReceive(receiveEvent);
|
||||||
Wire.onRequest(requestEvent);
|
Wire.onRequest(requestEvent);
|
||||||
@@ -124,8 +126,6 @@ void setup() {
|
|||||||
OCR2A = 250;
|
OCR2A = 250;
|
||||||
TCCR2A |= (1 << WGM20) | (1 << CS22);
|
TCCR2A |= (1 << WGM20) | (1 << CS22);
|
||||||
TIMSK2 |= (1 << OCIE2A);
|
TIMSK2 |= (1 << OCIE2A);
|
||||||
servoStepper.setPos(xLimit);
|
|
||||||
pen.init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
volatile unsigned int tick = 0;
|
volatile unsigned int tick = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user