Notification when traffic lights turn green
As mentioned previously, the device needs to send a notification/alert to the driver. To be able to do that, the detection code has been developed. The following will explore how the code has been developed.
PushBullet app is used to provide the driver with a notification when green is detected. Pushbullet is an app that connects smart phones with a PC (raspberry pi in this scenario). The advantage of using it, is because it is available for Android, iOS, Chrome, Firefox, Safari, Opera, and Windows. Also, it is easy to use and work with.
To be able to use it, the app is downloaded on an Android phone and the signing up. Using the access token from pushBullet app through settings, was placed on the code to get accessed (line 7 in the notification code).
The figures below shows the output on the PushBullet app when the camera detects the green colour. As shown, it printed "Alert!!", "Green signal detected, you can go!" as a notification. The same message is sent every 30s until the device is turned off.
Figure 1: Output on the app when green is detected
Figure 2: Alert on the notification panel
Comments