Prayer is an obligation for Muslims in the context of worship, which means that a Muslim is obliged to pray even though he is in a vehicle. In carrying out prayers, there are several conditions for valid prayer, including facing the Qibla direction, scholars argue that facing the Qibla direction is a valid condition for prayer. However, when a Muslim prays in a vehicle, the relative qibla direction of the place changes as the vehicle turns direction. With the aim of making it easier for Muslims to carry out prayers in a vehicle "automatic prayer rug prototype with an Arduino microcontroller" using a CMPS 12 sensor as a Qibla direction detector and assisted by a dc motor that can direct the Qibla direction when the vehicle turns automatically.