Go though this guide and follow step-by-step instructions to make a Dance Floor in Minecraft.
The very first thing you have to do is to make a redstone clock on the ground and set all the redstone repeaters to maximum delay.
Use the redstone dust to make it functional. Place five observers just next to it and use redstone dust in between them in the same way as shown in the image below.
After this, add one more layer of observers at the top and then a layer of redstone lamps at the top of observers.
Use redstone dust in front of the observers and add a lever on the ground to activate the dance floor.
You can change the pattern of the dance floor by placing some redstone repeaters as shown in the image below.