mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-17 21:23:58 +00:00
Fix typo and move initialization of neo to init()
This commit is contained in:
@@ -4,6 +4,8 @@ package main
|
|||||||
|
|
||||||
import "machine"
|
import "machine"
|
||||||
|
|
||||||
// Replace neo in the code below to match the pin
|
func init() {
|
||||||
// that you are using if different.
|
// Replace neo in the code below to match the pin
|
||||||
var neo = machine.D2
|
// that you are using if different.
|
||||||
|
neo = machine.D2
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ package main
|
|||||||
|
|
||||||
import "machine"
|
import "machine"
|
||||||
|
|
||||||
// This is the pin assignment for the Digispark only.
|
func init() {
|
||||||
// Replace neo and led in the code below to match the pin
|
// This is the pin assignment for the Digispark only.
|
||||||
// that you are using if different.
|
// Replace neo and led in the code below to match the pin
|
||||||
var neo machine.Pin = 0
|
// that you are using if different.
|
||||||
|
neo = machine.Pin(0)
|
||||||
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
noe machine.Pin
|
neo machine.Pin
|
||||||
leds [10]color.RGBA
|
leds [10]color.RGBA
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ package main
|
|||||||
|
|
||||||
import "machine"
|
import "machine"
|
||||||
|
|
||||||
// Replace neo in the code below to match the pin
|
func init() {
|
||||||
// that you are using if different.
|
// Replace neo in the code below to match the pin
|
||||||
var neo machine.Pin = machine.WS2812
|
// that you are using if different.
|
||||||
|
neo = machine.WS2812
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user