Fix typo and move initialization of neo to init()

This commit is contained in:
sago35
2024-05-04 23:32:27 +09:00
committed by Ron Evans
parent 5eeba138a4
commit bb0e6b8ba8
4 changed files with 17 additions and 11 deletions
+3 -1
View File
@@ -4,6 +4,8 @@ package main
import "machine" import "machine"
func init() {
// Replace neo in the code below to match the pin // Replace neo in the code below to match the pin
// that you are using if different. // that you are using if different.
var neo = machine.D2 neo = machine.D2
}
+3 -1
View File
@@ -4,7 +4,9 @@ package main
import "machine" import "machine"
func init() {
// This is the pin assignment for the Digispark only. // This is the pin assignment for the Digispark only.
// Replace neo and led in the code below to match the pin // Replace neo and led in the code below to match the pin
// that you are using if different. // that you are using if different.
var neo machine.Pin = 0 neo = machine.Pin(0)
}
+1 -1
View File
@@ -13,7 +13,7 @@ import (
) )
var ( var (
noe machine.Pin neo machine.Pin
leds [10]color.RGBA leds [10]color.RGBA
) )
+3 -1
View File
@@ -4,6 +4,8 @@ package main
import "machine" import "machine"
func init() {
// Replace neo in the code below to match the pin // Replace neo in the code below to match the pin
// that you are using if different. // that you are using if different.
var neo machine.Pin = machine.WS2812 neo = machine.WS2812
}