Requesting comment and critical analysis:
So far I have written individual python modules to test each of my robot's subsystems (no classes). I am starting to think about how the "be a robot" code should look.
It has to handle:
- subsystem initialization
- access to subsystem state values
- some robot behavior: Whimpy, Explorer, Find and hide in a corner, "lonely" (find person and chat their ears off), "Afraid of the dark", ...
- print "experiences" (events, decisions, and status) to remote shell, and to robot_memories.log safely (minimize file open time)
- subsystem tear down on control-c caught by main()
- monitor remaining battery life and shutdown to protect self
I haven't figured out how to program my robot's bumpers for interrupts yet.
At this point, I want to try using some of the subsystems to learn how to design and organize the robot code.
This is the direction I'm thinking can work now. (Eventually, with interrupt sensing, and interrupt handling).
Things I don't know yet:
- How to code the passing of cancel functions, or objects to the cntrl_c_handler
- Do I need to have an interface board object to
coordinate accesses to the pigpio and spi devices(MCP3008, 23S17)
