Statistics: Posted by Steve T — Sun Oct 01, 2023 1:30 am
Statistics: Posted by Andrey.Mazlin — Wed Jul 26, 2023 9:42 am
Statistics: Posted by Mikael_63 — Wed Jul 26, 2023 6:40 am
Statistics: Posted by Mikael63 — Sun May 28, 2023 9:34 am
CODE:
#!/bin/bash# Make sure the LEDs on the front of the fitlet2 are off after booting up# Reference:# http://www.fit-pc.com/wiki/index.php?title=Application_note_-_fitlet2_controlling_front_LEDs# Note that after upgrade to Linux Kernel 5.15 in Ubuntu 22.04 from kernel 5.4 in Ubuntu 20.04# all previously known values must be offset by 512 (obtained by diffing the gpio chip values)# https://superuser.com/questions/1736349/gpio-numbering-changed-after-upgrade-to-ubuntu-22-04echo 947 > /sys/class/gpio/exportecho 948 > /sys/class/gpio/exportecho 949 > /sys/class/gpio/exportecho 950 > /sys/class/gpio/export# default state for "out" is off/lowecho out > /sys/class/gpio/gpio947/directionecho out > /sys/class/gpio/gpio948/directionecho out > /sys/class/gpio/gpio949/directionecho out > /sys/class/gpio/gpio950/directionecho 947 > /sys/class/gpio/unexportecho 948 > /sys/class/gpio/unexportecho 949 > /sys/class/gpio/unexportecho 950 > /sys/class/gpio/unexport
CODE:
class GPIO(Enum): led_1_green = "947" led_1_orange = "948" led_2_green = "949" led_2_orange = "950"
Statistics: Posted by malbers15 — Thu May 25, 2023 11:19 am
Statistics: Posted by Mikael63 — Wed May 17, 2023 8:43 pm
Statistics: Posted by Mikael63 — Mon May 08, 2023 5:55 pm
Statistics: Posted by Andrey.Mazlin — Sun Apr 30, 2023 8:58 am