In 1968, I participated in my first Science Fair, and I saw a working Tricorder! It was another student's project, an assembly of different instruments for sensing things. I know it included radiation as well as temperature. It had a form of an electrical analog computer as well for calculations. It was all wrapped in a case modeled after the imaginary Tricorders on Star Trek. Pretty impressive for the time (the show was only in it's second season)!
Of course, that was a fun project that many have improved upon - there was an X Prize awarded for creating a mobile device that can "diagnose patients better than or equal to a panel of board certified physicians". And fans have constructed working props - even ones that can provide a variety of sensor readings. It's a great example of how the art of an SF program has inspired real-world engineering and development.
My own efforts are pretty modest, but it's fun to think about ways to craft a sort-of Tricorder device, given platforms like micro:bit or Circuit Playground Express with their multiple built in sensors. Early on I made a micro:bit version that displayed compass reading, light level and temperature, along with a small vocabulary of "alien" words; easy to do with the 5x5 LED matrix on the micro:bit (this was V1 micro:bit, so it didn't use the microphone). There was even an animated picture of the Enterprise.
Now, the Circuit Playground Express has good sensors but there is no graphic display, just the ring of ten neopixels - so how do you display readings? I wrote functions to display numbers by converting them to a string, and then, digit by digit, lighting up enough pixels to indicate the value. In addition, for the Circuit Python version I recorded the digits 0-9, and "point" and "minus" so I could have the device speak the number. I also think it's fun to use Morse code to display info, so for the Makecode version, I added the ability to display a number of sayings (maybe not too practical, but it was fun).
I've saved all this in a repository - here's the README
Tricorders
Code for Circuit Playground "tricorders"
- pycorder.py - "tricorder" program; toggle through idle/temp/light/gees with button A, get reading with B
- bach.py - provides musical notes, random music with touch A7, Star Wars Tune with A1
save .wav files in "digits/" directory 0.wav 1.wav 2.wav 3.wav 4.wav 5.wav 6.wav 7.wav 8.wav 9.wav gees.wav light.wav minus.wav point.wav temp.wav idle.wav
- Tricorder.js - Javascript version of CircuitPlayground Tricorder - toggle through idle/light/temp/gees/text modes with A+B, get reading with button A. when in "text" mode, tilt left/right to choose what phrase to display, press A to get morse code version
Tricorder.js
To use the Javascript code, open up https://makecode.adafruit.com start a new project, switch to Javascript mode and paste in the code. (You can also go directly to this link)
When you run the Makecode version, the program starts by blinking "hello" in Morse, then in "idle" mode, swirling a rainbow. Press A+B to jump to the next mode. Each mode shows a distinctive color:
- Light (yellow)
- Temperature (red) - note, switching the CPX switch left, gives Fahrenheit, right give Celsius
- Sound (green)
- Text (blue)
When in a sensing mode, you'll see a real time graphing of the current value - press "A" to read the current numeric value.
When you are in "text" mode, tilt left and right to choose the phrase:
0: spock = "live long and prosper"
1: yoda = "do or do not"
2: yoda2 = "size matters not"
3: yoda3 = "luminous beings are we"
4: kirk = "to boldly go"
5: picard = "engage"
Press A to see the words displayed in Morse code.
CircuitPython version: pycorder.py
This requires you start with a Circuit Playground running Circuit Python (well, of course). Copy all the .wav files to a directory "digits/" and pycorder.py to code.py and bach.py on the CPX.
When it starts, it will flash a few colors, then announce "idle", going into swirling colors.
Advance modes by pressing "A" button. Again, a signal color announces the mode switch, along with a voiced "temp", "light", "gees", "idle". When in a sensing mode, press B to get the current reading.
- Temp (red) - note, switching the CPX switch left, gives Fahrenheit, right give Celsius
- Light (yellow)
- Gees (green) - note, "gees" willl announce THREE different values; the X, Y and the Z axis values
For fun, the A1 touch pad will render a Star Wars tune, and A7 will play a snatch of random tones.
-------------------------------------------------
So there you have it, my version of "Tricorder" - I'd love to see how others take that idea and make the imaginary real!
This page (Tricorders!) was last updated on July 11, 2024.
Text editor powered by tinymce.