fix display offset

This commit is contained in:
Joel Wetzell
2026-04-10 16:51:02 -05:00
parent 6c68465d9c
commit 0ac427a16f
2 changed files with 9 additions and 12 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
module m5stickc
go 1.25.8
go 1.26.2
require tinygo.org/x/drivers v0.34.0
+4 -7
View File
@@ -1,6 +1,7 @@
package main
import (
"fmt"
"image/color"
"machine"
"time"
@@ -38,8 +39,8 @@ func main() {
Model: st7735.MINI80x160,
Width: 80,
Height: 160,
// ColumnOffset: 26,
// RowOffset: 1,
ColumnOffset: 26,
RowOffset: 1,
Rotation: st7735.ROTATION_270,
})
@@ -64,11 +65,6 @@ func main() {
buttonB.Configure(machine.PinConfig{Mode: machine.PinInput})
for {
// display.FillScreen(red)
// time.Sleep(500 * time.Millisecond)
// display.FillScreen(black)
// time.Sleep(500 * time.Millisecond)
valueA := buttonA.Get()
valueB := buttonB.Get()
@@ -83,5 +79,6 @@ func main() {
} else {
display.FillRectangle(80, 0, 80, 80, black)
}
fmt.Printf("Button A: %v, Button B: %v\n", valueA, valueB)
}
}