How to use toggle switches with arduino

Ground the middle pin. Connect the other ones to data pins appropriately.