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
+5 -3
View File
@@ -4,6 +4,8 @@ package main
import "machine"
// Replace neo in the code below to match the pin
// that you are using if different.
var neo = machine.D2
func init() {
// Replace neo in the code below to match the pin
// that you are using if different.
neo = machine.D2
}
+6 -4
View File
@@ -4,7 +4,9 @@ package main
import "machine"
// This is the pin assignment for the Digispark only.
// Replace neo and led in the code below to match the pin
// that you are using if different.
var neo machine.Pin = 0
func init() {
// This is the pin assignment for the Digispark only.
// Replace neo and led in the code below to match the pin
// that you are using if different.
neo = machine.Pin(0)
}
+1 -1
View File
@@ -13,7 +13,7 @@ import (
)
var (
noe machine.Pin
neo machine.Pin
leds [10]color.RGBA
)
+5 -3
View File
@@ -4,6 +4,8 @@ package main
import "machine"
// Replace neo in the code below to match the pin
// that you are using if different.
var neo machine.Pin = machine.WS2812
func init() {
// Replace neo in the code below to match the pin
// that you are using if different.
neo = machine.WS2812
}