Hi everyone, i'm new on arduino (and unfortunately not native english speaker :s )
I'm doing a project on witch i have an arduino yun used as a weather station powered by a solar panel.
To save the energy i wanted to turn the wifi off.
The algorithm i wanted to use on the loop function is :
data<-getData(captors);
turnWifiOn()
connect<-connectToWifi(SSID)
if connect(Fail)
insertInLocalBDD(data)
else
getDataFromLocalBDD()
insertAllDataInDistanteBDD()//i use the httpClient library to send the data by a webservice
deleteDataFromLocalBDD()
turnWifiOff()
delay(600000)//wait 15 min
I tried to used the bridge functions
Process.runShellCommand("ifdown -a");
but it doesn't work, i know runShellCommand works because i use it to get the date but ifdown/ifup don't.
Anyone know how could i do to switch the wifi off and on?
Have a look at this thread, I know it's about permanently disabling Wifi but the build in auto reboot (have never heard this before, just read it in the linked posting) should be a problem for your goal also: http://forum.arduino.cc/index.php?topic=189105.0
Sorry for this late answer but my arduino yun was toasted and the sdcard reader dead so i had to order a new one, with the new one everything is working properly thank you guys!