Hi there,
So I found an old UNO I had. Hooked it up ,copy & pasted code ,compiled and worked without edit.
#include <Adafruit_GFX.h>
#include <Arduino_ST7789_Fast.h>
#define SCK 7
#define SDA 8
Arduino_ST7789 lcd = Arduino_ST7789(SCK, SDA);
void setup(void)
{
lcd.init();
lcd.fillScreen(BLACK);
lcd.setCursor(0, 0);
lcd.setTextColor(RED,BLACK);
lcd.setTextSize(3);
lcd.println("HELLO WORLD");
}
void loop()
{
}
compiler output…
FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Detecting libraries used...
Using library Adafruit GFX Library at version 1.11.9 in folder: D:\Arduino_projects\libraries\Adafruit_GFX_Library
Using library Adafruit BusIO at version 1.16.1 in folder: D:\Arduino_projects\libraries\Adafruit_BusIO
Using library Wire at version 1.0 in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire
Using library SPI at version 1.0 in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI
Using library Fast ST7789 Library at version 1.0.4 in folder: D:\Arduino_projects\libraries\Fast_ST7789_Library
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\39D9A1C7B5D071B7F4BC89D551846045/sketch_jun23c.ino.elf"
Sketch uses 7514 bytes (23%) of program storage space. Maximum is 32256 bytes.
Global variables use 258 bytes (12%) of dynamic memory, leaving 1790 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\Dude\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\Dude\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM16" -b115200 -D "-Uflash:w:C:\Users\Dude\AppData\Local\Temp\arduino\sketches\39D9A1C7B5D071B7F4BC89D551846045/sketch_jun23c.ino.hex:i"
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Dude\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM16
Using Programmer : arduino
Overriding Baud Rate : 115200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\Dude\AppData\Local\Temp\arduino\sketches\39D9A1C7B5D071B7F4BC89D551846045/sketch_jun23c.ino.hex"
avrdude: writing flash (7514 bytes):
Writing | ################################################## | 100% 1.21s
avrdude: 7514 bytes of flash written
avrdude done. Thank you.
Looks good, BRIGHT!! I’ll try the Nrf52840 and ESP32’s as time permits. Long and short of it is it’s not I2C and probably needs SPI to run on the others.
HTH
GL PJ
time for refreshment