Skip to content

Commit

Permalink
ws2812: add support for m5stamp-c3
Browse files Browse the repository at this point in the history
  • Loading branch information
sago35 authored and deadprogram committed Feb 11, 2022
1 parent ad3ef92 commit 10bd48c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions examples/ws2812/others.go
Original file line number Diff line number Diff line change
@@ -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

Expand Down
11 changes: 11 additions & 0 deletions examples/ws2812/others_wo_led.go
Original file line number Diff line number Diff line change
@@ -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
5 changes: 0 additions & 5 deletions examples/ws2812/qtpy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 10bd48c

Please sign in to comment.