From 8f2e0fbd4755c4f038edb3729a0a32f0ebd93208 Mon Sep 17 00:00:00 2001 From: JbLb Date: Fri, 7 Feb 2020 23:06:45 +0100 Subject: [PATCH] remove serial print debug --- test_f103.ino | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/test_f103.ino b/test_f103.ino index 7128ddf..e3b6605 100644 --- a/test_f103.ino +++ b/test_f103.ino @@ -72,13 +72,6 @@ void setup() display.clearDisplay(); display.drawBitmap((SCREEN_WIDTH - my_splash_width) / 2, (SCREEN_HEIGHT - my_splash_height) / 2, my_splash_data, my_splash_width, my_splash_height, 1); - - /* - display.setTextSize(1); // Draw 1X-scale text - display.setTextColor(SSD1306_WHITE); - display.setCursor(int((display.width() - (strlen("g")*6))), 50); - display.println("g"); - */ display.display(); Serial.begin(115200); @@ -121,20 +114,14 @@ void Nunchuk_control() if (!nchuk.update()) { - Serial.println("Controller Disconnected!"); nchuk.reconnect(); } else { - cmd1 = map(nchuk.joyX(), 0, 256, 150, -150); // x - axis. Nunchuck joystick readings range 30 - 230 + cmd1 = map(nchuk.joyX(), 0, 256, 150, -150); // x - axis. Nunchuck joystick readings range 150 -150 cmd2 = map(nchuk.joyY(), 0, 256, -150, 150); // y - axis - /* - Serial.print("X : "); - Serial.print(nchuk.joyX()); - Serial.print(" Y : "); - Serial.println(nchuk.joyY()); -*/ + Send(cmd1, cmd2); } display.setCursor(0, 40); @@ -149,7 +136,7 @@ void Nunchuk_control() display.setCursor(0, 50); display.setTextSize(1); // Draw 1X-scale text display.setTextColor(SSD1306_WHITE); - display.print("y : "); + display.print("Y : "); old_cursorX = display.getCursorX(); old_cursorY = display.getCursorY(); display.fillRect(old_cursorX, old_cursorY, (6 * 5), 8, SSD1306_BLACK); // erase previous display @@ -170,5 +157,5 @@ void loop() // if (iTimeSend > timeNow) return; iTimeSend = timeNow + TIME_SEND; Nunchuk_control(); - Serial.println(timeNow); + // Serial.println(timeNow); }