code clean up

master
JbLb 6 years ago
parent ebb87fc624
commit 45d989464d

@ -87,7 +87,7 @@ Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
void setup()
{
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64)
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3C (for the 128x64)
// Clear the buffer
display.clearDisplay();
display.display();
@ -97,11 +97,6 @@ void setup()
Serial1.begin(HOVER_SERIAL_BAUD); // RX, TX from arduino to TX RX on hoverboard board. ! be carreful 3v3
pinMode(LED_BUILTIN, OUTPUT);
pinMode (2,INPUT_PULLUP); // pin 2 to GNd to start
while (digitalRead(2))
{
/* code */
}
Serial.begin(SERIAL_BAUD);
if (Serial) {
Serial.println("Hoverboard Serial v1.0");
@ -196,11 +191,6 @@ void loop(void)
// Check for new received data
Receive();
// Send commands
if (iTimeSend > timeNow) return;
iTimeSend = timeNow + TIME_SEND;
Send(0, abs(iTest));
// Calculate test command signal
iTest += 10;
if (iTest > iTestMax) iTest = -iTestMax;

Loading…
Cancel
Save