If you are a beginner, you can learn about Arduino - Rotary Angle Sensor here.
We can monitor everything with this project, but I took the rotary angle sensor as an example.
DemoWiring
- Stack PHPoC WiFi shield or PHPoC Shield on Arduino
- Connect pin GND, VCC and SIG of rotary angle sensor to GND, 5V and A0 of Arduino, respectively.
Data Flow
Arduino ---> PHPoC WiFi Shield ---> Web browser
Arduino reads the angle value from sensor and send the value to PHPoC WiFi Shield. When receiving the value, PHPoC WiFi Shield send it to Web Browser via websocket. JavaScript function visualizes the angle value on Gauge.
Note that: PHPoC shield has a built-in program to pass data from Arduino to web browser. Therefore, we don't need to care about it.
What We Need to Do- Set Wifi information for PHPoC shield (SSID and password)
- Upload new UI to PHPoC shield
- Write Arduino code
Setting Wifi Information for PHPoC Shield
Upload new Web UI to PHPoC Shield
- Download PHPoC source code remote_gauge.php (on code section).
- Upload it to PHPoC shield using PHPoC debugger according to this instruction.
Write Arduino Code
- Install PHPoC library for Arduino on Arduino IDE (see the instruction)
- See source code in code section.
- Click serial button on Arduino IDE to see the IP address.
- Open web browser, type
http://
replace_ip_address
/remote_gauge.php
- Click connect button and test it.
This project does the same works but it used other hardware platform.
The Best Arduino Starter Kit for BeginnerSee The Best Arduino Kit for Beginners
Function References
Comments