Biosensors and chemosensors based on the optical responses of polydiacetylenes.