[{"element_type":"text","content":"\n  \n        \u003cp\u003eAn invention was patented in 1948 that has assisted millions in making decisions. Long before widespread access to computers, this device - completely mechanical gave instant answers to questions - no AI or LLM required.\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eI refer to ... the \u003ca title=\"Magic 8 Ball\" href=\"https://www.mentalfloss.com/article/67702/brief-history-magic-8-ball\" target=\"_blank\"\u003eMagic 8 Ball.\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eIt doesn't take much of a web search to find examples of programs to recreate the Magic 8 Ball. It's an easy exercise - for example, here's one at \u003ca href=\"https://www.geeksforgeeks.org/magic-8-ball-program-in-python/\" target=\"_blank\"\u003egeeksforgeeks.org \u003c/a\u003ethat made a fun starting point for me to adapt for some Adafruit fun.\u003c/p\u003e\n\u003cp\u003eIt wasn't hard to adapt that code into CircuitPython for the NeoTrinkey. I put together\u0026nbsp;\u003ca href=\"https://github.com/mrklingon/DecisionMaker/blob/main/magic8.py\" target=\"_blank\"\u003eMagic8.py\u003c/a\u003e. Load that on a NeoTrinkey - copied to code.py. When run, it will display a blinking idle pattern. Touch either touch pad and it will go to Green (yes), Yellow (maybe) or Red (no). If you are running it in an IDE like Mu or Thonny, the REPL will print an answer appropriate to the verdict. Touch the pad again to return to the idle pattern.\u003c/p\u003e\n\u003cp\u003eBut, why not make a better, smarter tool - something that you can use to\u0026nbsp;\u003cem\u003ecalculate\u003c/em\u003e the answer? And why not have it SPEAK the answer?\u003c/p\u003e\n\u003cp\u003eIn my \u003ca href=\"https://github.com/mrklingon/DecisionMaker/tree/main\" target=\"_blank\"\u003eDecisionMaker \u003c/a\u003erepository you'll find all you need to do that.\u003c/p\u003e\n\u003cp\u003eStarting with \u003ca href=\"https://Makecode.adafruit.com\" target=\"_blank\"\u003eMakeCode\u003c/a\u003e I created a two-mode \u003ca title=\"Makecode version\" href=\"https://makecode.com/_g7fc1C1AzhPE\"\u003eDecisonMaker \u003c/a\u003efor Circuit Playground Express. With the switch to the right, press the \"A\" button and it will give you a Green/Yellow/Red verdict. In addition, IF it is plugged in to a computer with a usb cable, touching A4 will give you a verdict\u0026nbsp;\u003cem\u003eand\u0026nbsp;\u003cstrong\u003eTYPE\u003c/strong\u003e\u003c/em\u003e the appropriate message text. (note: If the CPX is not connected to a computer, touching A4 will crash the program; also, if you copy DecisionMaker.js \u003cem\u003einto\u003c/em\u003e MakeCode, you'll need to add the Keyboard Extension; it's already in the version at this \u003ca title=\"MakeCode version\" href=\"https://makecode.com/_g7fc1C1AzhPE\" target=\"_blank\"\u003elink\u003c/a\u003e).\u003c/p\u003e\n\u003cp\u003eThe\u0026nbsp;\u003cem\u003eother\u0026nbsp;\u003c/em\u003emode is what you get when you move the switch to the left. This lets you give more input for the program to evaluate your question. Essentially, break your question into factors (as many as you want) and give each factor a value good or bad,\u0026nbsp;\u003cem\u003ethen\u003c/em\u003e ask the DecisionMaker to weigh in. With each factor press A from one to five times (for Good) and B from one to five times (for Bad). After scoring the factor, touch A1 to add it in.\u003c/p\u003e\n\u003cp\u003eFor example, lets say your question is \"Should I go see the new movie\u0026nbsp;\u003cem\u003eSuper Space Blockbuster XIII?\"\u003c/em\u003e and you break down the factors to:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eI love Super Space Blockbusters - read all the books and comics and have all the action figures\u003c/li\u003e\n\u003cli\u003eI didn't like the last three that much\u003c/li\u003e\n\u003cli\u003eI hear they added famous actor Kirk Handsome\u003c/li\u003e\n\u003cli\u003eI think it will be streaming in a couple of months.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eSo, here's the steps in the evaluation:\u003c/p\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n      \n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/008/original/image0_%282%29.jpeg?1721685265","metadata":{"caption":"I love Super Space Blockbusters - read all the books and comics and have all the action figures  - So we give it ++++"}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/010/original/image1_%281%29.jpeg?1721685350","metadata":{"caption":"I didn't like the last three that much - so we give it --"}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/011/original/image2.jpeg?1721685419","metadata":{"caption":"I hear they added famous actor Kirk Handsome - famous actor, maybe good.Give it +++ and -"}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/012/original/image3.jpeg?1721685500","metadata":{"caption":"I think it will be streaming in a couple of months. Maybe we should wait, give it ---"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n        \u003cp\u003ePut all those together, and hit the A2 touch to get the verdict.......\u003c/p\u003e\n      \n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/013/original/image4.jpeg?1721685647","metadata":{"caption":"ALL GREEN! We should go see the movie!"}},{"element_type":"text","content":"\n        \u003cp\u003eOne more feature: After an evaluation, touching A7 will show you the last result.\u003c/p\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAND now, Circuit Python!\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe fun thing about using MakeCode is, it provides a quick way to prototype a project. And, since the web IDE includes a simulator, you can test the project to see how it works as you put it together. After creating a working DecisonMaker in MakeCode, I wanted to make the Circuit Python version - because that would let me add speech! I recorded all the eight messages as .WAV files and saved them to m8/ on the device.\u003c/p\u003e\n\u003cp\u003eThen I followed the design from the MakeCode version - all the controls are the same. Copy the WAV files to m8/ and the DecisionMaker.py to code.py.\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eSwitch to Right: \"Magic 8 Ball\" mode. Just press A for your answer (and HEAR it)\u003c/li\u003e\n\u003cli\u003eSwitch to Left: \"Brain\" mode\n\u003cul\u003e\n\u003cli\u003e\n\u003cul\u003e\n\u003cli\u003eA - press 1-5 times for scoring +'s on a factor\u003c/li\u003e\n\u003cli\u003eB- press 1-5 times for scoring -'s on a factor\u003c/li\u003e\n\u003cli\u003eTouch A1 to add a factor in\u003c/li\u003e\n\u003cli\u003eTouch A2 to evaluate the factors (and hear the verdict)\u003c/li\u003e\n\u003cli\u003eTouch A7 to replay the last verdict.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThere you have it! Turn your CircuitPlayground into an advisor you can put in your pocket!\u003c/p\u003e\n      ","metadata":{}}]