Make Your Own Working E.D.I.T.H. Glasses in Under 10 Steps
This project started about 3 or 4 months ago when I saw the movie Spiderman: Far From Home. I saw these glasses featured in the movie and I said, ” I have to make these.”
Fast forward 3 months and here we are. I have more features on the way, and I overdid a few, but all in all, I am pleased enough with the design to give it to you. I hope you enjoy it, and merry making!
Step 1: Dependency Installation
Install these dependencies on a fresh install of Raspberry Pi OS on a Pi Zero:
apt-get install pip3
pip3 install wolframalpha
pip3 install python-espeak
pip3 install python-Levenshtein
pip3 install adafruit-Blinka
pip3 install adafruit-ssd1306
pip3 install os
pip3 install cryptography
pip3 install torchvision
pip3 install torch
pip3 install wheel
pip3 install pymongo
pip3 install pycrypto
pip3 install Pillow
pip3 install picamera
pip3 install pandas
pip3 install mongo-db
pip3 install gpiozero
pip3 install fuzzywuzzy
pip3 install dialogflow
pip3 install subprocess
pip3 install sys
Step 2: Chatbot Coding
Note: It might be a little odd to do the code first, but trust me, it’s better this way.
Here’s the code: GitHub
Go to this website and sign in with Google. Create a new agent, choose the Mega Agent option, and upload the EDITH_Chatbot.zip file in the settings under Export and Import from the GitHub repository. I will be adding new features soon (Google will only let me create 10 projects a month).
If you want to add new intents, click Intents, then Add Intent. Under Training Phrases, add what you want it to respond to. For example, look at the screenshots.
Go here and create a service account for your chatbot. Make sure you make the account the admin.
Go to the service account tab, and click your service account’s “email”. Hit “Create Key”, and keep all settings the same. Add the key’s file name to the chatbot.py file in the GitHub repo, between the curly brackets where it says.
Step 3: Coding, Part Deux
I recommend using Thonny Python Editor for all my code.
Go to my code’s folder and run each file individually. If there is any errors, see below.
Make sure the adafruit_ssd1306, not adafruit-circuitpython-ssd1306 library is installed. I have wasted 3 days on that, so…
– ImportError: undefined symbol: aes_hw_encrypt:
Make sure the cryptography library is updated to 3.4.7.
– IndexError: list index out of range:
– picamera.exc.PiCameraError: Camera is not enabled. Try running ‘sudo raspi-config’ and ensure that the camera has been enabled:
If your camera is already enabled, make sure it’s wired correctly. The blue on the cable should be pointing towards the USB ports, and blue on the camera cable should be away from the lens.
– Exception: Error 1: Invalid appid:
Sign up for an App ID at developer.wolframalpha.com. Copy the App ID and paste it in the App ID spot on the code.
I’ve never had any errors on this module. If there is any, comment them below so I can update this.
No errors on this one either.
No errors again.
It should output something like this:
Model loaded('Captain Picard', 0.1774)
There’s almost no error possibility on this one.
Step 4: Wiring
EN to GPIO 14
GND with a 100K Resistor from GND to EN
LB to GPIO 15
– terminal to PP6
+ terminal to PP1
PP1 to +
PP6 to –
GPIO 14 to EN
GPIO 15 to LB
Step 5: Mounting
Test the whole shebang outside of the glasses and make sure there’s not any shorts. Mount the Raspberry Pi Zero on the glasses with the Blu-Tack, then discreetly tape the Pi to the bow once you get it in to a position you like.
Step 6: Testing in Real Life
Wear your glasses to the store and take some pictures. Try training the neural net by saying “train faces”. Talk to EDITH and test her responses. Does she work?
Step 7: Improvements
I will be adding more things in the future. Some examples are:
“You can take away my house, all my tricks and toys. One thing you can’t take away… I am Iron Man…”
– Tony Stark
These glasses are made for all the people who’ve always wanted Google Glass glasses, but couldn’t afford them. They are also made for every engineer, maker, and hobbyist that is looking forward to the future of what technology has to bring.
Thank you for viewing and making these glasses, and as always –
Merry Making, from g3holliday
In memory of Tony Stark/Iron Man…
For more projects and tech tips, click here