diff --git a/examples/ws2812/others.go b/examples/ws2812/others.go index f202eaf..10cb248 100644 --- a/examples/ws2812/others.go +++ b/examples/ws2812/others.go @@ -1,5 +1,5 @@ -//go:build !digispark && !arduino && !qtpy -// +build !digispark,!arduino,!qtpy +//go:build !digispark && !arduino && !qtpy && !m5stamp_c3 +// +build !digispark,!arduino,!qtpy,!m5stamp_c3 package main diff --git a/examples/ws2812/others_wo_led.go b/examples/ws2812/others_wo_led.go new file mode 100644 index 0000000..107d3a4 --- /dev/null +++ b/examples/ws2812/others_wo_led.go @@ -0,0 +1,11 @@ +//go:build qtpy || m5stamp_c3 +// +build qtpy m5stamp_c3 + +package main + +import "machine" + +// Replace neo and led in the code below to match the pin +// that you are using if different. +var neo machine.Pin = machine.WS2812 +var led = machine.NoPin diff --git a/examples/ws2812/qtpy.go b/examples/ws2812/qtpy.go index a22ad99..a35bcd2 100644 --- a/examples/ws2812/qtpy.go +++ b/examples/ws2812/qtpy.go @@ -5,11 +5,6 @@ package main import "machine" -// Replace neo and led in the code below to match the pin -// that you are using if different. -var neo machine.Pin = machine.NEOPIXELS -var led = machine.NoPin - func init() { pwr := machine.NEOPIXELS_POWER pwr.Configure(machine.PinConfig{Mode: machine.PinOutput})