Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Fisherworks

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Fisherworks reacted to robertoj in Orange Pi Zero 3 GPIO   
    Ok. I got one output pin to work. 😀
     
    This is how to do it in OrangePi Zero 3, pin 8 PH2:
     

     
    In Bash as root:
    # addgroup --system gpio
    # chown root:gpio /dev/gpiochip0
    # chmod 660 /dev/gpiochip0
    # nano /etc/udev/rules.d/61-gpio-tools.rules
    {add line SUBSYSTEM=="gpio",KERNEL=="gpiochip*", GROUP="gpio", MODE="0660"}
    # usermod -a -G gpio myusername
    # apt install python3-dev
    # reboot
     
    In a new folder for your Python script, as normal user:
    $ python3 -m venv .venv
    $ source .venv/bin/activate
    $ pip install gpiod
     
    Create script (example in https://pypi.org/project/gpiod/ with one fix):
    $ nano blink_pin.py
     
    import time import gpiod #needed in example from gpiod.line import Direction, Value #Calculating PH2 "line" number #H=8 #2=2 #line=(8-1)x32+2=226 #also shown in https://github.com/rm-hull/OPi.GPIO/issues/79 LINE = 226 with gpiod.request_lines( "/dev/gpiochip0", consumer="blink-example", config={ LINE: gpiod.LineSettings( direction=Direction.OUTPUT, output_value=Value.ACTIVE ) }, ) as request: while True: request.set_value(LINE, Value.ACTIVE) time.sleep(1) request.set_value(LINE, Value.INACTIVE) time.sleep(1)  
    Run script:
    $ python3 blink_pin.py
     
    When done working with your project:
    $ deactivate
     
    Pin 8 PH2 turns ON and OFF 😄
    I haven't tested the other pins yet

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.