For effective crowd mobility, smart cities must have smart transportation. Smart cities need a transportation system that is intelligent, simple, and effective. Here is a creative idea for modernizing the current public transit system. Hardware modules based on the Internet of Things (IoT) that are required for implementation are discussed in this work. Traffic circumstances and extra elements have been added to Dijkstra’s shortest path method. The proposed algorithm has been tested in a number of circumstances, and the outcomes have been displayed accordingly. At a cheaper cost, the suggested solution can upgrade the current infrastructure. With various request counts, the algorithm performs well.