Home
Name Modified Size InfoDownloads / Week
Wrapper 2015-04-26
Bash_script 2015-04-26
PHP_software 2015-04-26
Java 2015-04-26
Python_software 2015-04-26
Arduino_software 2015-04-26
Scheme.pdf 2015-04-26 16.5 kB
README.txt 2015-04-26 1.9 kB
Totals: 8 Items   18.4 kB 0
You need at least one Arduino board mega 2560 with an ethernet shield.
Change the IP address and subnetmask. Adapt maybe the Arduino number accordingly.
Arduino1 for the first, Arduino2 for the second and so on...
Upload the Arduino file to the Arduino.

Install a server with MQTT and activate the websocket support, on this server install PHP and Python.
In the root directory of you PHP server copy the following files:
PHP_software/index.html # change the ip address and websocket port
PHP_software/config2.php
PHP_software/original_up.png
PHP_software/original_down.png
Java/MQTT.js
Java/JQUERRY.js
Python_software/arduino_v4_2.py # change the ip address and port used by MQTT broker
Bash_script/Start_Script.sh
Wrapper/wrapper.c
This last file you have to compile with following rules:
(You propably have to install GCC first)
gcc wrapper.c -o php_root
chown root php_root
chmod u=rwx,go=xr,+s php_root

That should be enough to have it work. Connect every component to a switch.

IN/OUTPUTs used on Arduino
pinMode(22, OUTPUT);
pinMode(23, OUTPUT);
pinMode(24, OUTPUT);
pinMode(25, OUTPUT);
pinMode(26, OUTPUT);
pinMode(27, OUTPUT);
pinMode(28, OUTPUT);
pinMode(29, OUTPUT);
pinMode(30, OUTPUT);
pinMode(31, OUTPUT);
pinMode(32, OUTPUT);
pinMode(33, OUTPUT);
pinMode(34, OUTPUT);
pinMode(35, OUTPUT);
pinMode(36, OUTPUT);
pinMode(37, OUTPUT);
pinMode(38, INPUT_PULLUP);
pinMode(39, INPUT_PULLUP);
pinMode(40, INPUT_PULLUP);
pinMode(41, INPUT_PULLUP);
pinMode(42, INPUT_PULLUP);
pinMode(43, INPUT_PULLUP);
pinMode(44, INPUT_PULLUP);
pinMode(45, INPUT_PULLUP);
pinMode(46, INPUT_PULLUP);
pinMode(47, INPUT_PULLUP);
pinMode(48, INPUT_PULLUP);
pinMode(49, INPUT_PULLUP);
pinMode(6, INPUT_PULLUP);
pinMode(7, INPUT_PULLUP);
pinMode(8, INPUT_PULLUP);
pinMode(9, INPUT_PULLUP);

All this is a very brief description.
If you have some questions don't hesitate to contact me @
ha.mrirules@gmail.com

My next step is to provide a video


Source: README.txt, updated 2015-04-26