diff --git a/m5stickc/go.mod b/m5stickc/go.mod index 12e78d7..0f38843 100644 --- a/m5stickc/go.mod +++ b/m5stickc/go.mod @@ -1,6 +1,6 @@ module m5stickc -go 1.25.8 +go 1.26.2 require tinygo.org/x/drivers v0.34.0 diff --git a/m5stickc/main.go b/m5stickc/main.go index 00f7973..e208b11 100644 --- a/m5stickc/main.go +++ b/m5stickc/main.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "image/color" "machine" "time" @@ -35,12 +36,12 @@ func main() { machine.NoPin, ) display.Configure(st7735.Config{ - Model: st7735.MINI80x160, - Width: 80, - Height: 160, - // ColumnOffset: 26, - // RowOffset: 1, - Rotation: st7735.ROTATION_270, + Model: st7735.MINI80x160, + Width: 80, + Height: 160, + ColumnOffset: 26, + RowOffset: 1, + Rotation: st7735.ROTATION_270, }) red := color.RGBA{255, 0, 0, 255} @@ -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) } }