Do Not Write to Pin Simulators!
A recurring theme in the Piazza/Forum questions is about people wanting to programmatically change the value of a Pin Simulator. You should not do this!
Doing so breaks the analogy here: the idea is that a pin simulator is analogous to a real-world sensor. In the real world, your app would not be telling the sensor to change it's value. Your device (the pet feeder) would be making some change in the world (e.g. making your pet happier or less hungry) and then the sensor would read that that change has happened in the world and update itself. The app would not be updating the sensor.
The way that works in your prototype is this:
- Prototyper (you) sets values in the Pin Simulator using your mouse to describe the state of the world.
- Device app reads from Pin Simulator to find out what the world is like.
- User interacts with companion app to tell the Device to make some change in the world.
- Prototyper (you) sets new values in the Pin Simulators using your mouse to describe how the state of the world has changed due to the action taken by your device.
No where in there is either the companion phone app or the device app itself programmatically updating the Pin Simulator.