mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-07-26 10:38:41 +00:00
Fix typo and move initialization of neo to init()
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
noe machine.Pin
|
||||
neo machine.Pin
|
||||
leds [10]color.RGBA
|
||||
)
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user