microsoft / pxt-maker

MakeCode target for "Maker" boards (beta)
https://maker.makecode.com/
Other
116 stars 79 forks source link

On Gemma M0 using code for the on-board RGB LED also creates external LED strip in simulator #260

Open kevinjwalters opened 4 years ago

kevinjwalters commented 4 years ago

Describe the bug As soon as any code is written for the Gemma M0 which uses the light blocks to set RGB LEDs then an external 4 wire DotStar LED strip will be added in the simulator and wired up to D0/D2 pins.

To Reproduce Steps to reproduce the behavior:

  1. Use a block from LIGHT drawer to set some colours on the default pixelso to '...'
  2. Observe external RGB LED strip appear in the simulator on a breadboard below Gemma M0.
  3. Enter state of confusion

Expected behavior I'd expect the default strip to be the single, on-board DotStar RGB LED. This is on an independent set of pins not exposed on the pads, see https://learn.adafruit.com/assets/49776

I'd only expect an external strip to appear if one was explicitly created. In the case of the 4 wire system this would be the APA102 strip.

Screenshots

Gemma-M0-bogus-external-dotstars

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context This is on beta beta of https://maker.makecode.com/beta/

MakeCode Maker (Cortex class) version:  0.11.43
Microsoft MakeCode version:  5.26.4
codal-circuit-playground runtime version:  v2.0.1

Here's the actual (trivial!) code:

maker-Gemma-M0-onboard-LED-bug

kevinjwalters commented 4 years ago

The green wire routing also is unfortunate. A casual/inexperienced observer would think it connected D0 to D2. If you look closely it doesn't follow the same style for pad connections but it made me look twice.

And if those 3 brown things on the LED strip are supposed to indicate the number of wires then it should be four in this case to match the 4 wire DotStar / APA102 system.