Skip to content

Instantly share code, notes, and snippets.

use std::error::Error;
use std::io;
use rppal::gpio::{Gpio, Trigger}; // 0.16.1
pub const BTN1: u8 = 13;
pub const BTN2: u8 = 4;
fn main() -> Result<(), Box<dyn Error>> {
let mut btns = [
@manio
manio / wifi-checker.sh
Created March 3, 2025 12:11
sample script which is stopping/starting aawgd based on nearby WiFi network visibility
#!/bin/sh
# this is a sample script which is testing if there is available ESSID on the WiFi
# and according to the result it is starting/stopping aawgd
# more info: https://github.com/nisargjhaveri/WirelessAndroidAutoDongle/issues/212#issuecomment-2692423007
delaytime=5
essid="searchedAPName"
while [ true ]; do
wifiavail='iw dev wlan0 scan|grep SSID'