st7735 160 на 128 подсветка барахлит

andycat
andycat аватар
Offline
Зарегистрирован: 07.09.2017

Фантазии человека безграничны!

andriano
andriano аватар
Offline
Зарегистрирован: 20.06.2015

lilik пишет:

Отвлёкся я на скорость вывода картинки от вариаций раскрашивания. Пока в голову пришло три варианта - сектора цвета, градиент цвета и пиксель-ассорти. Какие ещё варианты могут быть?

 

Для начала - любые варианты, в которых цвет не жестко зависит от координат пикселя, а определяется самим изображением. Например, зависит от расстояния до границы. Либо каждый изолированный фрагмент заливается своим цветом. Еще цвет может зависеть от времени.

 

PS. Но, прежде, чем рассуждать, хотелось бы понять, зачем это все может понадобиться?

lilik
Offline
Зарегистрирован: 19.10.2017

andycat пишет:
Фантазии человека безграничны!

:)

А возможности нет.

lilik
Offline
Зарегистрирован: 19.10.2017

andriano пишет:

... Либо каждый изолированный фрагмент заливается своим цветом.

...Еще цвет может зависеть от времени.

... хотелось бы понять, зачем это все может понадобиться?

 ...Это самый интересный и трудно реализуемый вариант раскраски.

...Был бы интересен при анимации, но перерисовка экрана медленная даже при   tft.setAddrWindow(0,0,128,160); и ... if(...) { tft.pushColor(tft.Color565(255,255,255) );}else { tft.pushColor(tft.Color565(0,0,0) );}

...Для полноценного использования экрана с про мини и уно.

 

andriano
andriano аватар
Offline
Зарегистрирован: 20.06.2015

lilik пишет:

andriano пишет:

... Либо каждый изолированный фрагмент заливается своим цветом.

...Еще цвет может зависеть от времени.

... хотелось бы понять, зачем это все может понадобиться?

 ...Это самый интересный и трудно реализуемый вариант раскраски.

Реализуется просто до безобразия, только для этого нужно иметь возможность читать цвет, что при последовательном интерфейсе, как правило, не поддерживается.

Цитата:

...Был бы интересен при анимации, но перерисовка экрана медленная даже при   tft.setAddrWindow(0,0,128,160); и ... if(...) { tft.pushColor(tft.Color565(255,255,255) );}else { tft.pushColor(tft.Color565(0,0,0) );}

При таком подходе перерисовка в принципе не может быть быстрой.

Цитата:

...Для полноценного использования экрана с про мини и уно.

 

Полноценное использование экрана - это как?

Экран должен выполнять свои функции в пределах поставленной задачи. Все. Какое еще может быть полноценное использование?

 

PS. Ну и позволю себе еще раз вернуться к вопросу скорости отрисовки.

1. То, что подход, проиллюстрированный в ответе на п.2 не может быть быстрым по определению, я уже сказал.

2. То, что на мой взгляд, следовало бы сначала научиться быстро работать с экраном и только потом начинать извращаться, я тоже писал ранее.

3. Для ускорения вывода имеет смысл перейти с последовательного интерфейса на параллельный. 

ua6em
ua6em аватар
Offline
Зарегистрирован: 17.08.2016

lilik пишет:

andycat пишет:
Фантазии человека безграничны!

:)

А возможности нет.

как говорил один богатый человек - "Вы даже представить себе не можете, что можно сделать имея миллиард долларов"

lilik
Offline
Зарегистрирован: 19.10.2017

[quote=andriano]

Реализуется просто до безобразия, только для этого нужно иметь возможность читать цвет, что при последовательном интерфейсе, как правило, не поддерживается.

[quote]

Мне кажется достаточно уметь находить в массиве данных картинки границы локаций 0 или 1. Как чтение цвета пикселя экрана это реализует? Впрочем тема где то тут на форуме была про чтение из экрана 18 бит данных на пиксель и дальнейшее использование, но до библиотеки дело не дошло :)

В рамках имеющегося модуля-экрана параллельный интерфейс не пройдёт.

Поставленная задача..., например, мимика-моська робота в цвете на про мини 168.

 

 

andriano
andriano аватар
Offline
Зарегистрирован: 20.06.2015

lilik пишет:

Мне кажется достаточно уметь находить в массиве данных картинки границы локаций 0 или 1. Как чтение цвета пикселя экрана это реализует?

В исходном массиве у нас двух цветное изображение. Ну нашли мы границу, откуда нам знать, в какой цвет красить по одну сторону, и в какой - по другую?

Т.е. когда мы на экране добавляем третий цвет, то эта информация уже может использоваться для дальнейшей раскраски. А в исходном двухцветном изображении этой информации еще нет.

Цитата:

Поставленная задача..., например, мимика-моська робота в цвете на про мини 168.

Нет такой задачи.

Задача может быть: построить прибор с определенными техническими характеристиками. А "робота в цвете" - это не задача. И "на про мини" - это тоже не задача.

lilik
Offline
Зарегистрирован: 19.10.2017

andriano пишет:

В исходном массиве у нас двух цветное изображение. Ну нашли мы границу, откуда нам знать, в какой цвет красить по одну сторону, и в какой - по другую?

 

Нет такой задачи.

Задача может быть: построить прибор с определенными техническими характеристиками. А "робота в цвете" - это не задача. И "на про мини" - это тоже не задача.

Одну локацию в один цвет, соседнюю в другой.

Т.е. создать поделку с заданными св-вами на заданных модулях это не задача? Вот незадача :)

andriano
andriano аватар
Offline
Зарегистрирован: 20.06.2015

lilik пишет:

Т.е. создать поделку с заданными св-вами на заданных модулях это не задача? Вот незадача :)

Вообще-то - нет.

"создать поделку с заданными св-вами" - это задача. А "на заданных модулях" - это лишь пожелание.

lilik
Offline
Зарегистрирован: 19.10.2017

andycat пишет:

lilik пишет:

Тогда SPI.transfer(&lineBuf, dispW); останется и должна заработать?, а  в tft.setAddrWindow(0, j, dispW-1, j); убрать хвост tft.

никаких хвостов убирать не надо
по хорошему добавить в библиотеку Адафрута новую функцию которая выводит не пиксель, я именно строку.

Завтра может время найду поставлю эти библиотеки. посмотрю.

Не дождался, извратил-исправил код (не знаю сдвиги-преобразования битов в байтах) до рабочего, и действительно так быстрее чем у меня (нос Эйнштейна просматривается чётко в попе у  Шерон Стоун). Но как теперь делить два байта цвета на части?

//РИСУНОК
#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library

#include <SPI.h>

#define TFT_CS     10
#define TFT_RST    9
#define TFT_DC     8

Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS,  TFT_DC, TFT_RST);

extern const unsigned char ris_1[];
extern const unsigned char ris_2[];

#define dispW 128
#define dispH 160

unsigned char  lineBuf[dispW*2 ];

void setup() {
  // put your setup code here, to run once:
  // Используйте этот инициализатор, если вы используете 1,8-дюймовый TFT
  tft.initR(INITR_BLACKTAB);   // initialize a ST7735S chip, black tab
  tft.fillScreen(ST7735_BLACK);
  tft.setRotation(0);//ориентация экрана

}

void loop() {
  // put your main code here, to run repeatedly:
  drawBitmap_(ris_1,128);
  drawBitmap_(ris_2,128);
}

void drawBitmap_(const uint8_t *bitmap,int16_t w) {
  int16_t i, j, byteWidth = (w + 7) / 8;
  uint8_t byte;
  for (unsigned short j = 0; j < dispH; j++) {
    for (unsigned short i = 0; i < dispW; ++i) {
       if(i & 7) byte <<= 1;
      else      byte   = pgm_read_byte(bitmap + j * byteWidth + i / 8);
     if(byte & 0x80)
     {
          lineBuf[i*2 ] =0xFF ; lineBuf[i * 2 + 1] = 0xFF; // white color
        } else {
          lineBuf[i*2 ] =0x00 ; lineBuf[i * 2 + 1] = 0x00; // black color
        }
    }
    
    tft.setAddrWindow(0, j, dispW-1, j);
    ///
    SPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
    digitalWrite(TFT_DC, HIGH);
    digitalWrite(TFT_CS, LOW);
    SPI.transfer(&lineBuf, 2*dispW);
    digitalWrite(TFT_CS, HIGH);
    SPI.endTransaction();
    ///
  }
  
}
//////////////////////////////////////////////////////////////////////////////////////

 Мой вариант

// РИСУНОК
#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>
#define TFT_CS     10
#define TFT_RST    9  
#define TFT_DC     8
 Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS,  TFT_DC, TFT_RST);
extern const unsigned char ris_1[];
extern const unsigned char ris_2[];

void setup(void) {
  // Используйте этот инициализатор, если вы используете 1,8-дюймовый TFT
 tft.initR(INITR_BLACKTAB);   // initialize a ST7735S chip, black tab
 tft.fillScreen(ST7735_BLACK);
 tft.setRotation(0);//ориентация экрана
 }
void loop() {
 drawBitmap_(0,0,ris_1,128,160,tft.Color565(255,255,255),tft.Color565(0,0,0));
 drawBitmap_(0,0,ris_2,128,160,tft.Color565(255,255,255),tft.Color565(150,150,50));
 }
/////////////////////////////////////////////////////////////////////
void drawBitmap_(int x,int y, const uint8_t *bitmap,int w,int h,const uint16_t color_1,const uint16_t color_2) {
 if(x<0||x+w>128||y<0||y+h>160){return;} 
 tft.setAddrWindow(x,y,x+w-1,y+h-1);
 int16_t i, j, byteWidth = (w + 7) / 8;
  uint8_t byte;
 for(j=0; j<h; j++) {
    for(i=0; i<w; i++) {
      if(i & 7) byte <<= 1;
      else      byte   = pgm_read_byte(bitmap + j * byteWidth + i / 8);
      if(byte & 0x80)
      {
    tft.pushColor(color_1 ); 
      }
     else {
    tft.pushColor(color_2 );
     }
    }
  }
}
///////////////////////////////////////////////////////////////////// 

Эйнштейн и Стоун

#include <avr/pgmspace.h>

const unsigned char ris_1[]PROGMEM = {
0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X05,0XB5,0X40,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X01,0X00,0X00,0X00,0X5A,0X40,0X94,0XA0,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X02,0X14,0X40,0X02,0XA8,0X08,0X55,0X0E,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X08,0X40,0X01,0X14,0XB1,0X03,0X08,0XA1,0XA4,0X80,0X00,0X00,0X00,
0X00,0X00,0X00,0X80,0X00,0X04,0X02,0XC0,0X2C,0X52,0X00,0XC0,0X08,0X00,0X00,0X00,
0X04,0X88,0X44,0X14,0X01,0X20,0X10,0XAA,0XB2,0XAB,0XAA,0X28,0X00,0X88,0X80,0X00,
0X10,0X01,0X00,0X00,0X08,0X00,0X0B,0XC0,0X55,0X54,0X90,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X10,0X40,0X04,0X42,0X93,0X54,0X82,0X26,0X12,0X40,0X00,0X01,0X00,
0X80,0X00,0X00,0X41,0X01,0X11,0X0B,0X45,0XA9,0X51,0X01,0X41,0X02,0X00,0X00,0X00,
0X00,0X08,0X24,0X00,0X04,0X00,0X45,0X4A,0XA2,0X0E,0XD4,0X80,0X08,0X00,0X00,0X00,
0X00,0X40,0X80,0X14,0X20,0XA1,0X55,0X76,0XB5,0XBB,0XFA,0X08,0X80,0X08,0X00,0X00,
0X04,0X00,0X00,0X80,0X81,0X08,0X96,0XAD,0X56,0XFF,0XAF,0XC0,0X20,0X20,0X00,0X00,
0X40,0X02,0X08,0X04,0X14,0XA2,0X55,0X5A,0XAD,0XF4,0X48,0X32,0X00,0X00,0X00,0X00,
0X00,0X10,0X01,0X12,0X8A,0X89,0X57,0X6A,0X5B,0XAF,0XB5,0X5C,0X24,0X00,0X00,0X00,
0X00,0X80,0X20,0X00,0X20,0X6A,0X57,0X5B,0X6F,0X5A,0XEA,0XA5,0X00,0X00,0X00,0X00,
0X04,0X00,0X84,0X94,0X0A,0X95,0X5A,0XEA,0XBA,0XFF,0XAD,0X52,0XC8,0X40,0X04,0X00,
0X80,0X04,0X00,0X01,0X55,0X55,0XB7,0X55,0XAD,0X4B,0XD5,0X55,0X41,0X00,0X00,0X00,
0X00,0X10,0X02,0X48,0X0A,0XBA,0XDB,0XBA,0XD6,0XBE,0XED,0X54,0X54,0X00,0X00,0X00,
0X10,0X40,0X90,0X02,0XB7,0XED,0X6D,0X6D,0X7A,0XAB,0X5F,0XAB,0X20,0X00,0X00,0X00,
0X01,0X00,0X02,0XA8,0X4A,0XBB,0X77,0XD7,0XAA,0XAA,0XEA,0XE9,0X49,0X00,0X00,0X00,
0X80,0X02,0X20,0X02,0XAD,0XF5,0XAD,0X7D,0XFF,0X5A,0XBF,0X7D,0X34,0X20,0X00,0X00,
0X04,0X00,0X09,0X14,0X2B,0XDE,0XDF,0XD6,0XB5,0XEB,0X55,0XAB,0X8E,0X80,0X00,0X00,
0X10,0X10,0X84,0X42,0XAF,0X77,0X7B,0X7F,0XEF,0X5D,0X55,0X74,0XF3,0X00,0X00,0X00,
0X40,0X00,0X21,0X11,0X55,0XDB,0XEF,0XFB,0X7D,0XEB,0XB5,0X5E,0X8D,0XA2,0X00,0X00,
0X00,0X44,0X04,0X4A,0X5B,0XBE,0XBD,0XDF,0XF7,0X7D,0X6A,0XA3,0X56,0X40,0X00,0X00,
0X00,0X00,0X81,0X24,0XAE,0XEB,0XF7,0XFF,0XDF,0XD7,0XD6,0XBD,0XD1,0X50,0X00,0X00,
0X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0X00,0X00,0X00,
0X00,0X00,0X09,0X68,0X49,0X4A,0X9B,0X59,0X5F,0XF7,0XBA,0XBA,0X80,0X00,0X00,0X00,
0X00,0X10,0X15,0XB4,0X22,0X51,0X55,0X25,0X76,0XDE,0XFE,0XED,0X00,0X00,0X00,0X00,
0X00,0X00,0X08,0XFA,0X05,0X6A,0XAE,0X90,0X9F,0XFB,0XFA,0XF4,0X00,0X00,0X00,0X00,
0X40,0X00,0X0A,0X7D,0X4A,0XBB,0X7B,0X60,0XED,0X7F,0XFD,0XBA,0X00,0X00,0X00,0X00,
0X00,0X00,0X0A,0XB7,0X2B,0XED,0XDD,0XA2,0XBB,0XEF,0XD6,0XE8,0X00,0X00,0X00,0X20,
0X00,0X80,0X06,0X7F,0X8E,0XBF,0X77,0XA2,0XD6,0XFB,0XFD,0XE0,0X00,0X04,0X20,0X80,
0X00,0X00,0X05,0X5E,0XD7,0XF5,0XDE,0XC5,0XFD,0XEF,0XFB,0X70,0X02,0X10,0X00,0X00,
0X00,0X00,0X83,0XBF,0X9A,0XBF,0X76,0X97,0X7B,0XFF,0X6D,0XC0,0X00,0X00,0X00,0X00,
0X84,0X00,0X02,0XAF,0XCF,0XEB,0XDE,0XAD,0XFF,0X57,0XFB,0XA0,0X00,0X00,0X00,0X00,
0X00,0X00,0X01,0X9F,0X8B,0X7D,0X6E,0XB7,0XEB,0XFF,0XF7,0X80,0X10,0X00,0X00,0X00,
0X00,0X04,0X01,0XDE,0XCF,0XD7,0XBB,0X5A,0XFE,0XEE,0XDE,0X00,0X00,0X00,0X00,0X00,
0X00,0X10,0X00,0X6B,0XCF,0X7D,0XDE,0X6F,0XFD,0XDF,0XF6,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0XD7,0XC7,0XD6,0XBD,0X55,0XDF,0XFF,0XDC,0X00,0X00,0X00,0X01,0X02,
0X20,0X80,0X00,0X6F,0XCD,0XFB,0XDA,0XDF,0XFF,0XAD,0XE8,0X00,0X40,0X20,0X08,0X00,
0X00,0X00,0X00,0X37,0XA7,0X6E,0XBD,0X57,0X7D,0XFF,0X50,0X01,0X00,0X00,0X40,0X00,
0X00,0X00,0X00,0X37,0XC7,0XF6,0XD5,0X7E,0XF7,0XAF,0XA0,0X20,0X00,0X00,0X00,0X00,
0X02,0X00,0X00,0X1A,0XC5,0X5B,0X7D,0X5B,0XFF,0XFE,0X80,0X00,0X00,0X00,0X00,0X08,
0X40,0X00,0X02,0X1B,0XE7,0XF6,0XB5,0XFF,0XFF,0XBF,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X0A,0XC2,0XEF,0X7A,0XB7,0XBF,0XF6,0X00,0X00,0X00,0X21,0X00,0X01,
0X00,0X00,0X00,0X0D,0XE3,0XB5,0XAB,0XFE,0XFD,0XBC,0X80,0X80,0X00,0X80,0X00,0X00,
0X00,0X04,0X20,0X05,0X61,0X6E,0XF7,0XDF,0XFF,0X7A,0X02,0X02,0X00,0X00,0X00,0X44,
0X00,0X20,0X00,0X04,0XD1,0XF5,0XAA,0XFF,0XF7,0XF0,0X00,0X00,0X00,0X00,0X02,0X01,
0X04,0X00,0X00,0X02,0XF0,0XB6,0XEF,0XFF,0XFE,0XD0,0X00,0X00,0X04,0X00,0X10,0X11,
0X00,0X00,0X00,0X40,0X50,0XDB,0XAF,0XFB,0XBF,0X60,0X00,0X00,0X00,0X00,0X80,0X04,
0X00,0X00,0X01,0X00,0X38,0X6D,0XAF,0XEF,0XFB,0X80,0X00,0X00,0X00,0X04,0X00,0X22,
0X00,0X00,0X04,0X01,0X2C,0X2B,0X5F,0XFF,0XED,0X00,0X04,0X22,0X20,0X20,0X00,0X89,
0X10,0X00,0X10,0X00,0X14,0X5D,0XBF,0XBE,0XFC,0X00,0X00,0X00,0X01,0X00,0X00,0X04,
0X00,0X41,0X00,0X00,0X0E,0X12,0XBF,0XFF,0XD8,0X00,0X20,0X00,0X00,0X00,0X02,0X51,
0X00,0X00,0X00,0X00,0X03,0X0A,0X7F,0XF7,0X70,0X00,0X00,0X00,0X00,0X00,0X00,0X88,
0X00,0X00,0X00,0X00,0X05,0X01,0XFE,0XFF,0XC0,0X00,0X00,0X00,0X80,0X00,0X48,0X22,
0X42,0X04,0X00,0X00,0X02,0XC5,0XFF,0XFD,0X80,0X01,0X00,0X88,0X04,0X11,0X02,0X88,
0X00,0X00,0X00,0X00,0X01,0X7F,0XDF,0XEF,0X00,0X00,0X00,0X00,0X00,0X40,0X02,0X52,
0X10,0X00,0X00,0X10,0X80,0XAB,0X7B,0XBC,0X00,0X00,0X00,0X00,0X00,0X00,0X11,0X09,
0X00,0X20,0X11,0X00,0X00,0X5D,0XEE,0XF8,0X00,0X08,0X08,0X02,0X10,0X00,0X04,0XA4,
0X00,0X00,0X40,0X00,0X00,0X27,0X7B,0XE0,0X00,0X00,0X00,0X88,0X00,0X00,0XA2,0X51,
0X00,0X01,0X00,0X00,0X00,0X09,0XAD,0X40,0X00,0X00,0X00,0X00,0X01,0X04,0X19,0X24,
0X02,0X00,0X00,0X00,0X00,0X02,0X55,0X00,0X00,0X40,0X20,0X00,0X04,0X11,0X45,0X49,
0X08,0X10,0X00,0X01,0X08,0X00,0X10,0X00,0X01,0X00,0X00,0X00,0X40,0X00,0X14,0X90,
0X00,0X00,0X00,0X08,0X01,0X00,0X84,0X00,0X00,0X00,0X00,0X44,0X00,0X05,0X4A,0X05,
0X00,0X00,0X00,0X20,0X23,0X02,0XF8,0X00,0X00,0X00,0X81,0X00,0X00,0X10,0XA5,0X68,
0X00,0X00,0X00,0X80,0X07,0XF0,0X20,0X00,0X10,0X00,0X00,0X00,0X08,0X85,0X11,0X01,
0X00,0X88,0X80,0X00,0X87,0XF0,0X00,0X00,0X40,0X00,0X00,0X00,0X80,0X12,0XAA,0X48,
0X10,0X00,0X04,0X00,0X27,0X41,0X80,0X04,0X00,0X00,0X00,0X04,0X00,0X09,0X15,0X25,
0X00,0X00,0X00,0X02,0X0C,0X05,0X00,0X00,0X00,0X00,0X08,0X20,0X04,0XA5,0X52,0X90,
0X00,0X80,0X00,0X00,0X9A,0X42,0X00,0X00,0X00,0X01,0X00,0X80,0X20,0X29,0X28,0X44,
0X02,0X04,0X00,0X04,0X10,0X08,0X00,0X20,0X00,0X04,0X00,0X00,0X80,0XAA,0XA5,0X22,
0X08,0X00,0X40,0X10,0X31,0X20,0X00,0X80,0X00,0X10,0X00,0X02,0X02,0X2A,0X2A,0XA9,
0X00,0X10,0X02,0X01,0X20,0X00,0X00,0X00,0X00,0X80,0X08,0X10,0X04,0XAA,0XA4,0X92,
0X00,0X00,0X00,0X08,0X64,0X80,0X04,0X00,0X02,0X00,0X01,0X00,0X01,0X55,0X2A,0X44,
0X10,0X00,0X00,0X22,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X2A,0XA4,0XA2,0X28,
0X40,0X81,0X10,0X80,0X49,0X00,0X00,0X00,0X80,0X00,0X20,0X24,0X01,0X2A,0XA8,0X82,
0X00,0X08,0X00,0X14,0X00,0X00,0X20,0X00,0X00,0X00,0X02,0X00,0XAA,0XA9,0X4A,0XA8,
0X02,0X00,0X00,0X40,0X10,0X04,0X00,0X00,0X00,0X01,0X00,0X00,0X02,0X54,0X44,0X41
};
const unsigned char ris_2[]PROGMEM = {
0X50,0X00,0X02,0X10,0X80,0X08,0X09,0X24,0X84,0X81,0X24,0X80,0X10,0X00,0X15,0X40,
0XA9,0X02,0XA8,0XA5,0X28,0X24,0X24,0X92,0X02,0X51,0X49,0X28,0XA5,0X54,0X49,0X2A,
0XA0,0X00,0X12,0X12,0X20,0X12,0X12,0XAA,0X85,0X42,0X24,0X90,0X08,0X89,0X25,0X50,
0X54,0X81,0X41,0X48,0X90,0X28,0X4A,0X49,0X44,0XA1,0X52,0X48,0X52,0X20,0X14,0X92,
0XA8,0X00,0X14,0X25,0X20,0X04,0X29,0X25,0X22,0X82,0X95,0X24,0X09,0X4A,0X45,0X48,
0XA2,0X01,0X49,0X48,0X90,0X28,0X4A,0XAA,0X82,0X50,0XA4,0XA8,0X52,0X24,0X88,0XAA,
0X58,0X80,0X22,0X25,0X20,0X14,0X29,0X54,0XA2,0XA2,0X92,0X94,0X08,0X89,0X02,0X24,
0XA1,0X01,0X14,0X90,0X81,0X20,0X4A,0X4A,0X82,0X81,0X54,0XA2,0X25,0X24,0X90,0X52,
0XA8,0X00,0X42,0X4A,0X50,0X14,0X29,0X52,0X42,0X62,0X4A,0X48,0X28,0X92,0X0F,0XAC,
0X52,0X08,0X94,0X92,0X82,0X28,0X55,0X4A,0XA2,0X81,0X55,0X2A,0X12,0X4A,0X8A,0XDA,
0XA8,0X80,0X22,0X48,0X40,0X08,0X4A,0XAA,0XA2,0XA5,0X45,0XA4,0X25,0X22,0X8D,0X68,
0XA2,0X08,0X49,0X25,0X44,0X28,0X54,0XAA,0X82,0XAF,0X28,0XA8,0X12,0X40,0X4F,0X95,
0X58,0X80,0X24,0X95,0X02,0X24,0X52,0XAA,0XA2,0XB5,0XD1,0X64,0X49,0X22,0X0D,0XD0,
0XA2,0X08,0X2A,0X52,0XA4,0X14,0X2A,0XAA,0XA2,0XAE,0XAE,0X54,0X2A,0X90,0X2A,0X8A,
0X50,0X80,0X41,0X49,0X02,0X28,0X55,0X55,0X42,0XAA,0XFF,0XAA,0X12,0X42,0XA5,0X51,
0X54,0X0A,0X14,0X94,0X88,0X24,0X55,0X55,0X42,0XAB,0XF7,0XE8,0X29,0X21,0X54,0X48,
0XA9,0X00,0X0A,0X45,0X06,0X14,0X55,0X55,0X62,0XA5,0XBE,0XB4,0X25,0X40,0X22,0X85,
0X50,0X8A,0X21,0X29,0X08,0X28,0X55,0X55,0X82,0XCB,0XFF,0XD4,0X2A,0X43,0X48,0X50,
0XA4,0X00,0X14,0X94,0X8A,0X28,0X55,0X56,0XA3,0X49,0X4C,0XAA,0X29,0X20,0X90,0X8A,
0X92,0X8A,0X0A,0X4A,0X14,0X28,0X55,0X6A,0XA2,0X8B,0X3A,0XD4,0X25,0X45,0X20,0X20,
0XA8,0X01,0X11,0X52,0X0A,0X14,0X55,0XAA,0XC2,0XC9,0X6E,0X4A,0X2A,0X82,0X94,0X95,
0X52,0X8A,0X04,0X95,0X14,0X28,0X56,0XAD,0X43,0X05,0XFF,0XD4,0X29,0X44,0X48,0X22,
0X54,0X01,0X0A,0X48,0X2A,0X2C,0X5A,0XB6,0XC5,0X92,0XD7,0XD4,0X25,0X02,0XA4,0X49,
0X51,0X0A,0X05,0X55,0X12,0X28,0X6A,0XD5,0X62,0X91,0X6E,0XD4,0X2A,0X8A,0X50,0X12,
0X48,0X81,0X08,0X94,0X2A,0X14,0X55,0X5B,0X43,0X72,0XFF,0XB4,0X2A,0X85,0X2A,0X24,
0XAA,0X0A,0X85,0X52,0X2A,0X28,0X56,0XD5,0XA2,0X91,0XCB,0XEA,0X2A,0X09,0X44,0X11,
0X51,0X04,0X42,0X48,0X2A,0X2C,0X5B,0X5A,0XC3,0X72,0XFD,0X54,0X2A,0X8A,0XA8,0X24,
0XA8,0X89,0X05,0X28,0X54,0X28,0X6A,0XAE,0XA2,0XC1,0XB7,0XEC,0X2A,0X09,0X24,0X12,
0XA5,0X04,0X82,0XA8,0X54,0X28,0X55,0XEB,0X43,0X46,0XFF,0X34,0X55,0X15,0X55,0X14,
0X90,0X0A,0X42,0X54,0XAA,0X2C,0X6E,0XB5,0XE5,0XAD,0XBD,0XAA,0X2A,0X15,0X24,0X09,
0X55,0X01,0X41,0X50,0X54,0X28,0X55,0X5D,0X42,0XB7,0XC2,0X54,0X2B,0X00,0X00,0X24,
0XA9,0X0A,0X52,0XA8,0XAA,0X2C,0X6D,0XD6,0XC3,0X2F,0XE9,0XB6,0X34,0X00,0X00,0X12,
0XA4,0X89,0X41,0X40,0XAD,0X34,0X5B,0X6B,0X62,0X7B,0XEA,0XDA,0X2A,0X00,0X00,0X09,
0X52,0X05,0X21,0X31,0X54,0X14,0X6D,0XBD,0XA1,0X5F,0XB6,0XAA,0X2C,0X36,0XED,0X0A,
0X54,0X88,0XA0,0XA1,0X6A,0X34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0X4A,0X96,0XA5,0X55,0XB8,0XBE,0XD5,0X5D,0X51,0X24,0X92,0XAA,0X95,
0X49,0X44,0X52,0X92,0X10,0X28,0XA1,0X52,0XEB,0X5A,0X15,0X4A,0X82,0XA2,0X92,0X49,
0X24,0X22,0X89,0X15,0X14,0XA8,0XAA,0XA1,0X5E,0XD4,0X0A,0XEA,0XC5,0X51,0X55,0X54,
0XB2,0X94,0X54,0X49,0X4A,0XA8,0X51,0X62,0XFB,0X6E,0X8B,0X2B,0X42,0XAA,0X49,0X22,
0XA8,0X42,0X92,0X25,0X54,0XA8,0XAA,0X81,0X5D,0X52,0X05,0XA5,0X42,0XA1,0X54,0X95,
0X4A,0X29,0X24,0X2A,0X89,0X50,0XB5,0X45,0XB6,0X2D,0X82,0XAA,0X85,0X55,0X52,0XA8,
0XA1,0X44,0X92,0X12,0X55,0X50,0XAA,0X82,0XFB,0X34,0XA2,0XAA,0XA2,0X94,0X8A,0X45,
0X58,0X12,0X48,0X09,0X4A,0X48,0XAA,0X82,0XAC,0X16,0X81,0X4A,0X82,0X52,0XA9,0X2A,
0XA5,0X48,0X92,0X00,0XA9,0X50,0X55,0X02,0XF6,0X14,0XE1,0X65,0X42,0X8A,0X55,0X50,
0X90,0X22,0X25,0X00,0X15,0X50,0XAA,0X05,0XB4,0X14,0X90,0X8A,0XA1,0X29,0X44,0X8A,
0XAA,0X89,0X48,0X80,0X09,0X28,0XAA,0X82,0XEE,0X16,0X68,0X6A,0X84,0X15,0X2A,0X52,
0X50,0X44,0X12,0X50,0X05,0X48,0X52,0X05,0XB4,0X14,0XA8,0X25,0X42,0X89,0X51,0X25,
0X55,0X29,0X44,0X95,0X0A,0X50,0XAA,0X86,0XEA,0X15,0X50,0X0A,0X42,0XA4,0X8A,0X90,
0XA0,0X02,0X29,0X24,0X85,0X28,0X4A,0X83,0X5A,0X14,0XAC,0X29,0X42,0X55,0X24,0X4A,
0XAA,0XA8,0X82,0X49,0X08,0XA0,0XA9,0X0D,0XEA,0X2A,0X52,0X05,0X01,0X20,0XA9,0X21,
0X50,0X02,0X28,0X24,0X85,0X50,0X55,0X45,0X54,0X2A,0XAA,0X0A,0XC5,0X55,0X12,0X4A,
0X4A,0XA8,0X84,0X92,0X52,0X08,0X8A,0X4B,0XD8,0X52,0X49,0X09,0X01,0X08,0XA4,0X91,
0X28,0X02,0X50,0X49,0X09,0X60,0X51,0X4A,0XA8,0X94,0XA5,0X04,0XA2,0X51,0X11,0X08,
0XA1,0X28,0X0A,0X04,0X92,0X10,0XAA,0X97,0XD4,0X52,0X54,0X8A,0X41,0X40,0X88,0X45,
0X54,0X02,0XA0,0X28,0X09,0X48,0X14,0X0A,0XA1,0X48,0X92,0X42,0X82,0X21,0X25,0X20,
0X90,0XA0,0X08,0X81,0X52,0X42,0XA2,0X97,0X6A,0XA5,0X29,0X08,0X10,0X88,0X90,0X94,
0XA9,0X0A,0XA2,0X24,0X09,0X28,0X4A,0X89,0X89,0X14,0X85,0X65,0X4A,0X24,0X44,0X02,
0XA0,0X20,0X08,0X89,0X50,0X95,0X24,0X56,0X64,0XAA,0X54,0X94,0XA1,0X49,0X12,0XA8,
0X9A,0X09,0X22,0X22,0X25,0X22,0X92,0X8A,0XAA,0XA2,0XAA,0X4A,0X4C,0X92,0X48,0X44,
0XA0,0XA0,0X88,0X91,0X48,0X94,0X54,0X5A,0XD5,0X2A,0XA5,0X51,0X22,0X49,0X25,0X22,
0X94,0X0A,0X22,0X4A,0X12,0X4A,0XA9,0XAE,0X52,0XAA,0X55,0X56,0XAA,0XA5,0X52,0X94,
0XA9,0X20,0X89,0X11,0X4A,0XA5,0X22,0XDA,0X95,0X55,0XAA,0XA9,0X55,0X55,0X4A,0X52,
0X90,0X44,0X24,0X48,0XA4,0X94,0XA9,0XAD,0X6D,0X55,0X55,0X56,0XAA,0XAA,0XAA,0XAA,
0XA9,0X12,0X89,0X25,0X12,0X55,0X50,0X06,0X96,0XED,0X6A,0XAA,0XAD,0X55,0X55,0X55,
0X44,0X00,0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,0XFF,0XFF,0XFF,0XFF,0XFB,
0X57,0X7B,0XDE,0XDF,0XFD,0XFF,0XFB,0XA4,0X95,0XFF,0XFF,0XFF,0XFF,0XDF,0XF7,0XDF,
0X5F,0XF7,0XDF,0XFF,0XEF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X7F,0XFF,0XFF,0XFF
};

 

andycat
andycat аватар
Offline
Зарегистрирован: 07.09.2017

lilik пишет:

andycat пишет:

lilik пишет:

Тогда SPI.transfer(&lineBuf, dispW); останется и должна заработать?, а  в tft.setAddrWindow(0, j, dispW-1, j); убрать хвост tft.

никаких хвостов убирать не надо
по хорошему добавить в библиотеку Адафрута новую функцию которая выводит не пиксель, я именно строку.

Завтра может время найду поставлю эти библиотеки. посмотрю.

Не дождался, 

Сорри, никак не найду время :(
по поводу цветов, вот тема была (если я правильно вопрос понял):

https://arduino.ru/forum/programmirovanie/sortirovka-palitry-rgb565#comm...

 

lilik
Offline
Зарегистрирован: 19.10.2017

andycat пишет:

 

 (если я правильно вопрос понял):

https://arduino.ru/forum/programmirovanie/sortirovka-palitry-rgb565#comm...

 

Нет, я не сообразил сходу как делить на 2 части tft.Color565(255,255,0) . Теперь сообразил. Вот пример радужного секундомера (для опытов на "пипика" :)

// СЕКУНДОМЕР РАДУЖНЫЙ
#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>
#define TFT_CS     10
#define TFT_RST    9  
#define TFT_DC     8
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS,  TFT_DC, TFT_RST);
extern const unsigned char ris_1[];
float a = -PI/2-PI/30; // переменная для угла поворота стрелки
int str = 60; //длина стрелки в пикселях
byte sek=0;//

void setup(void) {
  // Используйте этот инициализатор, если вы используете 1,8-дюймовый TFT
  tft.initR(INITR_BLACKTAB);   // initialize a ST7735S chip, black tab
 tft.fillScreen(ST7735_BLACK);
 tft.setRotation(0);//ориентация экрана
 }
void loop() {
  
//
drawBitmap_(0,16,ris_1, 128,128);//фоновая картинка секундомера

 // 
  a=a+PI/30;
 tft.drawLine(64+ cos(a+1.5)*str*0.1, 80+ sin(a+1.5)*str*0.1, 64 + cos(a)*str, 80 + sin(a)*str,tft.Color565(0,0,0));// рисование новой стрелки
 tft.drawLine(64+ cos(a-1.5)*str*0.1, 80+ sin(a-1.5)*str*0.1, 64 + cos(a)*str, 80 + sin(a)*str,tft.Color565(0,0,0));// 
 tft.drawCircle(64,80,6,tft.Color565(0,0,0) );
 
 tft.setCursor(55, 95);//дублирование данных числом
  tft.setTextSize(2);
  tft.setTextColor(tft.Color565(0,0,0));
 if(sek<10){tft.print("0");}tft.println(sek);
  sek++;if(sek>59){sek=0;}
 //   
delay(835);//подбираем опытным путём

}
////////////////////////////////////////////////////////
void drawBitmap_(int x,int y, const uint8_t *bitmap,int16_t W ,int16_t H) {
 if(x<0||x+W>128||y<0||y+H>160){return;} 
 unsigned char  lineBuf[W*2 ]; 
  int16_t i, j, byteWidth = (W + 7) / 8;
  uint8_t byte;
  for (unsigned short j = 0; j < H; j++) {
    for (unsigned short i = 0; i < W; ++i) {
       if(i & 7) byte <<= 1;
      else      byte   = pgm_read_byte(bitmap + j * byteWidth + i / 8);
     if(byte & 0x80)
     {
      if(j<=H/2&&i<=W/2){lineBuf[i*2 ] =tft.Color565(255,0,0)/256 ; lineBuf[i * 2 + 1] =tft.Color565(255,0,0)%256 ;} // задаём условия цветных секторов для основного изображения
       else{ if(j<=H/2&&i>W/2){lineBuf[i*2 ] =tft.Color565(255,0,255)/256 ; lineBuf[i * 2 + 1] =tft.Color565(255,0,255)%256 ; }
       else{ if(j>H/2&&i>W/2){lineBuf[i*2 ] =tft.Color565(0,150,255)/256 ; lineBuf[i * 2 + 1] =tft.Color565(0,150,255)%256 ;}
       else{ if(j>H/2&&i<=W/2){lineBuf[i*2 ] =tft.Color565(255,255,0)/256 ; lineBuf[i * 2 + 1] =tft.Color565(255,255,0)%256 ;}
       }
       }
       } 
        } else {
         lineBuf[i*2 ] =tft.Color565((1.6)*(j%H),200-(200/W)*(i%W),(255/W)*(i%W))/256 ; lineBuf[i * 2 + 1] =tft.Color565((1.6)*(j%H),200-(200/W)*(i%W),(255/W)*(i%W))%256 ; //задаём условия цветового градиента для фонового изображения
        }
    }
    
    tft.setAddrWindow(x+0, y+j, x+W-1, y+j);
    ///
    SPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
    digitalWrite(TFT_DC, HIGH);
    digitalWrite(TFT_CS, LOW);
    SPI.transfer(&lineBuf, 2*W);
    digitalWrite(TFT_CS, HIGH);
    SPI.endTransaction();
    ///
  }
  
}
//////////////////////////////////////////////////////////

 и картинка фоновая для него.

#include <avr/pgmspace.h>

const unsigned char ris_1[]PROGMEM = {
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3C,0X78,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XFC,0X7F,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFC,0X7F,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFC,0X7F,0XFF,0X10,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X31,0XFF,0XFC,0X7F,0XFF,0X1C,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0XF1,0XFF,0XFC,0X7F,0XFF,0X1F,0X80,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X03,0XF0,0XFF,0XFC,0X7F,0XFE,0X1F,0XE0,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X0F,0XF8,0XFF,0XFC,0X7F,0XFE,0X3F,0XF0,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X3F,0XF8,0XFF,0XFC,0X7F,0XFE,0X3F,0XFC,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0XFF,0XFC,0X7F,0XFC,0X7F,0XFC,0X3F,0XFE,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X03,0XFF,0XFC,0X7F,0XFC,0X7F,0XFC,0X7F,0XFF,0X80,0X00,0X00,0X00,
0X00,0X00,0X00,0X01,0XFF,0XFC,0X3F,0XFC,0X7F,0XFC,0X7F,0XFF,0X80,0X00,0X00,0X00,
0X00,0X00,0X00,0X01,0XFF,0XFE,0X3F,0XFC,0X7F,0XF8,0X7F,0XFF,0X08,0X00,0X00,0X00,
0X00,0X00,0X00,0X10,0XFF,0XFE,0X3F,0XFC,0X7F,0XF8,0XFF,0XFF,0X1C,0X00,0X00,0X00,
0X00,0X00,0X00,0X38,0X7F,0XFE,0X1F,0XFC,0X7F,0XF8,0XFF,0XFE,0X1E,0X00,0X00,0X00,
0X00,0X00,0X00,0X7C,0X3F,0XFF,0X1F,0XFC,0X7F,0XF0,0XFF,0XFC,0X3F,0X00,0X00,0X00,
0X00,0X00,0X00,0XFE,0X3F,0XFF,0X1F,0XFC,0X7F,0XF1,0XFF,0XF8,0X7F,0X80,0X00,0X00,
0X00,0X00,0X03,0XFE,0X1F,0XFF,0X0F,0XFC,0X7F,0XF1,0XFF,0XF8,0XFF,0XC0,0X00,0X00,
0X00,0X00,0X03,0XFF,0X0F,0XFF,0X8F,0XFC,0X7F,0XF1,0XFF,0XF0,0XFF,0XE0,0X00,0X00,
0X00,0X00,0X07,0XFF,0X87,0XFF,0X8F,0XFC,0X7F,0XE3,0XFF,0XE1,0XFF,0XF0,0X00,0X00,
0X00,0X00,0X0F,0XFF,0X87,0XFF,0XC7,0XFC,0X7F,0XE3,0XFF,0XC3,0XFF,0XF8,0X00,0X00,
0X00,0X00,0X1F,0XFF,0XC3,0XFF,0XC7,0XE0,0X03,0XE3,0XFF,0XC7,0XFF,0XFC,0X00,0X00,
0X00,0X00,0X3F,0XFF,0XE1,0XFF,0XE0,0X00,0X00,0X07,0XFF,0X87,0XFF,0XFE,0X00,0X00,
0X00,0X00,0X3F,0XFF,0XF1,0XFF,0XE0,0X00,0X00,0X07,0XFF,0X0F,0XFF,0XFC,0X00,0X00,
0X00,0X00,0X1F,0XFF,0XF0,0XFF,0X00,0X00,0X00,0X00,0XFE,0X1F,0XFF,0XF8,0X00,0X00,
0X00,0X00,0X07,0XFF,0XF8,0X7C,0X00,0X00,0X00,0X00,0X3E,0X3F,0XFF,0XE0,0X00,0X00,
0X00,0X01,0X83,0XFF,0XFC,0X38,0X00,0X00,0X00,0X00,0X1C,0X3F,0XFF,0XC1,0X80,0X00,
0X00,0X01,0XC1,0XFF,0XFE,0X20,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0X03,0XC0,0X00,
0X00,0X03,0XF0,0X7F,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFE,0X0F,0XC0,0X00,
0X00,0X07,0XF8,0X3F,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFC,0X1F,0XE0,0X00,
0X00,0X07,0XFC,0X1F,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XF0,0X7F,0XF0,0X00,
0X00,0X0F,0XFF,0X07,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XE0,0XFF,0XF0,0X00,
0X00,0X0F,0XFF,0X83,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0X81,0XFF,0XF8,0X00,
0X00,0X1F,0XFF,0XC1,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0X07,0XFF,0XF8,0X00,
0X00,0X1F,0XFF,0XF0,0X60,0X00,0X00,0X00,0X00,0X00,0X00,0X06,0X0F,0XFF,0XFC,0X00,
0X00,0X3F,0XFF,0XF8,0X20,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0XFF,0XFC,0X00,
0X00,0X3F,0XFF,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XFE,0X00,
0X00,0X3F,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE,0X00,
0X00,0X7F,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0XFE,0X00,
0X00,0X7F,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XF8,0X00,
0X00,0X0F,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XC0,0X00,
0X00,0X01,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XFF,0X00,0X00,
0X00,0X80,0X3F,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XF8,0X03,0X80,
0X01,0XF0,0X03,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0XE0,0X1F,0X80,
0X01,0XFE,0X00,0X78,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0X00,0X7F,0X80,
0X01,0XFF,0XC0,0X18,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1C,0X03,0XFF,0X80,
0X01,0XFF,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0XFF,0XC0,
0X01,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XC0,
0X01,0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XE0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XE0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XE0,
0X03,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XE0,
0X07,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XE0,
0X07,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XE0,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X07,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XE0,
0X07,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XE0,
0X07,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XC0,
0X07,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X07,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X07,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XFF,0XFF,0X80,
0X03,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0X80,
0X03,0XFF,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0XFF,0X80,
0X01,0XFF,0XC0,0X38,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X18,0X03,0XFF,0X80,
0X01,0XFE,0X00,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1E,0X00,0X7F,0X80,
0X01,0XF8,0X07,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XC0,0X0F,0X80,
0X01,0XC0,0X1F,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XFC,0X01,0X00,
0X00,0X00,0XFF,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0X80,0X00,
0X00,0X03,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XF0,0X00,
0X00,0X1F,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0XFE,0X00,
0X00,0X7F,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0XFE,0X00,
0X00,0X7F,0XFF,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0XFC,0X00,
0X00,0X7F,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XFF,0XFC,0X00,
0X00,0X3F,0XFF,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X04,0X1F,0XFF,0XFC,0X00,
0X00,0X3F,0XFF,0XF0,0X60,0X00,0X00,0X00,0X00,0X00,0X00,0X06,0X0F,0XFF,0XF8,0X00,
0X00,0X1F,0XFF,0XE0,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0X83,0XFF,0XF8,0X00,
0X00,0X1F,0XFF,0X81,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0XC1,0XFF,0XF0,0X00,
0X00,0X0F,0XFF,0X07,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XE0,0XFF,0XF0,0X00,
0X00,0X0F,0XFE,0X0F,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XF8,0X3F,0XE0,0X00,
0X00,0X07,0XF8,0X3F,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFC,0X1F,0XE0,0X00,
0X00,0X03,0XF0,0X7F,0XFF,0X00,0X00,0X00,0X00,0X00,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0XFE,0X3F,0XF8,0X7F,0XFE,0X1C,0X00,0X00,0X00,
0X00,0X00,0X00,0X38,0XFF,0XFF,0X1F,0XFE,0X3F,0XFC,0X7F,0XFF,0X08,0X00,0X00,0X00,
0X00,0X00,0X00,0X10,0XFF,0XFE,0X1F,0XFE,0X3F,0XFC,0X7F,0XFF,0X80,0X00,0X00,0X00,
0X00,0X00,0X00,0X01,0XFF,0XFE,0X3F,0XFE,0X3F,0XFC,0X3F,0XFF,0X80,0X00,0X00,0X00,
0X00,0X00,0X00,0X01,0XFF,0XFE,0X3F,0XFE,0X3F,0XFE,0X3F,0XFF,0XC0,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X7F,0XFC,0X3F,0XFE,0X3F,0XFE,0X3F,0XFF,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X3F,0XFC,0X7F,0XFE,0X3F,0XFF,0X1F,0XFC,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X0F,0XFC,0X7F,0XFE,0X3F,0XFF,0X1F,0XF0,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X07,0XF8,0X7F,0XFE,0X3F,0XFF,0X0F,0XC0,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X01,0XF8,0XFF,0XFE,0X3F,0XFF,0X8F,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X38,0XFF,0XFE,0X3F,0XFF,0X8C,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X08,0XFF,0XFE,0X3F,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFE,0X3F,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFE,0X3F,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1E,0X3C,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00
};

Забавно, если присмотреться к массиву, то картинка в нём просматривается :)

lilik
Offline
Зарегистрирован: 19.10.2017

Не поленился, сделал сравнительный тест вариантов вывода картинок в режиме раскраски.

 Визуально преимущества в скорости вывода почти сошли на нет :(

// РИСУНОК и способы его раскраски
#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>
#define TFT_CS     10
#define TFT_RST    9  
#define TFT_DC     8
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS,  TFT_DC, TFT_RST);
extern const unsigned char ris_1[];

void setup(void) {
  // Используйте этот инициализатор, если вы используете 1,8-дюймовый TFT
  tft.initR(INITR_BLACKTAB);   // initialize a ST7735S chip, black tab
 tft.fillScreen(ST7735_BLACK);
 tft.setRotation(0);//ориентация экрана
 }
void loop() {
 //демонстрация вариантов раскраски - 1 ВАРИАНТ вывода картинки
drawBitmap_(0,0,ris_1, 128,160,0);
delay(1000);//
drawBitmap_(0,0,ris_1, 128,160,1);
delay(2000);//
drawBitmap_(0,0,ris_1, 128,160,0);
delay(1000);//
drawBitmap_(0,0,ris_1, 128,160,2);
delay(2000);//
drawBitmap_(0,0,ris_1, 128,160,0);
delay(1000);//
drawBitmap_(0,0,ris_1, 128,160,3);
delay(2000);//
drawBitmap_(0,0,ris_1, 128,160,0);
delay(1000);//
drawBitmap_(0,0,ris_1, 128,160,4);
delay(2000);//
drawBitmap_(0,0,ris_1, 128,160,0);
delay(1000);//
drawBitmap_(0,0,ris_1, 128,160,5);
delay(2000);//
//демонстрация вариантов раскраски - 2 ВАРИАНТ  вывода картинки
drawBitmap_2(0,0,ris_1, 128,160,0);
delay(1000);//
drawBitmap_2(0,0,ris_1, 128,160,1);
delay(2000);//
drawBitmap_2(0,0,ris_1, 128,160,0);
delay(1000);//
drawBitmap_2(0,0,ris_1, 128,160,2);
delay(2000);//
drawBitmap_2(0,0,ris_1, 128,160,0);
delay(1000);//
drawBitmap_2(0,0,ris_1, 128,160,3);
delay(2000);//
drawBitmap_2(0,0,ris_1, 128,160,0);
delay(1000);//
drawBitmap_2(0,0,ris_1, 128,160,4);
delay(2000);//
drawBitmap_2(0,0,ris_1, 128,160,0);
delay(1000);//
drawBitmap_2(0,0,ris_1, 128,160,5);
delay(2000);//
}
/////////////////////////////////////////////////////////////////////////
void drawBitmap_(int x,int y, const uint8_t *bitmap,int16_t W ,int16_t H,byte raskraska) {
 if(x<0||x+W>128||y<0||y+H>160){return;} 
 unsigned char  lineBuf[W*2 ]; 
  int16_t i, j, byteWidth = (W + 7) / 8;
  uint8_t byte;
  uint8_t r=50*random(1,6);
  for (unsigned short j = 0; j < H; j++) {
    for (unsigned short i = 0; i < W; ++i) {
       if(i & 7) byte <<= 1;
      else      byte   = pgm_read_byte(bitmap + j * byteWidth + i / 8);
     if(byte & 0x80)
     {
      if(raskraska==0){lineBuf[i*2 ] =tft.Color565(255,255,255)/256;lineBuf[i*2+1 ] =tft.Color565(255,255,255)%256; }//задаём один цвет  
      if(raskraska==1){lineBuf[i*2 ] =tft.Color565((1.6)*(j%H),200-(200/W)*(i%W),(255/W)*(i%W))/256;lineBuf[i*2+1 ] =tft.Color565((1.6)*(j%H),200-(200/W)*(i%W),(255/W)*(i%W))%256;}//задаём зависимости градиентов цветов 
      if(raskraska==2||raskraska==4){
       if(i*i+j*j<10010&&j<=W){lineBuf[i*2 ] =tft.Color565(255,0,0)/256;lineBuf[i*2+1 ] =tft.Color565(255,0,0)%256; } // задаём условия цветных секторов
       else{ if(j<=H/2-5&&i>W/2-5){lineBuf[i*2 ] =tft.Color565(255,0,255)/256;lineBuf[i*2+1 ] =tft.Color565(255,0,255)%256;}
       else{ if(j>H/2-5&&i>W/2-5){lineBuf[i*2 ] =tft.Color565(0,150,255)/256;lineBuf[i*2+1 ] =tft.Color565(0,150,255)%256;}
       else{ if(j>H/2-5&&i<=W/2-5){lineBuf[i*2 ] =tft.Color565(0,255,0)/256;lineBuf[i*2+1 ] =tft.Color565(0,255,0)%256;}
       }
       }
       } 
       }
        if(raskraska==3){
      if(i%2==0||j%2==1){r=50*random(1,6);}//задаём условие пиксельного ассорти  
      lineBuf[i*2 ] =tft.Color565(r,175-0.6*r,0)/256;lineBuf[i*2+1 ] =tft.Color565(r,175-0.6*r,0)%256;
      }
      if(raskraska==5){//задаём чередование цветовых полос
      if(j%4==0){lineBuf[i*2 ] =tft.Color565(255,255,255)/256;lineBuf[i*2+1 ] =tft.Color565(255,255,255)%256;}
      else{if(j%4==1){lineBuf[i*2 ] =tft.Color565(0,255,0)/256;lineBuf[i*2+1 ] =tft.Color565(0,255,0)%256;}
      else{if(j%4==2){lineBuf[i*2 ] =tft.Color565(0,0,0)/256;lineBuf[i*2+1 ] =tft.Color565(0,0,0)%256;}
      else{if(j%4==3){lineBuf[i*2 ] =tft.Color565(0,255,0)/256;lineBuf[i*2+1 ] =tft.Color565(0,255,0)%256;}
      }
      }
      }
       }
        } else {
         if(raskraska==4){lineBuf[i*2 ] =tft.Color565((1.6)*(j%H),200-(200/W)*(i%W),(255/W)*(i%W))/256;lineBuf[i*2+1 ] =tft.Color565((1.6)*(j%H),200-(200/W)*(i%W),(255/W)*(i%W))%256;}else{lineBuf[i*2 ] =tft.Color565(0,0,0)/256;lineBuf[i*2+1 ] =tft.Color565(0,0,0)%256;}
        }
    }
    
    tft.setAddrWindow(x+0, y+j, x+W-1, y+j);
    ///
    SPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
    digitalWrite(TFT_DC, HIGH);
    digitalWrite(TFT_CS, LOW);
    SPI.transfer(&lineBuf, 2*W);
    digitalWrite(TFT_CS, HIGH);
    SPI.endTransaction();
    ///
  }
  
}
////////////////////////////////////////////////////////
void drawBitmap_2(int16_t x, int16_t y,
 const uint8_t *bitmap, int16_t w, int16_t h,byte raskraska) {
 int16_t i, j, byteWidth = (w + 7) / 8;
  uint8_t byte;
 if(x<0||x+w>128||y<0||y+h>160){return;} 
 tft.setAddrWindow(x,y,x+w-1,y+h-1);//задаём область вывода данных
  uint8_t r=50*random(1,6);
  for(j=0; j<h; j++) {
    for(i=0; i<w; i++) {
      if(i & 7) byte <<= 1;
      else      byte   = pgm_read_byte(bitmap + j * byteWidth + i / 8);
      if(byte & 0x80)
      {
      if(raskraska==0){tft.pushColor(tft.Color565(255,255,255) );}//задаём один цвет  
      if(raskraska==1){tft.pushColor(tft.Color565((1.6)*(j%h),200-(200/w)*(i%w),(255/w)*(i%w)));}//задаём зависимости градиентов цветов 
      if(raskraska==2||raskraska==4){
       if(i*i+j*j<10010&&j<=w){tft.pushColor(tft.Color565(255,0,0) );} // задаём условия цветных секторов
       else{ if(j<=h/2-5&&i>w/2-5){tft.pushColor(tft.Color565(255,0,255) );}
       else{ if(j>h/2-5&&i>w/2-5){tft.pushColor(tft.Color565(0,150,255) );}
       else{ if(j>h/2-5&&i<=w/2-5){tft.pushColor(tft.Color565(0,255,0) );}
       }
       }
       } 
       }
        if(raskraska==3){
      if(i%2==0||j%2==1){r=50*random(1,6);}//задаём условие пиксельного ассорти  
      tft.pushColor(tft.Color565(r,175-0.6*r,0));
      }
      if(raskraska==5){//задаём чередование цветовых полос
      if(j%4==0){tft.pushColor(tft.Color565(255,255,255));}
      else{if(j%4==1){tft.pushColor(tft.Color565(0,255,0));}
      else{if(j%4==2){tft.pushColor(tft.Color565(0,0,0));}
      else{if(j%4==3){tft.pushColor(tft.Color565(0,255,0));}
      }
      }
      }
       }
      }
     else {if(raskraska==4){tft.pushColor(tft.Color565((1.6)*(j%h),200-(200/w)*(i%w),(255/w)*(i%w)));}else{tft.pushColor(tft.Color565(0,0,0));}}
    }
  }
}
//////////////////////////////////////////////////////////
#include <avr/pgmspace.h>

const unsigned char ris_1[]PROGMEM = {
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X03,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X80,0X40,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0XFF,0XC1,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X01,0XFF,0X83,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X01,0XFF,0X0F,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X01,0XFE,0X1F,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X03,0XFC,0X3F,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X03,0XF8,0X7F,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X07,0XF0,0XFF,0XFF,0X01,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X07,0XE1,0XFF,0XFC,0X07,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X07,0XC3,0XFF,0XF8,0X0F,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X07,0X83,0XFF,0XF0,0X3F,0XFF,0X00,0X00,0X03,0XE0,0X00,0X00,0X01,0XC0,
0X03,0X80,0X07,0X07,0XFF,0XC0,0X7F,0XFE,0X00,0X80,0X1F,0XFC,0X00,0X00,0X01,0XC0,
0X03,0X80,0X07,0X0F,0XFF,0X81,0XFF,0XFC,0X07,0XF8,0X7F,0XFF,0X00,0X00,0X01,0XC0,
0X03,0X80,0X06,0X1F,0XFF,0X03,0XFF,0XF8,0X1F,0XF8,0XFF,0XFF,0X80,0X7C,0X01,0XC0,
0X03,0X80,0X00,0X3F,0XFE,0X07,0XFF,0XF0,0X3F,0XF0,0XFF,0XFF,0XC0,0X7E,0X01,0XC0,
0X03,0X80,0X00,0X7F,0XF8,0X1F,0XFF,0XE0,0X7F,0XF1,0XFF,0X7F,0XC0,0X7E,0X01,0XC0,
0X03,0X80,0X00,0X7F,0XF0,0X3F,0XFF,0XC0,0XFF,0XE1,0XF8,0X0F,0XE0,0X7F,0X01,0XC0,
0X03,0X80,0X00,0XFF,0XE0,0X7F,0XFF,0X83,0XFF,0XE3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XFF,0XFF,0XFF,0X80,0X00,0XFE,0X07,0XFF,0XF0,0X7F,0X81,0XC0,
0X03,0X80,0X03,0XFF,0XFF,0XFF,0XFF,0XE0,0X00,0X3C,0X07,0XFF,0XF0,0XFF,0X81,0XC0,
0X03,0X80,0X00,0X00,0X07,0XFF,0XFF,0XFC,0X00,0X00,0X07,0XFF,0XF0,0XFF,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X7F,0XFF,0XFF,0X80,0X00,0X0F,0XFF,0XF0,0XFF,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X07,0XFF,0XFF,0XFE,0X0F,0X0F,0XFF,0XE0,0X7F,0X01,0XC0,
0X03,0X80,0X00,0X3F,0XF0,0X00,0XFF,0XFF,0XFF,0XFF,0X87,0XFF,0XE0,0X00,0X01,0XC0,
0X03,0X80,0X00,0X7F,0XFF,0X80,0X1F,0XFF,0XFF,0XFF,0XC7,0XFF,0XC0,0X00,0X01,0XC0,
0X03,0X80,0X00,0X7F,0XFF,0XF8,0X03,0XFF,0XFF,0XFF,0XC3,0XFF,0X80,0X00,0X01,0XC0,
0X03,0X80,0X00,0X7F,0XFF,0XFF,0X00,0X7F,0XFF,0XFF,0XC0,0XFC,0X02,0X00,0X01,0XC0,
0X03,0X80,0X00,0XFF,0XFF,0XFF,0XE0,0X07,0XFF,0XFF,0XC0,0X00,0X0F,0X00,0X01,0XC0,
0X03,0X80,0X00,0XFF,0XFF,0XFF,0XF8,0X00,0X1F,0XFF,0X80,0X00,0X1F,0X80,0X01,0XC0,
0X03,0X80,0X00,0XFF,0XFF,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X0F,0X80,0X01,0XC0,
0X03,0X80,0X00,0XFF,0X80,0X7F,0XFF,0XF0,0X00,0X00,0X07,0X0F,0X8F,0XC0,0X01,0XC0,
0X03,0X80,0X01,0XFC,0X00,0X1F,0XFF,0XFC,0X03,0XF8,0X07,0X8F,0X8F,0XE0,0X01,0XC0,
0X03,0X80,0X01,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00,0X1F,0XC0,0X03,0XE0,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0X80,0X03,0X80,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X06,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC0,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00
};

 

ua6em
ua6em аватар
Offline
Зарегистрирован: 17.08.2016

не компилируется
 


sketch_enshtein:99:36: error: 'class Adafruit_ST7735' has no member named 'Color565'; did you mean 'color565'?
   99 |  drawBitmap_(0,0,ris_1,128,160,tft.Color565(255,255,255),tft.Color565(0,0,0));
      |                                    ^~~~~~~~
      |                                    color565
sketch_enshtein:99:62: error: 'class Adafruit_ST7735' has no member named 'Color565'; did you mean 'color565'?
   99 |  drawBitmap_(0,0,ris_1,128,160,tft.Color565(255,255,255),tft.Color565(0,0,0));
      |                                                              ^~~~~~~~
      |                                                              color565
sketch_enshtein:100:36: error: 'class Adafruit_ST7735' has no member named 'Color565'; did you mean 'color565'?
  100 |  drawBitmap_(0,0,ris_2,128,160,tft.Color565(255,255,255),tft.Color565(150,150,50));
      |                                    ^~~~~~~~
      |                                    color565
sketch_enshtein:100:62: error: 'class Adafruit_ST7735' has no member named 'Color565'; did you mean 'color565'?
  100 |  drawBitmap_(0,0,ris_2,128,160,tft.Color565(255,255,255),tft.Color565(150,150,50));
      |                                                              ^~~~~~~~
      |                                                              color565

'class Adafruit_ST7735' has no member named 'Color565'; did you mean 'color565'?

 

andycat
andycat аватар
Offline
Зарегистрирован: 07.09.2017

lilik, ну нет вариантов натянуть сову на глобус)
У atmega328p есть свой предел и у дисплея тоже, если выкините adafrut библиотеки и начнёте напрямую с дисплеем общаться, будет побыстрее, но глобально для мультиков менять МК!

lilik
Offline
Зарегистрирован: 19.10.2017

ua6em пишет:

не компилируется

По переводу понял что с маленькой буквы надо писать Color, но у меня в библиотеке с большой в функции:

// Pass 8-bit (each) R,G,B, get back 16-bit packed color
uint16_t Adafruit_ST7735::Color565(uint8_t r, uint8_t g, uint8_t b) 
{
  return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
}

Может посмотрите у себя в файле "адафрукт ST_7735".cpp с большой или с маленькой.

lilik
Offline
Зарегистрирован: 19.10.2017

andycat пишет:
lilik, ну нет вариантов натянуть сову на глобус) У atmega328p есть свой предел и у дисплея тоже, если выкините adafrut библиотеки и начнёте напрямую с дисплеем общаться, будет побыстрее, но глобально для мультиков менять МК!

Ну всё равно, принципиально эти варианты на порядок лучше чем по точечный вывод картинки. Как напрямую работать статей толковых в интернете не видел. 

andycat
andycat аватар
Offline
Зарегистрирован: 07.09.2017

Дык статей и не будет, даташит и вперёд, руками отправляем в spi нужные команды и будет счастье.
Я с ili9341 тупо нашёл самую простую библиотеку, её разобрал по косточкам и просто что то добавил.
Adafrut библиотеки мне кажется слишком перегружена универсальностью (

ua6em
ua6em аватар
Offline
Зарегистрирован: 17.08.2016

lilik пишет:

ua6em пишет:

не компилируется

По переводу понял что с маленькой буквы надо писать Color, но у меня в библиотеке с большой в функции:

// Pass 8-bit (each) R,G,B, get back 16-bit packed color
uint16_t Adafruit_ST7735::Color565(uint8_t r, uint8_t g, uint8_t b) 
{
  return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
}

Может посмотрите у себя в файле "адафрукт ST_7735".cpp с большой или с маленькой.

у меня такой функции вообще нет, библиотеку поставил сейчас с сайта arduino.cc 1.9 версии, но и в прежней не было
а цвета перевожу своей функцией, правда  ее адриано поправил, у меня было в лоб...
 

// функция перекодировки цвета в формат библиотеки Adafruin_GFX
//
uint16_t setColor(uint8_t red, uint8_t green, uint8_t blue) {

  //uint16_t color = ((red & 0xf8)<<11) + ((green & 0xfc) <<5) + (blue & 0xf8); //uint16_t(r5-g6-b5 bit)
  uint16_t color = ((red & 0x0b11111000) << 11) + ((green & 0b11111100) << 5 ) + (blue & 0b11111000);
  return color;
}

я на RP2040 пробую, пока не взлетело, почему-то картинка не выводится, loop отрабатывает

lilik
Offline
Зарегистрирован: 19.10.2017

ua6em пишет:

...почему-то картинка не выводится, loop отрабатывает

Из 114 сообщения тест раскраски можно попробовать.

Адафрутовскую функцию можно в скетч вставить, только хвост tft. откинуть от tft.Color565(255,255,255);

ua6em
ua6em аватар
Offline
Зарегистрирован: 17.08.2016

lilik пишет:

ua6em пишет:

...почему-то картинка не выводится, loop отрабатывает

Из 114 сообщения тест раскраски можно попробовать.

Адафрутовскую функцию можно в скетч вставить, только хвост tft. откинуть от tft.Color565(255,255,255);

я на свою поменял, кстати адриано похоже поправил неправильно,  у меня было так -
 

  /* *
    red = red * 31 / 255;
    green = green * 63 / 255;
    blue = blue * 31 / 255;
    uint16_t color = ((uint16_t)red<<11) +((uint16_t)green <<5) +  blue;
  * */

Я картинки прямо в скетч вставил, правильно?

lilik
Offline
Зарегистрирован: 19.10.2017

У меня отдельный файл в папке со скетчем, назвал его ris.c

#include <avr/pgmspace.h>

const unsigned char ris_1[]PROGMEM = {
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3C,0X78,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XFC,0X7F,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFC,0X7F,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFC,0X7F,0XFF,0X10,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X31,0XFF,0XFC,0X7F,0XFF,0X1C,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0XF1,0XFF,0XFC,0X7F,0XFF,0X1F,0X80,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X03,0XF0,0XFF,0XFC,0X7F,0XFE,0X1F,0XE0,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X0F,0XF8,0XFF,0XFC,0X7F,0XFE,0X3F,0XF0,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X3F,0XF8,0XFF,0XFC,0X7F,0XFE,0X3F,0XFC,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0XFF,0XFC,0X7F,0XFC,0X7F,0XFC,0X3F,0XFE,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X03,0XFF,0XFC,0X7F,0XFC,0X7F,0XFC,0X7F,0XFF,0X80,0X00,0X00,0X00,
0X00,0X00,0X00,0X01,0XFF,0XFC,0X3F,0XFC,0X7F,0XFC,0X7F,0XFF,0X80,0X00,0X00,0X00,
0X00,0X00,0X00,0X01,0XFF,0XFE,0X3F,0XFC,0X7F,0XF8,0X7F,0XFF,0X08,0X00,0X00,0X00,
0X00,0X00,0X00,0X10,0XFF,0XFE,0X3F,0XFC,0X7F,0XF8,0XFF,0XFF,0X1C,0X00,0X00,0X00,
0X00,0X00,0X00,0X38,0X7F,0XFE,0X1F,0XFC,0X7F,0XF8,0XFF,0X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X00,0X00,0XFF,0XFE,0X0F,0XC0,0X00,
0X00,0X07,0XF8,0X3F,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFC,0X1F,0XE0,0X00,
0X00,0X07,0XFC,0X1F,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XF0,0X7F,0XF0,0X00,
0X00,0X0F,0XFF,0X07,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XE0,0XFF,0XF0,0X00,
0X00,0X0F,0XFF,0X83,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0X81,0XFF,0XF8,0X00,
0X00,0X1F,0XFF,0XC1,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0X07,0XFF,0XF8,0X00,
0X00,0X1F,0XFF,0XF0,0X60,0X00,0X00,0X00,0X00,0X00,0X00,0X06,0X0F,0XFF,0XFC,0X00,
0X00,0X3F,0XFF,0XF8,0X20,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0XFF,0XFC,0X00,
0X00,0X3F,0XFF,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XFE,0X00,
0X00,0X3F,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE,0X00,
0X00,0X7F,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0XFE,0X00,
0X00,0X7F,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XF8,0X00,
0X00,0X0F,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XC0,0X00,
0X00,0X01,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XFF,0X00,0X00,
0X00,0X80,0X3F,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XF8,0X03,0X80,
0X01,0XF0,0X03,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0XE0,0X1F,0X80,
0X01,0XFE,0X00,0X78,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0X00,0X7F,0X80,
0X01,0XFF,0XC0,0X18,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1C,0X03,0XFF,0X80,
0X01,0XFF,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0XFF,0XC0,
0X01,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XC0,
0X01,0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XE0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XE0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XE0,
0X03,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XE0,
0X07,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XE0,
0X07,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XE0,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X07,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XE0,
0X07,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XE0,
0X07,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XC0,
0X07,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X07,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X07,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XFF,0XFF,0X80,
0X03,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0X80,
0X03,0XFF,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0XFF,0X80,
0X01,0XFF,0XC0,0X38,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X18,0X03,0XFF,0X80,
0X01,0XFE,0X00,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1E,0X00,0X7F,0X80,
0X01,0XF8,0X07,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XC0,0X0F,0X80,
0X01,0XC0,0X1F,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XFC,0X01,0X00,
0X00,0X00,0XFF,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0X80,0X00,
0X00,0X03,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XFF,0XF0,0X00,
0X00,0X1F,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0XFE,0X00,
0X00,0X7F,0XFF,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0XFE,0X00,
0X00,0X7F,0XFF,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0XFC,0X00,
0X00,0X7F,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XFF,0XFC,0X00,
0X00,0X3F,0XFF,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X04,0X1F,0XFF,0XFC,0X00,
0X00,0X3F,0XFF,0XF0,0X60,0X00,0X00,0X00,0X00,0X00,0X00,0X06,0X0F,0XFF,0XF8,0X00,
0X00,0X1F,0XFF,0XE0,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0X83,0XFF,0XF8,0X00,
0X00,0X1F,0XFF,0X81,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X1F,0XC1,0XFF,0XF0,0X00,
0X00,0X0F,0XFF,0X07,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0XE0,0XFF,0XF0,0X00,
0X00,0X0F,0XFE,0X0F,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X7F,0XF8,0X3F,0XE0,0X00,
0X00,0X07,0XF8,0X3F,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFC,0X1F,0XE0,0X00,
0X00,0X03,0XF0,0X7F,0XFF,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFE,0X0F,0XC0,0X00,
0X00,0X03,0XC0,0XFF,0XFE,0X00,0X00,0X00,0X00,0X00,0X04,0X7F,0XFF,0X83,0X80,0X00,
0X00,0X01,0X83,0XFF,0XFC,0X38,0X00,0X00,0X00,0X00,0X1C,0X3F,0XFF,0XC1,0X80,0X00,
0X00,0X00,0X07,0XFF,0XFC,0X7C,0X00,0X00,0X00,0X00,0X3E,0X1F,0XFF,0XE0,0X00,0X00,
0X00,0X00,0X1F,0XFF,0XF8,0X7F,0X00,0X00,0X00,0X00,0XFF,0X0F,0XFF,0XF8,0X00,0X00,
0X00,0X00,0X3F,0XFF,0XF0,0XFF,0XE0,0X00,0X00,0X07,0XFF,0X8F,0XFF,0XFC,0X00,0X00,
0X00,0X00,0X7F,0XFF,0XE1,0XFF,0XE0,0X00,0X00,0X07,0XFF,0X87,0XFF,0XFC,0X00,0X00,
0X00,0X00,0X3F,0XFF,0XE3,0XFF,0XC7,0XC0,0X07,0XE3,0XFF,0XC3,0XFF,0XF8,0X00,0X00,
0X00,0X00,0X1F,0XFF,0XC3,0XFF,0XC7,0XFE,0X3F,0XE3,0XFF,0XE1,0XFF,0XF0,0X00,0X00,
0X00,0X00,0X0F,0XFF,0X87,0XFF,0XC7,0XFE,0X3F,0XF1,0XFF,0XE1,0XFF,0XE0,0X00,0X00,
0X00,0X00,0X07,0XFF,0X0F,0XFF,0X8F,0XFE,0X3F,0XF1,0XFF,0XF0,0XFF,0XC0,0X00,0X00,
0X00,0X00,0X03,0XFF,0X1F,0XFF,0X8F,0XFE,0X3F,0XF0,0XFF,0XF8,0X7F,0XC0,0X00,0X00,
0X00,0X00,0X01,0XFE,0X1F,0XFF,0X8F,0XFE,0X3F,0XF8,0XFF,0XFC,0X7F,0X00,0X00,0X00,
0X00,0X00,0X00,0XFC,0X3F,0XFF,0X0F,0XFE,0X3F,0XF8,0XFF,0XFC,0X3E,0X00,0X00,0X00,
0X00,0X00,0X00,0X78,0X7F,0XFF,0X1F,0XFE,0X3F,0XF8,0X7F,0XFE,0X1C,0X00,0X00,0X00,
0X00,0X00,0X00,0X38,0XFF,0XFF,0X1F,0XFE,0X3F,0XFC,0X7F,0XFF,0X08,0X00,0X00,0X00,
0X00,0X00,0X00,0X10,0XFF,0XFE,0X1F,0XFE,0X3F,0XFC,0X7F,0XFF,0X80,0X00,0X00,0X00,
0X00,0X00,0X00,0X01,0XFF,0XFE,0X3F,0XFE,0X3F,0XFC,0X3F,0XFF,0X80,0X00,0X00,0X00,
0X00,0X00,0X00,0X01,0XFF,0XFE,0X3F,0XFE,0X3F,0XFE,0X3F,0XFF,0XC0,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X7F,0XFC,0X3F,0XFE,0X3F,0XFE,0X3F,0XFF,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X3F,0XFC,0X7F,0XFE,0X3F,0XFF,0X1F,0XFC,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X0F,0XFC,0X7F,0XFE,0X3F,0XFF,0X1F,0XF0,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X07,0XF8,0X7F,0XFE,0X3F,0XFF,0X0F,0XC0,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X01,0XF8,0XFF,0XFE,0X3F,0XFF,0X8F,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X38,0XFF,0XFE,0X3F,0XFF,0X8C,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X08,0XFF,0XFE,0X3F,0XFF,0XC0,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFE,0X3F,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X03,0XFE,0X3F,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X1E,0X3C,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00
};

 

lilik
Offline
Зарегистрирован: 19.10.2017

ua6em пишет:

... но и в прежней не было

Самое смешное - не могу вспомнить где я брал вариант библиотеки. На гитхабе смотрел- нет функции этой нигде.

ua6em
ua6em аватар
Offline
Зарегистрирован: 17.08.2016

lilik пишет:

ua6em пишет:

... но и в прежней не было

Самое смешное - не могу вспомнить где я брал вариант библиотеки. На гитхабе смотрел- нет функции этой нигде.

много ссылок, что скетчи ругаются на эту функцию, так надо проверить, в функции 100500 байт цвета blue правильно переводится..сейчас буду проверять, что-то мне адриано не то подсказал, чую
Я жеж под rp2040 пока не одолел, висит в твоей функции, всё выводит да выводит, но на экране ничего...

andriano
andriano аватар
Offline
Зарегистрирован: 20.06.2015

см. сообщение 129

ua6em
ua6em аватар
Offline
Зарегистрирован: 17.08.2016

как бы пространственные рассуждения о точности цветопередачи при перекодировании в формат 565 и скетч, адриано заблуждался )))
 

void setup() {
  Serial.begin(115200);
  delay(5000);
  for (int i = 0; i <= 255; i++) {
    Serial.print(i);
    Serial.print(" ua6em =");
    Serial.print(i * 31 / 255);
    Serial.print("    andriano =");
    Serial.print(i  & 0xf8);
    Serial.print(" lilik =");
    Serial.println(i >> 3);
  }
}

void loop() {
}
0 ua6em =0    andriano =0 lilik =0
1 ua6em =0    andriano =0 lilik =0
2 ua6em =0    andriano =0 lilik =0
3 ua6em =0    andriano =0 lilik =0
4 ua6em =0    andriano =0 lilik =0
5 ua6em =0    andriano =0 lilik =0
6 ua6em =0    andriano =0 lilik =0
7 ua6em =0    andriano =0 lilik =0
8 ua6em =0    andriano =8 lilik =1
9 ua6em =1    andriano =8 lilik =1
10 ua6em =1    andriano =8 lilik =1
11 ua6em =1    andriano =8 lilik =1
12 ua6em =1    andriano =8 lilik =1
13 ua6em =1    andriano =8 lilik =1
14 ua6em =1    andriano =8 lilik =1
15 ua6em =1    andriano =8 lilik =1
16 ua6em =1    andriano =16 lilik =2
17 ua6em =2    andriano =16 lilik =2
18 ua6em =2    andriano =16 lilik =2
19 ua6em =2    andriano =16 lilik =2
20 ua6em =2    andriano =16 lilik =2
21 ua6em =2    andriano =16 lilik =2
22 ua6em =2    andriano =16 lilik =2
23 ua6em =2    andriano =16 lilik =2
24 ua6em =2    andriano =24 lilik =3
25 ua6em =3    andriano =24 lilik =3
26 ua6em =3    andriano =24 lilik =3
27 ua6em =3    andriano =24 lilik =3
28 ua6em =3    andriano =24 lilik =3
29 ua6em =3    andriano =24 lilik =3
30 ua6em =3    andriano =24 lilik =3
31 ua6em =3    andriano =24 lilik =3
32 ua6em =3    andriano =32 lilik =4
33 ua6em =4    andriano =32 lilik =4
34 ua6em =4    andriano =32 lilik =4
35 ua6em =4    andriano =32 lilik =4
36 ua6em =4    andriano =32 lilik =4
37 ua6em =4    andriano =32 lilik =4
38 ua6em =4    andriano =32 lilik =4
39 ua6em =4    andriano =32 lilik =4
40 ua6em =4    andriano =40 lilik =5
41 ua6em =4    andriano =40 lilik =5
42 ua6em =5    andriano =40 lilik =5
43 ua6em =5    andriano =40 lilik =5
44 ua6em =5    andriano =40 lilik =5
45 ua6em =5    andriano =40 lilik =5
46 ua6em =5    andriano =40 lilik =5
47 ua6em =5    andriano =40 lilik =5
48 ua6em =5    andriano =48 lilik =6
49 ua6em =5    andriano =48 lilik =6
50 ua6em =6    andriano =48 lilik =6
51 ua6em =6    andriano =48 lilik =6
52 ua6em =6    andriano =48 lilik =6
53 ua6em =6    andriano =48 lilik =6
54 ua6em =6    andriano =48 lilik =6
55 ua6em =6    andriano =48 lilik =6
56 ua6em =6    andriano =56 lilik =7
57 ua6em =6    andriano =56 lilik =7
58 ua6em =7    andriano =56 lilik =7
59 ua6em =7    andriano =56 lilik =7
60 ua6em =7    andriano =56 lilik =7
61 ua6em =7    andriano =56 lilik =7
62 ua6em =7    andriano =56 lilik =7
63 ua6em =7    andriano =56 lilik =7
64 ua6em =7    andriano =64 lilik =8
65 ua6em =7    andriano =64 lilik =8
66 ua6em =8    andriano =64 lilik =8
67 ua6em =8    andriano =64 lilik =8
68 ua6em =8    andriano =64 lilik =8
69 ua6em =8    andriano =64 lilik =8
70 ua6em =8    andriano =64 lilik =8
71 ua6em =8    andriano =64 lilik =8
72 ua6em =8    andriano =72 lilik =9
73 ua6em =8    andriano =72 lilik =9
74 ua6em =8    andriano =72 lilik =9
75 ua6em =9    andriano =72 lilik =9
76 ua6em =9    andriano =72 lilik =9
77 ua6em =9    andriano =72 lilik =9
78 ua6em =9    andriano =72 lilik =9
79 ua6em =9    andriano =72 lilik =9
80 ua6em =9    andriano =80 lilik =10
81 ua6em =9    andriano =80 lilik =10
82 ua6em =9    andriano =80 lilik =10
83 ua6em =10    andriano =80 lilik =10
84 ua6em =10    andriano =80 lilik =10
85 ua6em =10    andriano =80 lilik =10
86 ua6em =10    andriano =80 lilik =10
87 ua6em =10    andriano =80 lilik =10
88 ua6em =10    andriano =88 lilik =11
89 ua6em =10    andriano =88 lilik =11
90 ua6em =10    andriano =88 lilik =11
91 ua6em =11    andriano =88 lilik =11
92 ua6em =11    andriano =88 lilik =11
93 ua6em =11    andriano =88 lilik =11
94 ua6em =11    andriano =88 lilik =11
95 ua6em =11    andriano =88 lilik =11
96 ua6em =11    andriano =96 lilik =12
97 ua6em =11    andriano =96 lilik =12
98 ua6em =11    andriano =96 lilik =12
99 ua6em =12    andriano =96 lilik =12
100 ua6em =12    andriano =96 lilik =12
101 ua6em =12    andriano =96 lilik =12
102 ua6em =12    andriano =96 lilik =12
103 ua6em =12    andriano =96 lilik =12
104 ua6em =12    andriano =104 lilik =13
105 ua6em =12    andriano =104 lilik =13
106 ua6em =12    andriano =104 lilik =13
107 ua6em =13    andriano =104 lilik =13
108 ua6em =13    andriano =104 lilik =13
109 ua6em =13    andriano =104 lilik =13
110 ua6em =13    andriano =104 lilik =13
111 ua6em =13    andriano =104 lilik =13
112 ua6em =13    andriano =112 lilik =14
113 ua6em =13    andriano =112 lilik =14
114 ua6em =13    andriano =112 lilik =14
115 ua6em =13    andriano =112 lilik =14
116 ua6em =14    andriano =112 lilik =14
117 ua6em =14    andriano =112 lilik =14
118 ua6em =14    andriano =112 lilik =14
119 ua6em =14    andriano =112 lilik =14
120 ua6em =14    andriano =120 lilik =15
121 ua6em =14    andriano =120 lilik =15
122 ua6em =14    andriano =120 lilik =15
123 ua6em =14    andriano =120 lilik =15
124 ua6em =15    andriano =120 lilik =15
125 ua6em =15    andriano =120 lilik =15
126 ua6em =15    andriano =120 lilik =15
127 ua6em =15    andriano =120 lilik =15
128 ua6em =15    andriano =128 lilik =16
129 ua6em =15    andriano =128 lilik =16
130 ua6em =15    andriano =128 lilik =16
131 ua6em =15    andriano =128 lilik =16
132 ua6em =16    andriano =128 lilik =16
133 ua6em =16    andriano =128 lilik =16
134 ua6em =16    andriano =128 lilik =16
135 ua6em =16    andriano =128 lilik =16
136 ua6em =16    andriano =136 lilik =17
137 ua6em =16    andriano =136 lilik =17
138 ua6em =16    andriano =136 lilik =17
139 ua6em =16    andriano =136 lilik =17
140 ua6em =17    andriano =136 lilik =17
141 ua6em =17    andriano =136 lilik =17
142 ua6em =17    andriano =136 lilik =17
143 ua6em =17    andriano =136 lilik =17
144 ua6em =17    andriano =144 lilik =18
145 ua6em =17    andriano =144 lilik =18
146 ua6em =17    andriano =144 lilik =18
147 ua6em =17    andriano =144 lilik =18
148 ua6em =17    andriano =144 lilik =18
149 ua6em =18    andriano =144 lilik =18
150 ua6em =18    andriano =144 lilik =18
151 ua6em =18    andriano =144 lilik =18
152 ua6em =18    andriano =152 lilik =19
153 ua6em =18    andriano =152 lilik =19
154 ua6em =18    andriano =152 lilik =19
155 ua6em =18    andriano =152 lilik =19
156 ua6em =18    andriano =152 lilik =19
157 ua6em =19    andriano =152 lilik =19
158 ua6em =19    andriano =152 lilik =19
159 ua6em =19    andriano =152 lilik =19
160 ua6em =19    andriano =160 lilik =20
161 ua6em =19    andriano =160 lilik =20
162 ua6em =19    andriano =160 lilik =20
163 ua6em =19    andriano =160 lilik =20
164 ua6em =19    andriano =160 lilik =20
165 ua6em =20    andriano =160 lilik =20
166 ua6em =20    andriano =160 lilik =20
167 ua6em =20    andriano =160 lilik =20
168 ua6em =20    andriano =168 lilik =21
169 ua6em =20    andriano =168 lilik =21
170 ua6em =20    andriano =168 lilik =21
171 ua6em =20    andriano =168 lilik =21
172 ua6em =20    andriano =168 lilik =21
173 ua6em =21    andriano =168 lilik =21
174 ua6em =21    andriano =168 lilik =21
175 ua6em =21    andriano =168 lilik =21
176 ua6em =21    andriano =176 lilik =22
177 ua6em =21    andriano =176 lilik =22
178 ua6em =21    andriano =176 lilik =22
179 ua6em =21    andriano =176 lilik =22
180 ua6em =21    andriano =176 lilik =22
181 ua6em =22    andriano =176 lilik =22
182 ua6em =22    andriano =176 lilik =22
183 ua6em =22    andriano =176 lilik =22
184 ua6em =22    andriano =184 lilik =23
185 ua6em =22    andriano =184 lilik =23
186 ua6em =22    andriano =184 lilik =23
187 ua6em =22    andriano =184 lilik =23
188 ua6em =22    andriano =184 lilik =23
189 ua6em =22    andriano =184 lilik =23
190 ua6em =23    andriano =184 lilik =23
191 ua6em =23    andriano =184 lilik =23
192 ua6em =23    andriano =192 lilik =24
193 ua6em =23    andriano =192 lilik =24
194 ua6em =23    andriano =192 lilik =24
195 ua6em =23    andriano =192 lilik =24
196 ua6em =23    andriano =192 lilik =24
197 ua6em =23    andriano =192 lilik =24
198 ua6em =24    andriano =192 lilik =24
199 ua6em =24    andriano =192 lilik =24
200 ua6em =24    andriano =200 lilik =25
201 ua6em =24    andriano =200 lilik =25
202 ua6em =24    andriano =200 lilik =25
203 ua6em =24    andriano =200 lilik =25
204 ua6em =24    andriano =200 lilik =25
205 ua6em =24    andriano =200 lilik =25
206 ua6em =25    andriano =200 lilik =25
207 ua6em =25    andriano =200 lilik =25
208 ua6em =25    andriano =208 lilik =26
209 ua6em =25    andriano =208 lilik =26
210 ua6em =25    andriano =208 lilik =26
211 ua6em =25    andriano =208 lilik =26
212 ua6em =25    andriano =208 lilik =26
213 ua6em =25    andriano =208 lilik =26
214 ua6em =26    andriano =208 lilik =26
215 ua6em =26    andriano =208 lilik =26
216 ua6em =26    andriano =216 lilik =27
217 ua6em =26    andriano =216 lilik =27
218 ua6em =26    andriano =216 lilik =27
219 ua6em =26    andriano =216 lilik =27
220 ua6em =26    andriano =216 lilik =27
221 ua6em =26    andriano =216 lilik =27
222 ua6em =26    andriano =216 lilik =27
223 ua6em =27    andriano =216 lilik =27
224 ua6em =27    andriano =224 lilik =28
225 ua6em =27    andriano =224 lilik =28
226 ua6em =27    andriano =224 lilik =28
227 ua6em =27    andriano =224 lilik =28
228 ua6em =27    andriano =224 lilik =28
229 ua6em =27    andriano =224 lilik =28
230 ua6em =27    andriano =224 lilik =28
231 ua6em =28    andriano =224 lilik =28
232 ua6em =28    andriano =232 lilik =29
233 ua6em =28    andriano =232 lilik =29
234 ua6em =28    andriano =232 lilik =29
235 ua6em =28    andriano =232 lilik =29
236 ua6em =28    andriano =232 lilik =29
237 ua6em =28    andriano =232 lilik =29
238 ua6em =28    andriano =232 lilik =29
239 ua6em =29    andriano =232 lilik =29
240 ua6em =29    andriano =240 lilik =30
241 ua6em =29    andriano =240 lilik =30
242 ua6em =29    andriano =240 lilik =30
243 ua6em =29    andriano =240 lilik =30
244 ua6em =29    andriano =240 lilik =30
245 ua6em =29    andriano =240 lilik =30
246 ua6em =29    andriano =240 lilik =30
247 ua6em =30    andriano =240 lilik =30
248 ua6em =30    andriano =248 lilik =31
249 ua6em =30    andriano =248 lilik =31
250 ua6em =30    andriano =248 lilik =31
251 ua6em =30    andriano =248 lilik =31
252 ua6em =30    andriano =248 lilik =31
253 ua6em =30    andriano =248 lilik =31
254 ua6em =30    andriano =248 lilik =31
255 ua6em =31    andriano =248 lilik =31

 

ua6em
ua6em аватар
Offline
Зарегистрирован: 17.08.2016

я тут чуток порассуждал и пришёл к выводу, что правильней функцию сделать так:

// Pass 8-bit (each) R,G,B, get back 16-bit packed color
uint16_t Adafruit_ST7735::Color565(uint8_t r, uint8_t g, uint8_t b) 
{
r = r >>3;
g = g >>2;
b = b >>3;
  return ((r << 11) + (g  << 5) + b;
}

 

andriano
andriano аватар
Offline
Зарегистрирован: 20.06.2015

ua6em, что-то не могу найти своего исходного сообщения. Но, не исключено, я там действительно напутал.

Правильные варианты:

((r & 0xf8) << 8) | ((g & 0xfc) << 3) | (b >> 3)

или

((r >>3) << 11) | ((g >>2) << 5) | (b >> 3)

Эти варианты эквивалентны.

Кроме того, | можно заменить на +.

ua6em
ua6em аватар
Offline
Зарегистрирован: 17.08.2016

andriano пишет:

Кроме того, | можно заменить на +.

проверил, если в расчётах перевести на флоат (что не правильно) всё равно разброс по переводным данным, правильно - отбросить незначащие биты, а это только сдвиг...
Я в два захода приводил, так как пока не отложилось, что делается вначале, что слева, что справа (для однозначности)...ты показал, осталось запомнить )))

перевод обсуждали тут

lilik
Offline
Зарегистрирован: 19.10.2017
//функция перевода 24 битного RGB в 16 битный 565 цвет
uint16_t R_G_B(byte r,byte g,byte b)
{
  uint16_t code = 0;
    code = (g & 0x1f) << 11;
    code |= (r & 0x3f) << 5;
    code |= (b & 0x1f) << 0;
  return code;  
}

Вот такой вариант использовал на матрице ws2812b, взял на забугорном форуме.

andycat
andycat аватар
Offline
Зарегистрирован: 07.09.2017

из JPG на экран выводил так, тоже с какого то форума:

					*(outPtr+currentX*this->_bppTFT/8) = ((g & 0x1C) << 3) | (b  >> 3);
					*(outPtr+currentX*this->_bppTFT/8+1) = (r & 0xF8) | (g >> 5);

 

andriano
andriano аватар
Offline
Зарегистрирован: 20.06.2015

ua6em пишет:

всё равно разброс по переводным данным, правильно - отбросить незначащие биты, а это только сдвиг...

Вы сами себе противоречите: логическое И - это и есть "отбросить незначащие биты". Так что не "только сдвиг".

И в связи с отмеченным выше, совершенно непонятно, откуда у Вас появился "разброс по переводимым данным".

andriano
andriano аватар
Offline
Зарегистрирован: 20.06.2015

lilik пишет:

//функция перевода 24 битного RGB в 16 битный 565 цвет
uint16_t R_G_B(byte r,byte g,byte b)
{
  uint16_t code = 0;
    code = (g & 0x1f) << 11;
    code |= (r & 0x3f) << 5;
    code |= (b & 0x1f) << 0;
  return code;  
}

Вот такой вариант использовал на матрице ws2812b, взял на забугорном форуме.

А этот вариант заведомо неправильный - он вместо младших отбрасывает старшие биты. 

На примере десятичной арифметики это как бы число 53 округлять не до 50, а до 3.

Ну и второе - ws2812 требует 24-разрядного цвета, зачем там приводить к 16 разрядам?

ua6em
ua6em аватар
Offline
Зарегистрирован: 17.08.2016

andriano пишет:

И в связи с отмеченным выше, совершенно непонятно, откуда у Вас появился "разброс по переводимым данным".

ну я то изначально делю 31 или 63 на 255, в этом случае вся дробная часть (хоть это 0.999) отбрасывается, от того и разброс...
я вот только не знаю, в C++ сдвиг с переносом старших  (или младших) битов идет или без оных, если с переносом, то сначала надо незначащие биты обнулить, тогда сперва логическое & а потом сдвиг

ua6em
ua6em аватар
Offline
Зарегистрирован: 17.08.2016

что-то никак не одолею с этой RP2040, на экран при инициализации вывожу заставку, она и висит, скетч далее такой:
ЗЫ сейчас раз в секунду в монитор порта летит - работаю )))
 

void loop() {
  tft.setRotation(0);
  drawBitmap_(0, 0, ris_1, 128, 160, ST77XX_WHITE /*setColor(255, 255, 255)*/, ST77XX_BLACK /*setColor(0, 0, 0)*/);
  drawBitmap_(0, 0, ris_2, 128, 160, ST77XX_WHITE /*setColor(255, 255, 255)*/, ST77XX_RED/*setColor(150, 150, 50)*/);
  Serial.println("работаю");
}

/////////////////////////////////////////////////////////////////////
void drawBitmap_(int x, int y, const uint8_t *bitmap, int w, int h, const uint16_t color_1, const uint16_t color_2) {
  if (x < 0 || x + w > 128 || y < 0 || y + h > 160) {
    return;
  }
  tft.setAddrWindow(x, y, x + w - 1, y + h - 1);
  int16_t i, j, byteWidth = (w + 7) / 8;
  uint8_t byte;
  for (j = 0; j < h; j++) {
    for (i = 0; i < w; i++) {
      if (i & 7) {byte <<= 1; /*Serial.println("in if");*/
      }else{ byte   = pgm_read_byte(bitmap + j * byteWidth + i / 8);/*Serial.print(byte);Serial.println(" - in else");*/}
      if (byte & 0x80)
      {
        tft.pushColor(color_1 ); /*Serial.println("цвет 1");*/
      }
      else {
        tft.pushColor(color_2 ); /*Serial.println("цвет 2");*/
      }
    }
  }
}
/////////////////////////////////////////////////////////////////////

 

andriano
andriano аватар
Offline
Зарегистрирован: 20.06.2015

ua6em пишет:

ну я то изначально делю 31 или 63 на 255, в этом случае вся дробная часть (хоть это 0.999) отбрасывается, от того и разброс...

Деление - очень медленная операция. Применять ее трижды для каждого пикселя - очень неэффективное решение.

Цитата:

я вот только не знаю, в C++ сдвиг с переносом старших  (или младших) битов идет или без оных, если с переносом, то сначала надо незначащие биты обнулить, тогда сперва логическое & а потом сдвиг

В Си сдвиг не циклический, если Вы это имеете в виду.

Циклический сдвиг реализуется примерно так (для 16-разрядного целого):

x = (x >> k) | (x << (16-k));

andriano
andriano аватар
Offline
Зарегистрирован: 20.06.2015

ua6em, а что это за 

uint8_t byte;

?

Я бы поостерегся так называть переменную.

lilik
Offline
Зарегистрирован: 19.10.2017

andriano пишет:

[

Ну и второе - ws2812 требует 24-разрядного цвета, зачем там приводить к 16 разрядам?

Для пользования библиотекой "адафрукт GFX"

Кстати именно из неё запись про byte.

lilik
Offline
Зарегистрирован: 19.10.2017

И ещё: про функцию Color565. У меня в иде встроена библиотека TFT. А она лишь ширма для адафрутовской GFX и ST7735. А вот уже в ней и есть эта функция. Я не знал, у меня получается дубликаты стоят.

ua6em
ua6em аватар
Offline
Зарегистрирован: 17.08.2016

andriano пишет:

ua6em, а что это за 

uint8_t byte;

?

Я бы поостерегся так называть переменную.

 я тоже, код сдёрнул у ТС, выше по теме, попробую заменить

lilik
Offline
Зарегистрирован: 19.10.2017

ua6em пишет:

andriano пишет:

ua6em, а что это за 

uint8_t byte;

?

Я бы поостерегся так называть переменную.

 я тоже, код сдёрнул у ТС, выше по теме, попробую заменить

Я тоже взял это из библиотеки.

Такой секундомер должен выйти.

Из вот такой ч/б.

lilik
Offline
Зарегистрирован: 19.10.2017

andriano пишет:

lilik пишет:

Отвлёкся я на скорость вывода картинки от вариаций раскрашивания. Пока в голову пришло три варианта - сектора цвета, градиент цвета и пиксель-ассорти. Какие ещё варианты могут быть?

 

... в которых цвет не жестко зависит от координат пикселя, а определяется самим изображением... 

Прорыв в нанотехнологиях :)

Догадался как выделять контур изображения. Функцию по наитию переделал.

//РИСУНОК преобразование в контур 3 цвета в картинке
#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library

#include <SPI.h>

#define TFT_CS     10
#define TFT_RST    9
#define TFT_DC     8

Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS,  TFT_DC, TFT_RST);

extern const unsigned char ris_1[];


void setup() {
  // put your setup code here, to run once:
  // Используйте этот инициализатор, если вы используете 1,8-дюймовый TFT
  tft.initR(INITR_BLACKTAB);   // initialize a ST7735S chip, black tab
  tft.fillScreen(ST7735_BLACK);
  tft.setRotation(0);//ориентация экрана

}

void loop() {
  drawBitmap_(0,0,ris_1,128,160,tft.Color565(255,255,255),tft.Color565(0,0,0),tft.Color565(75,75,0));
  delay(1000);
 }
/////////////////////////////////////////////////////////////////////////////////////////
void drawBitmap_(int x,int y, const uint8_t *bitmap,int16_t W ,int16_t H,const uint16_t color_1,const uint16_t color_2,const uint16_t color_3) {
 bool flag=true;// 
 if(x<0||x+W>128||y<0||y+H>160){return;} 
 unsigned char  lineBuf[W*2 ]; 
  int16_t i, j, byteWidth = (W + 7) / 8;
  uint8_t byte_;uint8_t byte_st;
  for (unsigned short j = 0; j < H; j++) {
    for (unsigned short i = 0; i < W; i++) {
      if(i & 7) {byte_ <<= 1;byte_st <<= 1;}
      else     { byte_   = pgm_read_byte(bitmap + j * byteWidth + i / 8);if(j>0){byte_st = pgm_read_byte(bitmap + (j-1) * byteWidth + i / 8);}}
     if(byte_ & 0x80)
     {
          if(flag||!(byte_st & 0x80)){lineBuf[i*2 ] =color_1/256 ; lineBuf[i * 2 + 1] =color_1%256 ;} // цвет контура
          else{lineBuf[i*2 ] =color_3/256 ; lineBuf[i * 2 + 1] =color_3%256 ;} //  цвет раскраски внутри контура
     flag=false;
        } else {
          if(!flag||byte_st & 0x80){ lineBuf[i*2 ] =color_1/256 ; lineBuf[i * 2 + 1] =color_1%256 ;} //цвет контура
          else{lineBuf[i*2 ] =color_2/256 ; lineBuf[i * 2 + 1] =color_2%256 ;} // цвет фона
      flag=true; 
        }
    }
    
    tft.setAddrWindow(x+0, y+j, x+W-1, y+j);
    ///
    SPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
    digitalWrite(TFT_DC, HIGH);
    digitalWrite(TFT_CS, LOW);
    SPI.transfer(&lineBuf, 2*W);
    digitalWrite(TFT_CS, HIGH);
    SPI.endTransaction();
    ///
  }
  
}
//////////////////////////////////////////////////////////////////////////////////////

andycat
andycat аватар
Offline
Зарегистрирован: 07.09.2017

Сколько кадров в секунду? Не меряли?

lilik
Offline
Зарегистрирован: 19.10.2017

На таком варианте 5 кадров в секунду.

//РИСУНОК преобразование в контур 3 цвета в картинке
#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library

#include <SPI.h>

#define TFT_CS     10
#define TFT_RST    9
#define TFT_DC     8

Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS,  TFT_DC, TFT_RST);

extern const unsigned char ris_1[];
int st=0;long Y=0;

void setup() {
  // put your setup code here, to run once:
  // Используйте этот инициализатор, если вы используете 1,8-дюймовый TFT
  tft.initR(INITR_BLACKTAB);   // initialize a ST7735S chip, black tab
  tft.fillScreen(ST7735_BLACK);
  tft.setRotation(0);//ориентация экрана
Serial.begin(9600);
}

void loop() {
 if(millis()-Y>10000){Y=millis();Serial.println(st/10);st=0;} 
  drawBitmap_(0,0,ris_1,128,160,tft.Color565(255,255,255),tft.Color565(0,0,0),tft.Color565(75,75,0));
  st++;
   drawBitmap_(0,0,ris_1,128,160,tft.Color565(255,0,0),tft.Color565(0,0,0),tft.Color565(75,175,0));
  st++;
 // delay(1000);
 }
/////////////////////////////////////////////////////////////////////////////////////////
void drawBitmap_(int x,int y, const uint8_t *bitmap,int16_t W ,int16_t H,const uint16_t color_1,const uint16_t color_2,const uint16_t color_3) {
 bool flag=true;// 
 if(x<0||x+W>128||y<0||y+H>160){return;} 
 unsigned char  lineBuf[W*2 ]; 
  int16_t i, j, byteWidth = (W + 7) / 8;
  uint8_t byte_;uint8_t byte_st;
  for (unsigned short j = 0; j < H; j++) {
    for (unsigned short i = 0; i < W; i++) {
      if(i & 7) {byte_ <<= 1;byte_st <<= 1;}
      else     { byte_   = pgm_read_byte(bitmap + j * byteWidth + i / 8);if(j>0){byte_st = pgm_read_byte(bitmap + (j-1) * byteWidth + i / 8);}}
     if(byte_ & 0x80)
     {
          if(flag||!(byte_st & 0x80)){lineBuf[i*2 ] =color_1/256 ; lineBuf[i * 2 + 1] =color_1%256 ;} // цвет контура
          else{lineBuf[i*2 ] =color_3/256 ; lineBuf[i * 2 + 1] =color_3%256 ;} //  цвет раскраски внутри контура
     flag=false;
        } else {
          if(!flag||byte_st & 0x80){ lineBuf[i*2 ] =color_1/256 ; lineBuf[i * 2 + 1] =color_1%256 ;} //цвет контура
          else{lineBuf[i*2 ] =color_2/256 ; lineBuf[i * 2 + 1] =color_2%256 ;} // цвет фона
      flag=true; 
        }
    }
    
    tft.setAddrWindow(x+0, y+j, x+W-1, y+j);
    ///
    SPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
    digitalWrite(TFT_DC, HIGH);
    digitalWrite(TFT_CS, LOW);
    SPI.transfer(&lineBuf, 2*W);
    digitalWrite(TFT_CS, HIGH);
    SPI.endTransaction();
    ///
  }
  
}
//////////////////////////////////////////////////////////////////////////////////////

 

lilik
Offline
Зарегистрирован: 19.10.2017

В принципе, при таком алгоритме выделения контура рисунка, можно контур сделать двухцветным - для большей выразительности по сравнению с исходным ч/б изображением.

lilik
Offline
Зарегистрирован: 19.10.2017
//РИСУНОК преобразование в контур (4 цвета в картинке)
#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library

#include <SPI.h>

#define TFT_CS     10
#define TFT_RST    9
#define TFT_DC     8

Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS,  TFT_DC, TFT_RST);

extern const unsigned char ris_1[];

void setup() {
  // put your setup code here, to run once:
  // Используйте этот инициализатор, если вы используете 1,8-дюймовый TFT
  tft.initR(INITR_BLACKTAB);   // initialize a ST7735S chip, black tab
  tft.fillScreen(ST7735_BLACK);
  tft.setRotation(0);//ориентация экрана

}

void loop() {
  drawBitmap_(0,0,ris_1,128,160,tft.Color565(255,255,255),tft.Color565(255,0,0),tft.Color565(0,0,0),tft.Color565(75,75,0));
  delay(1000);
 }
/////////////////////////////////////////////////////////////////////////////////////////
void drawBitmap_(int x,int y, const uint8_t *bitmap,int16_t W ,int16_t H,const uint16_t color_1,const uint16_t color_2,const uint16_t color_3,const uint16_t color_4) {
 bool flag=true;// 
 if(x<0||x+W>128||y<0||y+H>160){return;} 
 unsigned char  lineBuf[W*2 ]; 
  int16_t i, j, byteWidth = (W + 7) / 8;
  uint8_t byte_;uint8_t byte_st;
  for (unsigned short j = 0; j < H; j++) {
    for (unsigned short i = 0; i < W; i++) {
      if(i & 7) {byte_ <<= 1;byte_st <<= 1;}
      else     { byte_   = pgm_read_byte(bitmap + j * byteWidth + i / 8);if(j>0){byte_st = pgm_read_byte(bitmap + (j-1) * byteWidth + i / 8);}}
     if(byte_ & 0x80)
     {
          if(flag||!(byte_st & 0x80)){lineBuf[i*2 ] =color_1/256 ; lineBuf[i * 2 + 1] =color_1%256 ;} // цвет контура левого верхнего плана
          else{lineBuf[i*2 ] =color_4/256 ; lineBuf[i * 2 + 1] =color_4%256 ;} //  цвет раскраски внутри контура
     flag=false;
        } else {
          if(!flag||byte_st & 0x80){ lineBuf[i*2 ] =color_2/256 ; lineBuf[i * 2 + 1] =color_2%256 ;} //цвет контура правого нижнего плана
          else{lineBuf[i*2 ] =color_3/256 ; lineBuf[i * 2 + 1] =color_3%256 ;} // цвет фона
      flag=true; 
        }
    }
    
    tft.setAddrWindow(x+0, y+j, x+W-1, y+j);
    ///
    SPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
    digitalWrite(TFT_DC, HIGH);
    digitalWrite(TFT_CS, LOW);
    SPI.transfer(&lineBuf, 2*W);
    digitalWrite(TFT_CS, HIGH);
    SPI.endTransaction();
    ///
  }
  
}
//////////////////////////////////////////////////////////////////////////////////////

 

ua6em
ua6em аватар
Offline
Зарегистрирован: 17.08.2016

Нам учитель задаёт с иксами задачу...это я к тому, что только решил одну задачку, ты подкинул вторую...
Под Rasberry PI Pico RP2040 предыдущее заработало!!!

// РИСУНОК
#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library for ST7735
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789
#include <SPI.h>

#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || \
      defined(ARDUINO_GENERIC_RP2040) )

// замаркировать если используем наоборот
#define SPI01             // Дисплей на SPIO1, NRF24L01 на SPI0 (выбор между SPI0 и SPI1)
#if defined(SPI01)        // для RP2040 SPI1
#define TFT_CS        13  // GP13 - CS
#define TFT_RST       14  // GP14 - RESET
#define TFT_DC        15  // GP15 - A0
#define TFT_MISO      12  // GP12 - MISO (MISO, RX)
#define TFT_MOSI      11  // GP11 - SDA  (MOSI, TX)
#define TFT_SCLK      10  // GP10 - SCK
#else                     // для RP2040 SPI0
#define TFT_CS        5   // GP5 - CS
#define TFT_RST       6   // GP6 - RESET
#define TFT_DC        7   // GP7 - A0
#define TFT_MISO      4   // GP4 - MISO (MISO, RX)
#define TFT_MOSI      3   // GP3 - SDA  (MOSI, TX)
#define TFT_SCLK      2   // GP2 - SCK
#endif

// SPI definitions and macros то NRF24L01
#if defined(SPI01)
#define CE_pin    7
#define CS_pin    5
#define MOSI_pin  3
#define MISO_pin  4
#define SCK_pin   2
#else
#define CE_pin    15
#define CS_pin    13
#define MOSI_pin  11
#define MISO_pin  12
#define SCK_pin   10
#endif

#elif ( defined(ESP32))

#define WIFI             // Используем модуль вайфая
#include "WiFi.h"

// ***   ***   ***           Для ESP32 подключаем SPI так:
#define HSPI              // Дисплей на HSPI, NRF24L01 на VSPI
#if defined(HSPI)         // для ESP32 HSPI
#define TFT_CS        15  // GP13 - CS
#define TFT_RST       16  // GP14 - RESET
#define TFT_DC        17  // GP15 - A0
#define TFT_MISO      12  // GP12 - MISO (MISO, RX)
#define TFT_MOSI      13  // GP11 - SDA  (MOSI, TX)
#define TFT_SCLK      14  // GP10 - SCK
#else                     // для ESP32 VSPI
#define TFT_CS        5   // GP5  - CS
#define TFT_RST       20  // GP20 - RESET
#define TFT_DC        21  // GP21 - A0
#define TFT_MISO      19  // GP19 - MISO (MISO, RX)
#define TFT_MOSI      23  // GP23 - SDA  (MOSI, TX)
#define TFT_SCLK      18  // GP18 - SCK
#endif

// SPI definitions and macros то NRF24L01
#if defined(HSPI) // NRF24L01 на VSPI если монитор на HSPI и наоборот ;-)
#define CE_pin    21
#define CS_pin    5
#define MOSI_pin  23
#define MISO_pin  19
#define SCK_pin   18
#else // HSPI
#define CE_pin    17
#define CS_pin    15
#define MOSI_pin  13
#define MISO_pin  12
#define SCK_pin   14
#endif


#else
#error This code is intended to run on the RP2040 or ESP32 modules!
#endif

// For ST7735-based displays, we will use this call
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);


extern const unsigned char ris_1[];
extern const unsigned char ris_2[];

// функция перекодировки цвета в формат библиотеки Adafruin_GFX
//
uint16_t setColor(uint8_t red, uint8_t green, uint8_t blue) { 
  return ((red & 0xF8) << 8) | ((green & 0xFC) << 3) | (blue >> 3);
}

void dispInit() {
  // Use this initializer if using a 1.8" TFT screen:
  tft.initR(INITR_BLACKTAB);      // Init ST7735S chip, black tab
  tft.setRotation(1);
  tft.cp437(true);                // не пропускаем 176 символ
#ifdef WIFI // SPI для ESP32  
  tft.setSPISpeed(50000000);      // отдельные экземпляры дисплеев не работают на такой скорости
#else                             // откоректируйте по конкретный экземпляр
  tft.setSPISpeed(50000000);
#endif
  tft.fillScreen(ST77XX_BLACK);
  tft.setCursor(22, 50);
  tft.setTextColor(ST77XX_YELLOW, ST77XX_BLACK);
  tft.setTextSize(1);
  tft.print("    R I S U N O K");
  tft.setCursor(3, 70);
  tft.setTextSize(1);
  tft.setTextColor(ST77XX_CYAN, ST77XX_BLACK);

#ifdef WIFI
  tft.print("Modified to ESP32 - UA6EM");
#else
  tft.print("Modified to RP2040 - UA6EM");
#endif
  delay(3000);
}

void setup(void) {
  dispInit();
  Serial.begin(115200);
  tft.setRotation(0);
  tft.fillScreen(ST7735_BLACK); // добавил эту строку - З А Р А Б О Т А Л О !!!
}


void loop() {
  drawBitmap_(0, 0, ris_1, 128, 160, ST77XX_WHITE /*setColor(255, 255, 255)*/, ST77XX_BLACK /*setColor(0, 0, 0)*/);
  drawBitmap_(0, 0, ris_2, 128, 160, ST77XX_WHITE /*setColor(255, 255, 255)*/, ST77XX_RED/*setColor(150, 150, 50)*/);
  //Serial.println("работаю");
}

/////////////////////////////////////////////////////////////////////
void drawBitmap_(int x, int y, const uint8_t *bitmap, int w, int h, const uint16_t color_1, const uint16_t color_2) {
  if (x < 0 || x + w > 128 || y < 0 || y + h > 160) {
    return;
  }
  tft.setAddrWindow(x, y, x + w - 1, y + h - 1);  // координаты окна 0,0 - 127-159
  int16_t i, j, byteWidth = (w + 7) / 8;
  uint8_t bytes;
  for (j = 0; j < h; j++) {
    for (i = 0; i < w; i++) {
      if (i & 7) {
        bytes <<= 1; /*Serial.println("in if");*/
      } else {
        bytes   = pgm_read_byte(bitmap + j * byteWidth + i / 8);/*Serial.print(byte);Serial.println(" - in else");*/
      }
      if (bytes & 0x80)
      {
        tft.pushColor(color_1 ); /*Serial.println("цвет 1");*/
      }
      else {
        tft.pushColor(color_2 ); /*Serial.println("цвет 2");*/
      }
    }
  }
}
/////////////////////////////////////////////////////////////////////

 

lilik
Offline
Зарегистрирован: 19.10.2017

ua6em пишет:

Нам учитель задаёт с иксами задачу...это я к тому, что только решил одну задачку, ты подкинул вторую...
Под Rasberry PI Pico RP2040 предыдущее заработало!!!

// РИСУНОК
#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library for ST7735
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789
#include <SPI.h>

#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || \
      defined(ARDUINO_GENERIC_RP2040) )

// замаркировать если используем наоборот
#define SPI01             // Дисплей на SPIO1, NRF24L01 на SPI0 (выбор между SPI0 и SPI1)
#if defined(SPI01)        // для RP2040 SPI1
#define TFT_CS        13  // GP13 - CS
#define TFT_RST       14  // GP14 - RESET
#define TFT_DC        15  // GP15 - A0
#define TFT_MISO      12  // GP12 - MISO (MISO, RX)
#define TFT_MOSI      11  // GP11 - SDA  (MOSI, TX)
#define TFT_SCLK      10  // GP10 - SCK
#else                     // для RP2040 SPI0
#define TFT_CS        5   // GP5 - CS
#define TFT_RST       6   // GP6 - RESET
#define TFT_DC        7   // GP7 - A0
#define TFT_MISO      4   // GP4 - MISO (MISO, RX)
#define TFT_MOSI      3   // GP3 - SDA  (MOSI, TX)
#define TFT_SCLK      2   // GP2 - SCK
#endif

// SPI definitions and macros то NRF24L01
#if defined(SPI01)
#define CE_pin    7
#define CS_pin    5
#define MOSI_pin  3
#define MISO_pin  4
#define SCK_pin   2
#else
#define CE_pin    15
#define CS_pin    13
#define MOSI_pin  11
#define MISO_pin  12
#define SCK_pin   10
#endif

#elif ( defined(ESP32))

#define WIFI             // Используем модуль вайфая
#include "WiFi.h"

// ***   ***   ***           Для ESP32 подключаем SPI так:
#define HSPI              // Дисплей на HSPI, NRF24L01 на VSPI
#if defined(HSPI)         // для ESP32 HSPI
#define TFT_CS        15  // GP13 - CS
#define TFT_RST       16  // GP14 - RESET
#define TFT_DC        17  // GP15 - A0
#define TFT_MISO      12  // GP12 - MISO (MISO, RX)
#define TFT_MOSI      13  // GP11 - SDA  (MOSI, TX)
#define TFT_SCLK      14  // GP10 - SCK
#else                     // для ESP32 VSPI
#define TFT_CS        5   // GP5  - CS
#define TFT_RST       20  // GP20 - RESET
#define TFT_DC        21  // GP21 - A0
#define TFT_MISO      19  // GP19 - MISO (MISO, RX)
#define TFT_MOSI      23  // GP23 - SDA  (MOSI, TX)
#define TFT_SCLK      18  // GP18 - SCK
#endif

// SPI definitions and macros то NRF24L01
#if defined(HSPI) // NRF24L01 на VSPI если монитор на HSPI и наоборот ;-)
#define CE_pin    21
#define CS_pin    5
#define MOSI_pin  23
#define MISO_pin  19
#define SCK_pin   18
#else // HSPI
#define CE_pin    17
#define CS_pin    15
#define MOSI_pin  13
#define MISO_pin  12
#define SCK_pin   14
#endif


#else
#error This code is intended to run on the RP2040 or ESP32 modules!
#endif

// For ST7735-based displays, we will use this call
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);


extern const unsigned char ris_1[];
extern const unsigned char ris_2[];

// функция перекодировки цвета в формат библиотеки Adafruin_GFX
//
uint16_t setColor(uint8_t red, uint8_t green, uint8_t blue) { 
  return ((red & 0xF8) << 8) | ((green & 0xFC) << 3) | (blue >> 3);
}

void dispInit() {
  // Use this initializer if using a 1.8" TFT screen:
  tft.initR(INITR_BLACKTAB);      // Init ST7735S chip, black tab
  tft.setRotation(1);
  tft.cp437(true);                // не пропускаем 176 символ
#ifdef WIFI // SPI для ESP32  
  tft.setSPISpeed(50000000);      // отдельные экземпляры дисплеев не работают на такой скорости
#else                             // откоректируйте по конкретный экземпляр
  tft.setSPISpeed(50000000);
#endif
  tft.fillScreen(ST77XX_BLACK);
  tft.setCursor(22, 50);
  tft.setTextColor(ST77XX_YELLOW, ST77XX_BLACK);
  tft.setTextSize(1);
  tft.print("    R I S U N O K");
  tft.setCursor(3, 70);
  tft.setTextSize(1);
  tft.setTextColor(ST77XX_CYAN, ST77XX_BLACK);

#ifdef WIFI
  tft.print("Modified to ESP32 - UA6EM");
#else
  tft.print("Modified to RP2040 - UA6EM");
#endif
  delay(3000);
}

void setup(void) {
  dispInit();
  Serial.begin(115200);
  tft.setRotation(0);
  tft.fillScreen(ST7735_BLACK); // добавил эту строку - З А Р А Б О Т А Л О !!!
}


void loop() {
  drawBitmap_(0, 0, ris_1, 128, 160, ST77XX_WHITE /*setColor(255, 255, 255)*/, ST77XX_BLACK /*setColor(0, 0, 0)*/);
  drawBitmap_(0, 0, ris_2, 128, 160, ST77XX_WHITE /*setColor(255, 255, 255)*/, ST77XX_RED/*setColor(150, 150, 50)*/);
  //Serial.println("работаю");
}

/////////////////////////////////////////////////////////////////////
void drawBitmap_(int x, int y, const uint8_t *bitmap, int w, int h, const uint16_t color_1, const uint16_t color_2) {
  if (x < 0 || x + w > 128 || y < 0 || y + h > 160) {
    return;
  }
  tft.setAddrWindow(x, y, x + w - 1, y + h - 1);  // координаты окна 0,0 - 127-159
  int16_t i, j, byteWidth = (w + 7) / 8;
  uint8_t bytes;
  for (j = 0; j < h; j++) {
    for (i = 0; i < w; i++) {
      if (i & 7) {
        bytes <<= 1; /*Serial.println("in if");*/
      } else {
        bytes   = pgm_read_byte(bitmap + j * byteWidth + i / 8);/*Serial.print(byte);Serial.println(" - in else");*/
      }
      if (bytes & 0x80)
      {
        tft.pushColor(color_1 ); /*Serial.println("цвет 1");*/
      }
      else {
        tft.pushColor(color_2 ); /*Serial.println("цвет 2");*/
      }
    }
  }
}
/////////////////////////////////////////////////////////////////////

 

Из 147 сообщения теперь можно пробовать :)

картинка:

#include <avr/pgmspace.h>

const unsigned char ris_1[]PROGMEM = {
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X03,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X80,0X40,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0XFF,0XC1,0XE0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X01,0XFF,0X83,0XF8,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X01,0XFF,0X0F,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X01,0XFE,0X1F,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X03,0XFC,0X3F,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X03,0XF8,0X7F,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X07,0XF0,0XFF,0XFF,0X01,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X07,0XE1,0XFF,0XFC,0X07,0XFE,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X07,0XC3,0XFF,0XF8,0X0F,0XFF,0X80,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X07,0X83,0XFF,0XF0,0X3F,0XFF,0X00,0X00,0X03,0XE0,0X00,0X00,0X01,0XC0,
0X03,0X80,0X07,0X07,0XFF,0XC0,0X7F,0XFE,0X00,0X80,0X1F,0XFC,0X00,0X00,0X01,0XC0,
0X03,0X80,0X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0X01,0XC0,
0X03,0X80,0X03,0XFF,0XFF,0XE1,0XFF,0XC1,0XF0,0X7C,0X07,0XF8,0X07,0XF8,0X01,0XC0,
0X03,0X80,0X00,0X3F,0XFF,0XE1,0XFF,0XE0,0XF0,0XFC,0X07,0XF8,0X03,0XF0,0X01,0XC0,
0X03,0X80,0X00,0X0F,0XFF,0XE1,0XFF,0XE0,0X7B,0XF8,0X07,0XF8,0X01,0XE0,0X01,0XC0,
0X03,0X80,0X00,0X07,0XFF,0XE1,0XFF,0XE0,0X7F,0XF0,0X07,0XF0,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X01,0XFF,0XC1,0XFF,0XE0,0X3F,0XE0,0X07,0XF0,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X3E,0X01,0XFE,0X00,0X1F,0XC0,0X03,0XE0,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0X80,0X03,0X80,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X06,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XC0,
0X03,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC0,
0X03,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC0,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00
};

 

ua6em
ua6em аватар
Offline
Зарегистрирован: 17.08.2016

не идёт, у него SPI 32-х разрядный, по 4 байта сразу кидает, это не отрабатывает:
 

  ///
    Serial.print(" SPI is ON");  // в монитор порта прилетает
    SPI.beginTransaction(SPISettings(50000000, MSBFIRST, SPI_MODE0));
    digitalWrite(TFT_DC, HIGH);
    digitalWrite(TFT_CS, LOW);
    SPI.transfer(&lineBuf, 2*W);
    digitalWrite(TFT_CS, HIGH);
    SPI.endTransaction();
    ///
    Serial.println(" SPI is OFF"); // в монитор порта прилетает