• 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enable/Disable LED1 and LED2
#2
Frank, physically these LEDs are connected physically to GPIO12 and GPIO13.

In netPI's host Linux these pins are not created as gpio devices but as led devices by default. (It does not make sense to program them as GPIOs since they are outputs always, so we decided to let the Linux creating them as LEDs.)

So instead of echoing in a console to /sys/class/gpio for example you have to use the path /sys/class/leds.

Under this path you find 4 LEDs: led0, led1, user0:orange:user, user1:orange:user

So to light up the 1st orange LED in a console use


Code:
echo 1 | sudo tee /sys/class/leds/user0:orange:user/brightness

The same applies for the other LED.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Messages In This Thread
Answer - by FrankJacob - July-3rd-2018, 02:20 PM
Answer - by Armin@netPI - July-5th-2018, 10:48 AM
RE: Answer - by hannes - August-23rd-2018, 08:43 AM
RE: Answer - by Armin@netPI - August-23rd-2018, 09:04 AM
RE: Answer - by hannes - August-23rd-2018, 09:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] activate LED1/2 with Node-RED + fieldbus nodes container Christian_Rau 6 4,812 October-21st-2019, 10:30 AM
Last Post: Armin@netPI
  Access Denied to LED1 / LED2 crthomas1234 1 2,202 July-12th-2018, 04:36 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)