Answers.Body: <p>It is not possible to control the LEDs separately using the official EV3 firmware. You would have to modify the kernel drivers. You can only use the predefined patterns shown <a href="https://github.com/mindboards/ev3sources/blob/78ebaf5b6f8fe31cc17aa5dce0f8e4916a4fc072/lms2012/d_ui/Linuxmod_AM1808/d_ui.c#L323-L330" rel="nofollow noreferrer">here</a>.</p>
  
  
  
  <pre><code>ULONG     LEDPATTERNDATA[NO_OF_LEDS + 1][LEDPATTERNS] =
  { //  LED_BLACK   LED_GREEN   LED_RED    LED_ORANGE           LED_GREEN_FLASH                     LED_RED_FLASH                     LED_ORANGE_FLASH                      LED_GREEN_PULSE                       LED_RED_PULSE                      LED_ORANGE_PULSE
    {  0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0b00000000000000000000000000000000, 0b00000000000000000111110000011111, 0b00000000000000000111110000011111, 0b00000000000000000000000000000000, 0b00000000000000000000000001110111, 0b00000000000000000000000001110111 }, // RR
    {  0x00000000, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFF, 0b00000000000000000111110000011111, 0b00000000000000000000000000000000, 0b00000000000000000111110000011111, 0b00000000000000000000000001110111, 0b00000000000000000000000000000000, 0b00000000000000000000000001110111 }, // RG
    {  0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0b00000000000000000000000000000000, 0b00000000000000000111110000011111, 0b00000000000000000111110000011111, 0b00000000000000000000000000000000, 0b00000000000000000000000001110111, 0b00000000000000000000000001110111 }, // LR
    {  0x00000000, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFF, 0b00000000000000000111110000011111, 0b00000000000000000000000000000000, 0b00000000000000000111110000011111, 0b00000000000000000000000001110111, 0b00000000000000000000000000000000, 0b00000000000000000000000001110111 }, // LG
    { 0 }
  };
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-05T03:33:28.710Z
Answers.LastActivityDate: 2019-04-05T03:33:28.710Z
Answers.UserDisplayName: David Lechner
Body: <p>The EV3 brick has 2 LED sets, one on the left side of the button panel and one on the right. </p>
  
  <p>Software such as <a href="https://pypi.org/project/python-ev3dev2/" rel="nofollow noreferrer">python for ev3dev</a> let's you control them both individually, the normal EV3-G LED block however only allows to set them both to the same value.</p>
  
  <p>Has anybody created a custom block that I can import into EV3-G that allows me to control the left and right LEDs individually?</p>
  
Tags: <ev3><ev3-g>
Title: Looking for custom EV3 block to control LEDs independently
UserDisplayName: user12889
ThreadText: # Looking for custom EV3 block to control LEDs independently
  
  (Asked by: username_0 on 2019-04-05)
  
  The EV3 brick has 2 LED sets, one on the left side of the button panel and one on the right.
  
  Software such as [python for ev3dev](https://pypi.org/project/python-ev3dev2/) let's you control them both individually, the normal EV3-G LED block however only allows to set them both to the same value.
  
  Has anybody created a custom block that I can import into EV3-G that allows me to control the left and right LEDs individually?
  
  **Tags:** ev3, ev3-g
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-04-05. Score: 3 | Accepted answer
  
  It is not possible to control the LEDs separately using the official EV3 firmware. You would have to modify the kernel drivers. You can only use the predefined patterns shown [here](https://github.com/mindboards/ev3sources/blob/78ebaf5b6f8fe31cc17aa5dce0f8e4916a4fc072/lms2012/d_ui/Linuxmod_AM1808/d_ui.c#L323-L330).
  
  ```
  ULONG     LEDPATTERNDATA[NO_OF_LEDS + 1][LEDPATTERNS] =
  { //  LED_BLACK   LED_GREEN   LED_RED    LED_ORANGE           LED_GREEN_FLASH                     LED_RED_FLASH                     LED_ORANGE_FLASH                      LED_GREEN_PULSE                       LED_RED_PULSE                      LED_ORANGE_PULSE
    {  0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0b00000000000000000000000000000000, 0b00000000000000000111110000011111, 0b00000000000000000111110000011111, 0b00000000000000000000000000000000, 0b00000000000000000000000001110111, 0b00000000000000000000000001110111 }, // RR
    {  0x00000000, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFF, 0b00000000000000000111110000011111, 0b00000000000000000000000000000000, 0b00000000000000000111110000011111, 0b00000000000000000000000001110111, 0b00000000000000000000000000000000, 0b00000000000000000000000001110111 }, // RG
    {  0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0b00000000000000000000000000000000, 0b00000000000000000111110000011111, 0b00000000000000000111110000011111, 0b00000000000000000000000000000000, 0b00000000000000000000000001110111, 0b00000000000000000000000001110111 }, // LR
    {  0x00000000, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFF, 0b00000000000000000111110000011111, 0b00000000000000000000000000000000, 0b00000000000000000111110000011111, 0b00000000000000000000000001110111, 0b00000000000000000000000000000000, 0b00000000000000000000000001110111 }, // LG
    { 0 }
  };
  
  ```
  
  
  ---
  
  