Re: Bitmap colours are not mapping corectly
Re: Bitmap colours are not mapping corectly
Re: Bitmap colours are not mapping corectly
Re: Bitmap colours are not mapping corectly
Re: Bitmap colours are not mapping corectly
#include "Adafruit_Arcada.h"
Adafruit_Arcada arcada;
#define NX 15
#define NY 15
void setup(void) {
Serial.begin(9600);
//while (!Serial);
arcada.arcadaBegin();
arcada.displayBegin();
arcada.setBacklight(255);
int width = arcada.display->width();
int height = arcada.display->height();
int DX = width / NX;
int DY = height / NY;
float DH = 360.0 / (NX*NY);
float hue = 0;
Serial.print("DX = "); Serial.println(DX);
Serial.print("DY = "); Serial.println(DY);
Serial.print("DH = "); Serial.println(DH);
for (int y=0; y<height; y+=DY) {
for (int x=0; x<width; x+=DX) {
uint16_t rgb = arcada.ColorHSV565(int16_t(hue), 100, 100);
Serial.print("("); Serial.print(x); Serial.print(","); Serial.print(y); Serial.print(") to ");
Serial.print("("); Serial.print(x+DX); Serial.print(","); Serial.print(y+DY); Serial.print(") ");
Serial.print("hue = "); Serial.print(hue); Serial.print(" rgb = "); Serial.println(rgb);
arcada.display->fillRect(x, y, x+DX, y+DY, rgb);
hue += DH;
}
}
}
void loop() {
}
static const uint8_t PROGMEM
generic_st7789[] = { // Init commands for 7789 screens
10, // 9 commands in list:
ST77XX_SWRESET, ST_CMD_DELAY, // 1: Software reset, no args, w/delay
150, // ~150 ms delay
ST77XX_SLPOUT , ST_CMD_DELAY, // 2: Out of sleep mode, no args, w/delay
10, // 10 ms delay
ST77XX_COLMOD , 1+ST_CMD_DELAY, // 3: Set color mode, 1 arg + delay:
0x55, // 16-bit color
10, // 10 ms delay
ST77XX_MADCTL , 1, // 4: Mem access ctrl (directions), 1 arg:
0x08, // Row/col addr, bottom-top refresh
ST77XX_CASET , 4, // 5: Column addr set, 4 args, no delay:
0x00,
0, // XSTART = 0
0,
240, // XEND = 240
ST77XX_RASET , 4, // 6: Row addr set, 4 args, no delay:
0x00,
0, // YSTART = 0
320>>8,
320&0xFF, // YEND = 320
ST77XX_INVON , ST_CMD_DELAY, // 7: hack
10,
ST77XX_NORON , ST_CMD_DELAY, // 8: Normal display on, no args, w/delay
10, // 10 ms delay
ST77XX_DISPON , ST_CMD_DELAY, // 9: Main screen turn on, no args, delay
10, // 10 ms delay
0x26, 1, 0x02};
0x26, 1, 0x02};
Re: Bitmap colours are not mapping corectly
unawoo wrote:Okay
i had the original color_rect on the new clue so i compaired it to the real thing.
so i flashed the original clue with:
1. clue_color_rect.uf2 = large rectangles as before
2. clue_color_test_gc1.uf2 = no change
3. clue_color_test_gc2.uf2 = fixed, exactly same as good clue
4. clue_color_test_gc3.uf2 = fixed, exactly same as good clue
5. clue_color_test_gc4.uf2 = rectangles and small blocks
Re: Bitmap colours are not mapping corectly
Re: Bitmap colours are not mapping corectly
Re: Bitmap colours are not mapping corectly
Re: Bitmap colours are not mapping corectly
Re: Bitmap colours are not mapping corectly