Wow, that's pretty close! Looks like the width is right, but the start address and 'view window' is off.
I'd look at copying these two:
ST7735_FRMCTR1, 3+DELAY, // 4: Frame rate control, 3 args + delay:
0x00, // fastest refresh
0x06, // 6 lines front porch
0x03, // 3 lines back porch
10, // 10 ms delay
ST7735_CASET , 4 , // 15: Column addr set, 4 args, no delay:
0x00, 0x02, // XSTART = 2
0x00, 0x81, // XEND = 129
ST7735_RASET , 4 , // 16: Row addr set, 4 args, no delay:
0x00, 0x02, // XSTART = 1
0x00, 0x81, // XEND = 160
The first one is already there, but just uses different values, and for the second one you'll need to change the code in g.flip as well (although come to think of it, g.flip may not need that code at all).
There's also this code - it looks like the Adafruit lib supports a few different types of screen by sending different initialisation code. It wouldn't surprise me if their 'default' setup doesn't work for you either.
© Espruino, powered by microcosm.
Report a problem