Search the Community
Showing results for tags 'GPIO'.
Super noob here, so please let me know if I need to move my questions to another place in these forums. I just got my nano, and have been a long time raspberry pi enthusiast, so I'm super stoked to start joining the two. I've already got it connected and am listening on the open SSID. It's easy to see the power of the pineapple. My specific curiosity right now is how to write a program to perform GPIO tasks on the raspberry pi based on events occurring on a wireless LAN broadcast by the pineapple. An example would be to turn an LED on if a specific MAC address is detected, and within some power threshold. My lack of knowledge at this stage is how the pineapple fits with the pi (or other "host" for that matter). Specifically, do I write my program (probably python) and host it on the pi? If so, how does it interact with the pineapple to get the MAC address and connection power dB? If not, do I host it on the pineapple? If so, how does the program interact with the pi to utilize its GPIO pins? How would I compile my code so that the pineapple can use it? Are the modules already available that can get me most of the way to my goal? Mostly "big picture" type questions of how the two powerful tools can interact with one another to harness the full power of each device. Any help or sources for further reading would be greatly appreciated. I've found when learning things like this that I don't even have the correct vocabulary to properly search the forums and internet, so even simple help with search terms would be a great place to start.
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?