Deeper Thought

725 views
Skip to first unread message

Norman Davie

unread,
Feb 24, 2016, 3:37:33 AM2/24/16
to PiDP-8
The nice thing about using a Raspberry Pi with Oscar's kit is that it can be used as a really cool case.
I needed to work on my Pi for another project, but I missed having the flashing lights but running the simulator
used too much of the CPU -- enter Deeper Thought (attached).

Basically, it's a c++ program that mimics Deep Thought but only using 12% of the CPU.

I've never actually had time to get Deep Thought working with the simulator yet, so I've taken what I've seen on
YouTube videos and made some assumptions as to how it works.

The 3 least significant register switches control the maximum frequency of changes (all up == maximum)
The next 3 control the "variability" or the minimum amount of time between changes (all down == fixed time)
Stop switches exits the program.

NOTE: Must be run with sudo.

Now you can create your own projects that control the LEDs easily.
Feel free to use it for your own projects, but please leave acknowledgement of Oscar's and my contribution.

Enjoy!


deeper.tar.gz

Harris Newman

unread,
Feb 24, 2016, 12:43:53 PM2/24/16
to PiDP-8
Now that just rocks! Thanks much!

Jeremy Radwan

unread,
Feb 24, 2016, 6:40:51 PM2/24/16
to PiDP-8
Cool, I'll definitely check this out! I have noticed that running Deep Thought under simh takes a lot of CPU. I'm only using my Pi for the blinkenlights and Pi-Hole ad blocking so it's not a big deal, but this is a neat workaround.

Norman Davie

unread,
Feb 24, 2016, 8:54:07 PM2/24/16
to PiDP-8
Here's a video of it in action:
https://www.youtube.com/watch?v=oUhw7tpXJvg

Jeremy Radwan

unread,
Feb 24, 2016, 9:55:21 PM2/24/16
to PiDP-8
Works fine here ... very nice code. I had been messing around with writing quickie C programs to test the LEDs based on other people's contributions here and had some long methods of defining individual LEDs and "drawing" boxes and such. I was surprised how small your program was. :) 

So you only use the bottom six switches to control the speed and randomness right? The original Deep Though uses the lower six for speed and upper six for randomness. That being said, I was able to achieve pretty much the same effect with your version and the much lowered CPU utilization.

I also like how you can "pause" it and the Run/Pause LEDs actually reflect what is going on.

Norman Davie

unread,
Feb 24, 2016, 11:14:17 PM2/24/16
to PiDP-8
Thanks for the clarification of how the original Deep Thought works.
Next revision will use the switches as you've described.

You'll notice in the code I plan on having more "deep modes"

These will include:
1) Test your switches (LEDs reflect position of switches)
2) Test your LEDs - Similar to the Paul R. Benards excellent test program
3) Use a different random generator
4) Scrolling Message
5) Self playing Pong

Any other suggestions?

Tim Wells

unread,
Feb 28, 2016, 3:48:38 PM2/28/16
to pid...@googlegroups.com
Very nice!  Thanks for sharing this! 

It was very easy to understand your code and modify it.

I created my own fork.  See this post for links and info.

Jeremy Radwan

unread,
Feb 28, 2016, 4:08:17 PM2/28/16
to PiDP-8
Dueling Deep Thought programs! :-)

Bill Degnan

unread,
Jan 2, 2017, 2:19:43 PM1/2/17
to PiDP-8


On Sunday, February 28, 2016 at 4:08:17 PM UTC-5, Jeremy Radwan wrote:
Dueling Deep Thought programs! :-)


I should add, this is a nice program for testing the lights and switches.  Works great. 
Bill 
Reply all
Reply to author
Forward
0 new messages