1, Realgar can effectively drive away centipedes. Sprinkle Realgar around the dormitory, and many creatures including centipedes will not come near again.
2. Sprinkle quicklime powder at the door and where it is possible to climb into the centipede.
Mothballs can drive away centipedes and put them in the corner of the room, which can drive away centipedes in a few days.