
musisz ew sam pokombinować SPI masz tam gdzie napisałem w 1 poście
pinout jest prawidłowy , ale może coś nie teges libs albo coś przeoczyłem w ustawieniach
niestety nie mam jak sprawdzić

Dodano po 51 minutach 11 sekundach:
Tu masz zawartość pliku main ....
- #include "stdio.h"
- #include "stdlib.h"
- #include "math.h"
- #include "mbed.h"
- #include "ST7735B_TFT.h"
- #include "Consolas10.h"
- #include "Consolas12.h"
- #include "Prototype20x25_T.h"
- ST7735_TFT TFT(PTD2, PTD3, PTD1, PTA13, PTD0, PTD5,"TFT"); // mosi, miso, sclk, cs, rs, reset
- //Serial pc(USBTX, USBRX); // tx, rx
- int main() {
- TFT.set_orientation( 3 );
- TFT.claim(stdout); // send stdout to the TFT display
- //TFT.claim(stderr); // send stderr to the TFT display
- TFT.background(Black); // set background to black
- TFT.foreground(White); // set chars to white
- TFT.cls();
- TFT.locate(0,0);
- TFT.set_font((unsigned char*) Consolas7x13); // select the font
- wait(1);
- while(1){
- wait(3);
- TFT.cls();
- TFT.set_font((unsigned char*) Consolas7x13); // select the font
- TFT.locate(0,0);
- for(int i=0;i<4;i++){
- TFT.foreground(White);TFT.printf("Demo demo Demo\n\r");
- TFT.foreground(Green);TFT.printf("Demo demo Demo\n\r");
- }
- wait(3);
- TFT.cls();
- int dx=0,dy=0;
- for(int i=0;i<60;i+=2){
- dx=i;dy=i;
- TFT.rect(dx,dy,160-dx,128-dy,Cyan);
- }
- wait(3);
- TFT.cls();
- TFT.set_font( (unsigned char*)Prototype20x25 );
- TFT.locate(0,0);
- TFT.foreground(Yellow);
- TFT.printf("01234567");
- TFT.printf("12345678");
- TFT.printf("23456789");
- TFT.printf("34567890");
- TFT.printf("45678901");
- wait(3);
- TFT.cls();
- }
- }