L0G1C Posted September 1, 2014 Share Posted September 1, 2014 In case anyone's wondering how to toggle the expansion pins for use in sripts/infusions # Install the GPIO kernel drivers opkg update opkg install kmod-gpio-dev # Define which IO to change GPIO=6 # Make it accessible echo $GPIO > /sys/class/gpio/export # Set it as an Output (Not an Input) echo "out" > /sys/class/gpio/gpio$GPIO/direction # Set the pin High echo 1 > /sys/class/gpio/gpio$GPIO/value # Set the pin Low echo 0 > /sys/class/gpio/gpio$GPIO/value # Set it as an Input (Not an Output) echo "in" > /sys/class/gpio/gpio$GPIO/direction # Get/read the pins current value echo /sys/class/gpio/gpio$GPIO/direction Moving beyond this, anyone know how to use the GPIO pins for PWM outputs? I found the module: kmod-pwm-gpio and what looks to be an example of how this or a similar module works: https://sites.google.com/site/bifferboard/Home/pwm-gpio But whenever I run find /sys -iname '*pwm*' I get back nothing. Anyone know? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.