UPDATE! I discovered the "drake.py" file in my github was NOT the program I describe here. I re-wrote the drake.py program and have replaced it in the archive.
I enjoy the prospect of SETI, the Search for Extraterrestrial Intelligence. So it's only natural that I'd like to do something with the Drake equation "... the probabilistic argument used to estimate the number of active, communicative extraterrestrial civilizations in the Milky Way Galaxy." (https://en.wikipedia.org/wiki/Drake_equation)
Happily I found an example of coding this calculation (https://github.com/DeaconDesperado/pydrake) that I could adapt for this project. I've put the code in a repository "Drake"
Files
- drake.py - calculate the Drake equation- based on https://github.com/DeaconDesperado/pydrake
- sagan - Carl Sagan quotes
- wise.py - selects quotes to display
- ncount.py - used for blinking neopixels
- prt.py - allows prt() to print to REPL or HID keyboard input
Copy the files to your NeoTrinkey running (renaming drake.py to "code.py").
Touch pad#1 for the NeoTrinkey to calculate and print out the estimate - since the factors are coded as ranges, you will get different answers every time. After presenting the calculations, the program will also give a random quote from Carl Sagan - he describes the Drake equation in chapter 12 of his book "Cosmos." This is the "Science" part of my project
For fun, touching pad#2 will give a list of the names of the civilized planets - basically generating a random name for as many as the program calculated (plus Earth). Be aware that the number can be large and this will take a while. And yes, this is the "Fiction" part. :)
Change REPL=False to REPL=True to have output go as if typed via the keyboard.
Output looks like this:
How Many Alien Civilations?Number of stars in the Milky Way 1e+11Fraction of stars with planetary systems 0.131585Number of planets suitable for life 4Fraction of suitable planets that develop life 0.283515Fraction of life that becomes sentient and eventually intelligent 0.118758Fraction of intelligent life that advances to the point of communication 0.0128657Adjustment for incidence of self-destruction 1.10132e-06possible number of civilizations 25Who are we? We find that we live on an insignificant planet of a humdrum star lost in a galaxy tucked away in some forgotten corner of a universe in which there are far more galaxies than people. Carl Sagan1: Earth2: Gieuas3: Zoiah4: Syoei5: Mieud6: Zoafas7: Syan8: Theuei9: Kieei10: Zoghie11: Syaie12: Syafnk13: Zoyah14: Paeah15: Miiah16: Miuof17: Reaah18: Ahghd19: Aheei20: Giafn21: Reud22: Kiyah23: Kighn24: Theie25: Miud26: Kieuof
Hope you have fun with this - may it give you something to ponder as you look at the night sky.
This page (Science + Fiction = Fun!) was last updated on May 16, 2025.
Text editor powered by tinymce.