Thursday 15 December 2016

Making pi upload pics on bootup

Following the task from this week, I had to combine almost everything I did into the ultimate task. The goal was to make pi start taking pictures just as it boots up and then upload them consecutively to a web server. Of course in order to upload pictures the pi must be connected to the internet. And the script to take pictures and upload them should also be working. Since all of these things were working individually, it was time to put all of this together.
One would think that making pi take pictures on boot up is easy as all that is needed to done is call the script from rc.local and things would fall into place. So I thought. But that was not the case. As it turns out that writing commands in the rc.local only ensures that the commands are run. It does not ensure that the commands are run successfully. This of course was problematic as I had no way to ensure the network was up before pi could start clicking pictures. The whole thing was a synchronization mess. I need to find a better and more clean way of doing this.

No comments:

Post a Comment