Error below says that there is a missing semicolon in arduinos own code, and it has never thrown this error before.
In file included from C:\Users\20stu\AppData\Local\Temp\arduino\sketches\5C8C421AFF7F1C319E5D38FE89B21BE0\sketch\MarksmanFill.ino.cpp:1:0:
C:\Users\20stu\OneDrive\Documents\Arduino\MarksmanFill\MarksmanFill.ino: In function 'void setup()':
C:\Users\20stu\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/Arduino.h:113:16: error: expected ';' before '_UART1_'
#define Serial _UART1_
^
C:\Users\20stu\OneDrive\Documents\Arduino\MarksmanFill\MarksmanFill.ino:23:5: note: in expansion of macro 'Serial'
Serial.begin(115200);
^~~~~~
exit status 1
Compilation error: exit status 1
My code is attached below
#include <TFT_eSPI.h>
TFT_eSPI tft = TFT_eSPI();
const int buttonPin = 2;
int charges = 4;
int chargeprogress = 0;
int startx = 40;
int starty = 39;
int offsetx = 34;
int offsety = 34;
#include "dot.h"
#include "dotoutline.h"
; // it wont let me run the code without an error stating it needs a semicolon here, no idea why
void setup() {
pinMode(buttonPin, INPUT);
attachInterrupt(digitalPinToInterrupt(2), chargedecline, RISING)
Serial.begin(115200);
tft.begin();
// Swap the colour byte order when rendering
tft.setSwapBytes(true);
tft.setRotation(2);
tft.fillScreen(TFT_BLACK);
tft.pushImage(34, 34, dotWidth, dotHeight, dot);
tft.pushImage(34, 128, dotWidth, dotHeight, dot);
tft.pushImage(128, 34, dotWidth, dotHeight, dot);
tft.pushImage(128, 128, dotWidth, dotHeight, dot);
}
void chargedecline() {
if (charges >= 0) {
charges -= 1;
}
if (chargeprogress > 0) {
tft.fillRect(offsetx, offsety, 80, 80, TFT_BLACK);
}
if (charges > 2) {
offsetx = 34;
offsety = 34;
} else if (charges == 2) {
offsetx = 128;
offsety = 334;
} else if (charges == 1) {
offsetx = 34;
offsety = 128;
} else {
offsetx = 128;
offsety = 128;
}
}
void loop() {
// put your main code here, to run repeatedly:
if (charges < 4) {
tft.fillRect(offsetx, offsety, 80, 80, TFT_BLACK);
for (int i = 0; i < 79; i++) {
tft.drawLine(startx + offsetx, starty + offsety, dotoutline[i][0] + offsetx, dotoutline[i][1] + offsety, TFT_BLUE);
if (i == chargeprogress) {
chargeprogress += 1;
delay(12);
}
}
startx = 40;
starty = 40;
for (int i = 0; i < 79; i++) {
tft.drawLine(startx + offsetx, starty + offsety, dotoutline2[i][0] + offsetx, dotoutline2[i][1] + offsety, TFT_BLUE);
if (i + 79 == chargeprogress) {
chargeprogress += 1;
delay(12);
}
}
startx = 39;
starty = 40;
for (int i = 0; i < 79; i++) {
tft.drawLine(startx + offsetx, starty + offsety, dotoutline3[i][0] + offsetx, dotoutline3[i][1] + offsety, TFT_BLUE);
if (i + 158 == chargeprogress) {
chargeprogress += 1;
delay(12);
}
}
startx = 39;
starty = 39;
for (int i = 0; i < 79; i++) {
tft.drawLine(startx + offsetx, starty + offsety, dotoutline4[i][0] + offsetx, dotoutline4[i][1] + offsety, TFT_BLUE);
if (i + 237 == chargeprogress) {
chargeprogress += 1;
delay(12);
}
}
startx = 40;
starty = 39;
tft.pushImage(offsetx, offsety, dotWidth, dotHeight, dot);
}
}