#Q Station C Demo
This is a litte Belleds Q Station demo program written in C. It connects your Belleds Q Station with your Adafruit.io interface. You can turn one of your bulbs on / off (for now). You need to add an on / off switch wich is connected to a feed named "qstation" in your Adafruit.io interaface.
##Instructions
-
Install build depencies (See https://wiki.openwrt.org/doc/howto/buildroot.exigence for more information)
sudo apt-get install git-core subversion mercurial build-essential libssl-dev libncurses5-dev unzip gawk
-
Clone OpenWRT from github (Do the following things as non root user!)
git clone -b attitude_adjustment https://github.com/openwrt/openwrt.git
-
Enter OpenWRT dir
cd openwrt
-
Update and install packages
./scripts/feeds update -a ./scripts/feeds install -a
-
Check prerequisites and prepare toolchain buidling (prereq will show you missing depencies)
make defconfig make prereq make menuconfig
-
Now check the system and build toolchain options in menuconfig
Target System: Atheros (AR7xx/AR9xx) [*] Build the OpenWRT based Toolchain
-
Build the toolchain (this will take up to three hours!)
make V=99
-
Back to your user dir
cd ..
-
Clone the source code from github with git
git clone https://github.com/Mast3rChief/QStation_Demo.git
-
Enter QStation Demo dir
cd QStation_Demo
-
Compile everything
make main
-
Check file information of the compilied main program
file main
-
The output should look something like this:
main: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1...
-
Copy the program to your QStation and create the config.ini with your Adafruit.io API key. For example download it from your webserver. We use the tmp dir for testing only!
cd /tmp mkdir QStation_Demo cd QStation_Demo scp user@ip:/home/user/QStation_Demo/* . vim config.ini # press i for insert mode # paste your AIO API Key (No spaces) # press escape and :wq to exit vim
-
Run the program and have fun
./main MD1AC44200003128
##Screenshots
##Credits