An integrated platform enabling optogenetic illumination of Caenorhabditis elegans neurons and muscular force measurement in microstructured environments.