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.

dandan7932

Members
  • Joined

  • Last visited

Everything posted by dandan7932

  1. Hey Dandaman46, I managed to kinda hack the functionality i wanted with the wake-up timer and a magnetic hall effect sensor (A3144 or DRV5053) : import os import OPi.GPIO as GPIO from OPi.pin_mappings import sunxi assert sunxi("PG11") == 203 # GPIO-G11 - Wake/Sleep Pin DRV5053 button_wake = "PG11" GPIO.add_event_detect(button_wake, GPIO.RISING, callback=None, bouncetime=200) GPIO.setmode(GPIO.SUNXI) GPIO.setwarnings(False) # disable when production ready.. GPIO.setup(button_wake, GPIO.IN) # PG11 as Sleep/Wake Pin # pull it LOW (magnet away) to wake (needs pull-down resistor?) # pull HIGH (magnet near) to sleep (needs pull-up resistor?) if GPIO.input(button_wake) == GPIO.HIGH: os.system("echo +5 > /sys/class/rtc/rtc0/wakealarm") os.system("echo mem > /sys/power/state") elif GPIO.input(button_wake) == GPIO.LOW: pass
  2. Hello and Happy New Year my lovely Armbian friends! I am aware that this topic is a reoccurring one, having abused the search function beyond its functional capabilities I have found the following threads that deal with somekind of sleep and wake with separate pins for each function: how to wake up OPi3 gpio to inform of system shutdown I would like to know if it is possible to have 1 pin act as both sleep and wake depending on its voltage? - if so how could i modify one of those dts in the first link? I am new to dts so not sure how the pin mappings are assigned. for example, I have a DRV5053 hall effect sensor that will act as a magnetic switch, when the magnet is near (sleep here) the output voltage increases to max of 2v, when the magnet is away (wake here) the output voltage drops to near 0v. I am using pygame to run a GUI for a small oled screen, it is ok if the GUI restarts as it is launched after autologin by .bashrc (which i assume gets reloaded on system wake?) .. however I would like to use sleep and wake to preserve the current state within the GUI, as the boot time from completely disconnecting power & reconnecting (as if a physical switch) is a little long at around a full minute.. Thank you so much for your help

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.