I have a sketch that I am using to learn the screen positions for a GPS Logger.
I want to learn how to place characters in specific positions on the screen.
This is running on an Arduino Nano and SSD1306 display SPI.
It seems to be ignoring the setcursor and place characters based on println instead.
The display should look like this
AAA BBB CCC
1 2 3
Then is should wait 2 seconds then over write the " 1 2 3"
with " 4 5 3"
The display should look like this
AAA BBB CCC
4 5 6
Any help is greatly appreciated
Ā
Code is below
-------------------
#include "SSD1306Ascii.h"
#include "SSD1306AsciiSpi.h"
#define CS_PIN Ā 10
#define RST_PIN 9
#define DC_PIN Ā 8
#include <SoftwareSerial.h>
SSD1306AsciiSpi oled;
#define OLED_RESET 9
void setup() {
Ā Ā Serial.begin(9600);
Ā Ā Ā oled.begin(&Adafruit128x64, CS_PIN, DC_PIN, RST_PIN);
Ā Ā Ā oled.setFont(System5x7);
Ā Ā Ā oled.print("TESTING");
Ā Ā Ā delay(2000);
Ā Ā Ā oled.clear();
}
void loop() { Ā
Ā Ā Ā oled.setCursor(0 , 0);
Ā Ā Ā oled.print("AAA ");
Ā Ā Ā oled.print("BBB Ā ");
Ā Ā Ā oled.println("CCC Ā ");
Ā Ā Ā
Ā Ā Ā oled.setCursor(10 , 30);
Ā Ā Ā oled.print("1");
Ā Ā Ā oled.setCursor(50 , 30);
Ā Ā Ā oled.print("2");
Ā Ā Ā oled.setCursor(100 , 30);
Ā Ā Ā oled.println("3");
Ā Ā Ā delay(2000);
Ā Ā Ā
Ā Ā Ā oled.setCursor(10 , 50);
Ā Ā Ā oled.print("4");
Ā Ā Ā oled.setCursor(50 , 50);
Ā Ā Ā oled.print("5");
Ā Ā Ā oled.setCursor(100 , 50);
Ā Ā Ā oled.println("6");
Ā Ā Ā
Ā Ā Ā delay(2000);
Ā Ā Ā }