For the previous post click here.
Since we last checked in, Pumpkin Man’s cybernetic brains developed the ability to start up automatically and self-update. Also, there’s a new control interface for operating all eight relays. And perhaps most importantly, the team working on his physical form have made great strides. He now stands triumphantly!
Self-updating
I left the Raspberry Pi with Pumpkin Man, and since I wouldn’t always be around to manually start the web server and/or pull the latest code changes, I needed to make that process more accessible.
First, I configured the Raspberry Pi to start the server when it starts up,
which I did using the root crontab with the
@reboot
schedule (my server runs as root
for āØreasonsāØ).
Then, I set up three buttons in the web interface that do pretty much what they say on the tin:
- Update Code:
git pull
- Reboot:
sudo reboot
- Shut down:
sudo shutdown -h now
The “update code” button is a way for Sam and Kai to pull down new versions of the program without having to use the command line. The “shut down” button is there because it’s better to gracefully shut down rather than just cutting power. And the “reboot” button exists because code changes don’t take effect until the server is restarted, and this was easier than figuring out a way to restart the server process without rebooting the entire Pi.
I should definitely note that security is nonexistent in this program. There’s no authentication required to view this page. But I consider that fine because this is only running on the local network, so it’s only exposed to devices on the LAN anyway.
Direct relay control interface
Up until now, the only relay (of the eight on the board) that I was actually doing anything with was the one connected to the mouth (#1). Sam wanted a way to control any of the relays directly, which would help him with hooking up other pneumatic cylinders for other motions. He wanted both switches and buttons (the difference being that a button is only active as long as you hold it, but a switch preserves its state until you flip it again), so I built the man what he asked for:
The red rectangles at the top represent the current state of the relay (broadcast by the server). You have 16 different options! š For each relay, you may use a button or a checkbox, depending on your mood.
I see this as a useful general tool, but my aim is that once Pumpkin Man’s movements are solidified, there will be a more customized control interface. For instance, perhaps on the main page using the up arrow will cause him to stand up, or the A/D keys might control his arm movement.
The Man himself
Pumpkin Man’s physical form has made a lot of progress. I’ve been a little detached from the immediate work that’s happening, but last time I was in his presence I was able to see his mouth moving, and see him stand up. We also played around with what his voice might sound like. I’m consistently impressed with the work that the rest of the team is doing. I just make lil dinky computer things and they make TWO STORY TALL BEASTS so I think they’re definitely carrying this project.
Till next timeā¦
As always, my code is open source, though given the quality, I’m not sure why you’d want to use it.