This is a proof of concept for setting up the newly released arduino Yun as light controller. A web server was setup on arduino Yun with support of MySQL and PHP. Light status is controlled with MySQL queries and even when a button is pressed triggers an SQL query, this is the advantage of Arduino Yun’s Bridge, you can interact between the ATmega 32U4 (Arduino side) and the Linino AR9331(Linux side). Below are some pictures of the setup and also a demo video.
Before proceeding with the setup I have to mention that at the moment I bypassed the security aspect of this project.
Use it at your own risk. If this is going to be in public you are exposed and vulnerable in attacks.
Setup of the Linino (Linux) side of arduino:
Download all necessary files from the below link:
- Install LAMP stack following the below website:
- Download the below file and put then in the desired folder of the webserver running on Arduino (skip downloading if you already downloaded the files from the first step):
I created the homeautomation database and the LEDstatus and webstatus tables as below :
..and added two entries in the LEDstatus table:
- webstatus table:
- Create some bash scripts for different mysql queries and place them in the root folder (skip downloading if you already downloaded the files from the first step) :
- Download the arduino sketch (skip downloading if you already downloaded the files from the first step):
Many thanks to the below: