Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repositioned Serial1 start to enable connection with Addon #20

Merged
merged 1 commit into from
May 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions FabiWare/FabiWare.ino
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ void initDebouncers();
////////////////////////////////////////

void setup() {
delay(1000);
//delay(1000);
Serial.begin(9600);
delay(1000);
//delay(1000);
//while (! Serial);

#ifdef DEBUG_OUTPUT
Expand All @@ -135,10 +135,12 @@ void setup() {
pinMode(LED_BUILTIN_RX, INPUT);
pinMode(LED_BUILTIN_TX, INPUT);


PCBversion = 1;
buzzerPIN = 4; //set buzzer Pin, define output and sound check buzzer:
memcpy(input_map, input_map_PCB, NUMBER_OF_PHYSICAL_BUTTONS + 1);

buzzerPIN = 4; //set buzzer Pin, define output and sound check buzzer:
Serial1.begin(9600); // start HW-Pin-Serial (used for communication with Addon)

initDisplay();
delay(100);
Expand All @@ -152,8 +154,6 @@ void setup() {




Serial1.begin(9600); // start HW-Pin-Serial (used for communication with Addon)
//while(!Serial1);

}
Expand Down Expand Up @@ -235,12 +235,22 @@ void loop() {
if (moveY == 0) moveYcnt = 0;
if ((moveX != 0) || (moveY != 0)) // movement induced by button actions
{

if (cnt2++ % 4 == 0)
{
{/*
Serial.print("x: ");
Serial.print(moveX);
Serial.print(" ");
Serial.print(moveXcnt);

Serial.print(" ");*/

if (moveX != 0) if (moveXcnt < MOUSE_ACCELDELAY) moveXcnt++;
if (moveY != 0) if (moveYcnt < MOUSE_ACCELDELAY) moveYcnt++;

//Serial.println(moveX * moveXcnt / MOUSE_ACCELDELAY);
mouseMove(moveX * moveXcnt / MOUSE_ACCELDELAY, moveY * moveYcnt / MOUSE_ACCELDELAY);
//Serial.print(moveY * moveYcnt / MOUSE_ACCELDELAY);
}
}

Expand Down