Apollo DSKY replica files, instructions, upgrades and all information I figure out
🐦 Twitter
| 📺 YouTube
| 🌍 mkme.org
| ☕ Buy me a coffee! |
Support this project and become a patron on Patreon.
Chat: Discord!
Forked From; https://github.com/ManoDaSilva/AGC_DSKY_Replica to add my own changes and mods.
I Will add laser cut keys as well as changes to the Arduino code and display usage.
Posting all files here so someday I can give back to the orginal project
I will doccument the whole build in a Playlist on MKME Lab channel
Forum thread documenting this build:
http://forum.mkme.org/viewtopic.php?f=4&t=1156
Exact parts and supplies I used
Component | Source |
---|---|
Raspberry Pi 4 | https://amzn.to/3dSqno6 |
Nextion Enhanced 3.5 Display | https://amzn.to/3s5FimY |
Fosa 10 PCs Mechanical Keyboard Switch Blue Switch Transparent Keyswitch | https://amzn.to/3DTQPbo |
Grey PLA | https://amzn.to/3GJDGna |
Black PLA | https://amzn.to/3J2qGKm |
M33mm x 40 cap screws | https://ebay.us/bAamab |
M3x16 countersunk (front plate holddown) | https://amzn.to/3urwtVX |
M3 Brass Inserts (most of DSKY) | https://amzn.to/3owhshP |
M3x5mm(L)-5.4mm(OD) brass inserts (some holes are big | https://amzn.to/35Yzz9P |
90 degree USBC Cable | https://amzn.to/3otdNkN |
90 degree Micro HDMI | https://amzn.to/3sq0qDf |
DSKY LED PCB KIT | https://store.mkme.org/?product=apollo-guidance-computer-dsky-led-panel |
DSKY LED PCB KIT Mount Files | https://store.mkme.org/?product=apollo-guidance-computer-dsky-led-panel-3d-printable-mount-files |
Full DSKY Build Playlist: https://www.youtube.com/watch?v=DMqIMjEPb30&list=PLxyM2a_cfnzg2HdUAhilZUEfA2GcerdL1
All initial videos are included in the forum thread above- they are VLOGs of the build steps and show a lot of how to make it
- Print all parts and assemble. No way I'm typing this up :)
Buy a kit from my store here: https://store.mkme.org/?product=apollo-guidance-computer-dsky-led-panel
-
Program the Arduino NANO with included sketch (Mine is updated/altered)
-
Program Pro-Micro with included sketch (original didnt work- mine is fixed)
Here is my discussion with Ron Burkey to make this all work. There were NUMEROUS fixes needed. Thanks Ron! virtualagc/virtualagc#1170
Install Raspbian image
Enable SSH, VNC and Serial in sudo raspi-config
sudo apt-get update
sudo apt-get upgrade
sudo reboot
sudo apt-get install wx3.0-headers
sudo apt-get install liballegro4-dev
sudo apt-get install libx11-dev
sudo apt-get install git (already installed)
sudo apt-get install libwxgtk3.0
sudo apt-get install libncurses5-dev
sudo apt-get install libsdl-dev
sudo apt-get install screen
pip install pyserial
--fix-missing on anny errors you get (I had several)
git clone --depth 1 https://github.com/virtualagc/virtualagc
cd virtualagc
make clean install
Install provided test.sh on the Desktop
Test run by
sudo bash ./test.sh
Current contents are:
#!/bin/bash
echo "Enabling numlock"
setleds=+num
# Turn Numlock on for the TTYs:
for tty in /dev/tty[1-6]; do
/usr/bin/setleds -D +num < "$tty";
done
echo "Starting VirtualAGC"
screen -dm bash -c "cd /home/pi/virtualagc/yaAGC/; ./yaAGC --port=19697 --core=../Colossus249/Colossus249.bin"
echo "Starting DSKY"
cd /home/pi/virtualagc/piPeripheral/
python3 ericDSKY.py
This will be referenced in automatic startup below- edit this file to change what Apollo code we want to run!
Install provided ericDSKY.py in /home/pi/virtualagc/piPeripheral/
Contents of ericDSKY.py
Way too big for the readme but I had to edit from the original file to run
https://forums.raspberrypi.com/viewtopic.php?t=263191,
Make out shell script on Desktop exectable
chmod 755 test.sh
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
Add this line:
@lxterminal -e /home/pi/Desktop/test.sh
sudo reboot
Source: https://magpi.raspberrypi.com/articles/off-switch-raspberry-pi
This code creates a button on GPIO 21, waits for it to be pressed, then executes the system command to power down the Raspberry Pi. GPIO 21 is nice because it’s on pin 40 of the 40-pin header and sits right next to a ground connection on pin 39. This combination makes it difficult for an off-switch to be plugged in incorrectly.
Copy shutdown.py and shutdown.sh to Desktop
By doing it this way we will have terminal windows open for both the sim and for the shutdown script- Handy for debugging and monitoring!
Do the below to make the bash scrip executable and use it to run python (adding python to cron does not work for unknown reason)
Make out shell script on Desktop exectable
chmod 755 shutdown.sh
We will add this to cron same as this tutorial: https://raspberrytips.com/autostart-a-program-on-boot/
and this one: https://www.raspberrypi-spy.co.uk/2013/07/running-a-python-script-at-boot-using-cron/#:~:text=Using%20your%20cursor%20keys%20scroll%20to%20the%20bottom,want%20to%20run%20Python%20with%20the%20script%20MyScript.py.
Open a terminal.
Open the crontab file:
crontab -e
You get an empty crontab file- we will add a line to the bottom below the comments
Paste a line starting with reboot, and add your script command just after, like this:
@reboot /home/pi/Desktop/shutdown.sh
Save and exit (CTRL+O, CTRL+X with nano).
I couldnt get the python file to run directly from Cron (probably because it requires Python3) I also tried autstart (interferes with virtualAGC) and another method which failed too. This works!
shutdown.py contents:
#!/usr/bin/env python3
from gpiozero import Button
from signal import pause
import os, sys
offGPIO = int(sys.argv[1]) if len(sys.argv) >= 2 else 21
holdTime = int(sys.argv[2]) if len(sys.argv) >= 3 else 6
# the function called to shut down the RPI
def shutdown():
os.system("sudo poweroff")
btn = Button(offGPIO, hold_time=holdTime)
btn.when_held = shutdown
pause() # handle the button presses in the background
shutdown.sh contents:
#!/bin/bash
echo "Starting Safe SHutdown"
cd /home/pi/Desktop/
python3 shutdown.py
sudo apt-get install python2
The Raspberry Pi will be using YaAGC : https://www.ibiblio.org/apollo/yaAGC.html?msclkid=bfcc1461aef711ecba1be6cac11bfc4d
All AGC docs: https://www.ibiblio.org/apollo/links2.html
DSKY explanation and instructions http://www.ibiblio.org/apollo/yaDSKY.html
Ultimate AGC Talk Video: https://www.youtube.com/watch?v=xx7Lfh5SKUQ
Interesting AGC Talk https://www.youtube.com/watch?v=nDZKzGYVFEk
Eldon Hall Talk Pt1 https://www.youtube.com/watch?v=PbX8OtPe3eY
Good explanation of the AGC https://www.youtube.com/watch?v=J-5aT2zSfSA
Great overview of Apollo computers https://www.youtube.com/watch?v=YGymMMQbPbo
From http://www.ibiblio.org/apollo/download.html#Raspberry_Pi_Raspbian_:
this was a helpful bug report virtualagc/virtualagc#1103
Forked From; https://github.com/ManoDaSilva/AGC_DSKY_Replica
Mechanically accurate Apollo DSKY replica.
This project is based off the 3D models I re-created from the original MIT Instrumentation Labs drawings (those models can be found on VirtualAGC's GitHub). In order to 3D print them, I slightly modified them (widened some holes for brass inserts, keyboard, etc).
A Raspberry Pi running VirtualAGC is doing the grunt work, the display is a simple LCD and the status lights are LEDs.
More on the Hackaday.io project page.