-1

Using a V1 micro:bit, is it possible to have two independent LEDs? I want one to act as a heartbeat (flash once a second), the other to indicate, for example, go/nogo.

Whatever pairings I’ve tried, other LEDs come on when both of my chosen LEDs are on, which is ugly!

Simon Wright
  • 25,108
  • 2
  • 35
  • 62

1 Answers1

1

I was misled by the way the 'standard' examples of LED control manipulate both the 'row' and 'column' GPIOs.

The central LED is at external position (3, 3), and the bottom left at (5, 1), which correspond to GPIOs (r2, c3) and (r3, c3) respectively. If I use the bottom left as the heartbeat, then whenever I switch it off (c3 set high) I’ll also switch (3, 3) off.

The answer (to my problem: hardly a general-purpose solution) is to leave c3 set low permanently and control the two LEDs using r2 and r3 respectively.

I could use the top right button (1, 5) => (r1, c3) as well.

Or, for more choice, leave r1 set high permanently and use c1 .. c9 for control.

Simon Wright
  • 25,108
  • 2
  • 35
  • 62