A Smartphone-based System For Improving Pedestrian Safety Using Raspberry Pi