Книга: Best Arduino Automation Project: Arduino Project Ideas for Automated System
Назад: Example
Дальше: Instructions

to illustrate our venture, we created a traffic mild with the Arduino Yun. The visitors mild consists of three LEDs and a real-Time-Clock. The lights will exchange at a given c language. The Arduino Yun saves the time that the traffic light will flip green/pink. Then, it runs a php document that makes a connection to the web MySQL database and inserts the statistics acquired from the Arduino Yun. An Android app (created with Android Studio) will retrieve the date from that database. that is carried out via every other personal home page document that returns the site visitors light facts in JSON format. The app calculates the favored pace and it'll display a countdown timer whilst you're now not able to pass the green mild.

1.PNG

To calculate the favored velocity, the app wishes to recognize the space to the visitors mild. that is done by calculating the distance according to the GPS coordinates. however sadly, a GPS in a smartphone isn't specific sufficient to show our concept because we are working on a small scale. it is why we made use of the ultrasonic ranging module (HC-SR04). The Arduino Yun receives the distance among the auto and the traffic mild via 433 MHz RF modules. whenever the Yun receives a new dimension from the alternative Arduino, it updates the statistics within the database. Now, the app is capable of calculate the desired velocity.

1.jpg

Назад: Example
Дальше: Instructions