Add a UI to your standalone Raspberry Pi project using your Android phone
Add a UI to your standalone Raspberry Pi project using your Android or iOS phone
pip install piui
piui_plus_examples.zipfile from github.com/dps/piui-sdcards. Unzip it and you'll find a 4Gb sd card image named
piui_plus_examples.img. Write it to an SD card by following the usual Raspberry Pi instructions. At present, this image is based on Occidentalis 0.2.
Assuming you have the same wifi adapter I do, this will work out of the box. If not, read the Pi-Point docs to configure for your own hardware.
On first boot, you can sync the latest piui source with:
cd piui git pull originand start the demo app with:
nl80211driver does not support that device (which uses a Realtek chipset). This blog post explains how to make it work - thanks Paul!
Add an entry to
/etc/hostsmapping the DNS name
piuito the address you configured for the Pi in the step above. Assuming it's
192.168.1.1, then you should add the following to
nginx- nginx is an HTTP server and reverse proxy, we use it to multiplex requests to your app and the
sudo apt-get install nginx
Configure nginx using the config file in the PiUi github repo - copy this to
/etc/nginx/nginx.confand restart nginx.
sudo /etc/init.d/nginx restart
Get the piui source code from github
cd /home/pi git clone https://github.com/dps/piui.git
Arrange for the
piui-supervisorto run on boot.
sudo cp /home/pi/piui/supervisor/piui-supervisor /etc/init.d sudo update-rc.d piui-supervisor defaults
Done! Run the demo app:
cd piui python piui_demo.py
Connect your phone to the wifi AP and navigate to 'http://piui/'.
Copyright (c) 2013, David Singleton All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.