linux - Raspberry pi network -


is possible write program connect , disconnect raspberry pi, running raspbian, wifi network. instance connect network when picture taken due motion observed. connect network send out email , disconnect itself. possible , simplest way this.

note: when raspberry pi connected network whole network seems slow after amount of time why want connect , disconnect.

if pi able connect @ will, assume has interface configured appropriately local network. knowing this, connecting , disconnecting simple bash command ifup , ifdown. if you're using bash script:

# code taking , saving picture (i'll leave you)   ifup wlan0 echo "raspberry pi took pic!" | mail -s "new picture taken" you@yourdomain.com ifdown wlan0  # more code finish out program 

of course, replace wlan0 relevant interface system (which may wlan0). happy coding! :)


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -