We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This program works as expected on the actual hardware (red/blue LEDs) but on the simulator is red/green:
package main import ( "image/color" "machine" "time" "tinygo.org/x/drivers/ws2812" ) var leds [10]color.RGBA var led = machine.LED var neo = machine.NEOPIXELS func main() { led.Configure(machine.PinConfig{Mode: machine.PinOutput}) neo.Configure(machine.PinConfig{Mode: machine.PinOutput}) ws := ws2812.New(neo) rg := false for { rg = !rg for i := range leds { rg = !rg if rg { leds[i] = color.RGBA{R: 0xff, G: 0x00, B: 0x00} } else { leds[i] = color.RGBA{R: 0x00, G: 0x00, B: 0xff} } } ws.WriteColors(leds[:]) led.Set(rg) time.Sleep(100 * time.Millisecond) } }
The text was updated successfully, but these errors were encountered:
378c7ca
Whoa, I should have caught this sooner! I've now fixed this on play.tinygo.org. The next vscode-tinygo extension update will also get this fix.
Sorry, something went wrong.
Thank you!!
No branches or pull requests
This program works as expected on the actual hardware (red/blue LEDs) but on the simulator is red/green:
The text was updated successfully, but these errors were encountered: