--"wall left, open right", and
--"wall right, open left"
which in turn controls the cockroaches movement (it's not going to move left if it feels a 'wall' on the left.
I recently realized that probably a better way of controlling the cockroaches movements is by just putting one LED on each side of its head, since they run away from light. Just turn both on to make it go forward, and one on to make it turn left or right. LEDs would require a lot less power and mechanical complexity. I'm going to try it out.
Cockroach backpack paradigm being tested, cockroach responded as desired to the backpack commands
Cockroach backpack being tested, nitinol constriction moves antenna flap.