On arduino I flashed with:
- NodeMCU 1.0 (ESP12-E Module)
- CPU Frequency: 80Mh (or even 160Mhz)
- Flash Size: 4M (1M SPIFF)
The display hast RST connected to 3v3 and I'm using CS to pin 16 and DC to pin 2
I have used this sketch, it dinamically change rotation as well:
/*
This sketch shows how to use other fonts
and some new text commands
*/
#include <SPI.h>
#include <TFT_ILI9163C.h>
#include "_fonts/unborn_small.c"
/*
fonts are inside _fonts folder and should be declared here
notice that default font it's arial x2.c and it's always loaded!
You can use only fonts prepared to be used with sumotoy libraries
that uses LPGO Text rendering like:
https://github.com/sumotoy/TFT_ILI9163C/tree/Pre-Release-1.0r4
https://github.com/sumotoy/RA8875/tree/0.70b11
https://github.com/sumotoy/OLED_pictivaWide
*/
#if !defined(_ILI9163_NEWFONTRENDER)
#error "you have to enable new LPGO rendering engine inside settings!"
#endif
#define __CS 16 //(D0)
#define __DC 2 //(D1)
TFT_ILI9163C tft = TFT_ILI9163C(__CS, __DC);//we dont use rst, tie reset pin to 3v3
void setup() {
Serial.begin(115200);
Serial.print("\nstarted\n");
tft.begin();
/*
after this command the library has already set several
things as default:
tft.clearScreen();//screen cleared with black
tft.setRotation(0);//no rotation
tft.setTextScale(1);//no scale
tft.setCursor(0,0);
tft.setTextWrap(true);//text will wrap to a new line automatically
tft.setTextColor(WHITE,WHITE);//background transparent
//default internal font loaded arial_x2
This allow you to start writing immediately without
need to set anything.
*/
}
uint8_t rot = 0;
void loop() {
tft.clearScreen();
tft.setRotation(rot);
tft.setFontInterline(0);
tft.setCharSpacing(0);
tft.setTextScale(1);
tft.setTextColor(WHITE);
tft.setFont(&unborn_small);//this will load the font
tft.println("Hello world!");//this will add a new line as well
tft.setTextScale(3);//now multiply x 3 the scale
tft.println("Hello world!");//the wrap on will split words in 2 lines
tft.setInternalFont();//now switch to internal font
tft.setTextScale(2);//smaller
tft.setFontInterline(2);//this will be active after the println!
tft.setTextColor(random(0x6000,0xFFFF));
tft.println("Hello world!");
tft.setCharSpacing(1);//add an extra pixel between chars
tft.setTextColor(random(0x6000,0xFFFF), random(0x1010,0x9090)); //set a background inside font
tft.println("Hello world!");
delay(1000);
if (rot >= 3) {
rot = 0;
} else {
rot++;
}
}
The error it's really generic to me, but googling the 2 errors bring me only to firmware issues (and some inconsistency power issues that I don't trust).
Here's what I can suggest you, it's not library related but helped me in many situations.
1) Are you using the same pin I'm using?
2) If you are using IDE 1.66, switch back to 1.65.
3) Maybe you updated to rc2 recently from an old version? If yes, I strongly suggest remove completely ESP8266 (if you are on windows, remove also ESP8266 folder inside AppData/Roaming/Arduino15/packages/esp8266), close IDE, reopen it and reinstall ESP8266 staging, then close and reopen.