adafruit / Adafruit_RA8875

Adafruit Arduino library driver for the RA8875 TFT driver
http://www.adafruit.com/products/1590
Other
68 stars 58 forks source link

println does not work as expected. #4

Closed RobDrizzle closed 10 years ago

RobDrizzle commented 10 years ago

println does not carriage return but rather prints garbage characters.

Sample code:

include

include "Adafruit_GFX.h"

include "Adafruit_RA8875.h"

// Connect SCLK to UNO Digital #13 (Hardware SPI clock) // Connect MISO to UNO Digital #12 (Hardware SPI MISO) // Connect MOSI to UNO Digital #11 (Hardware SPI MOSI)

define RA8875_INT 3

define RA8875_CS 10

define RA8875_RESET 9

Adafruit_RA8875 tft = Adafruit_RA8875(RA8875_CS, RA8875_RESET); uint16_t tx, ty;

void setup() { Serial.begin(9600); Serial.println("RA8875 start");

/* Initialise the display using 'RA8875_480x272' or 'RA8875_800x480' */ if (!tft.begin(RA8875_800x480)) { Serial.println("RA8875 Not Found!"); while (1); }

tft.displayOn(true); tft.GPIOX(true); // Enable TFT - display enable tied to GPIOX tft.PWM1config(true, RA8875_PWM_CLK_DIV1024); // PWM output for backlight tft.PWM1out(255); tft.fillScreen(RA8875_BLACK);

tft.textMode();

tft.textSetCursor(10, 10);

tft.textColor(RA8875_WHITE, RA8875_BLACK); tft.print("Testing Print, "); tft.print("All your base are belongs to us");

tft.textSetCursor(10, 30); tft.println("Testing Println"); tft.println("All your base are belongs to us"); }

void loop() { }

ladyada commented 10 years ago

println() is not supported at this time, use print() and set the cursor again as desired