Tuesday, May 30, 2017

More fun ways to "spend" time

So after making an arcade console and getting the kids hooked on great old video games, I saw this set of videos from Bob at http://www.iliketomakestuff.com
Arcade Cabinet Part 1
Arcade Cabinet Part 2
Arcade Cabinet Part 3


Parts 1 and 2 were informative, but part 3... A human sensor that turns the lights on and off!!! Must have!

So I started playing with an arduino uno board, (really fun) but then I got to playing with this little creature:
  you can learn more here: https://en.wikipedia.org/wiki/NodeMCU

It took a bit of fiddling to get it to work so I wanted to capture that on the blog for later use.

First I had to get drivers here: https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers

Once I had the drivers, I plugged it in and got a new terminal device: /dev/tty.SLAB_USBtoUART
So then I had to set up the Arduino IDE:
I opened preferences and added http://arduino.esp8266.com/stable/package_esp8266com_index.json to the Additional Boards manager URLs:
Clearly I did this on my mac, but it is similar in WinDOZE.

At that point I could open the boards manager:

And install the esp8266 boards by clicking the install button next to version 2.3.0:

Finally I could select the NodeMCU in the IDE user interface under tools:
and select the right port:
pushed it to the chip and ran > screen /dev/tty.SLAB_USBtoUART 115200
and lo and behold, a web server with my own custom code that actually turns my led's on and off!



How absolutely amazing!!!
Next up: get my relay working with this board, connect up the sensor, add a few buttons to turn things on and off via this web client...

Good stuff and so fun to learn something new!


Fun ways to waste time

So, for my birthday I got a Raspberry pi 3, with a case, and a power supply, and I had to immediately set it up.

I tried OSMC with Kodi
I tried straight up Raspbian
And then I found RetroPie!!!

I was completely sold. Old school games, Kodi, nice interface,
So I set the whole thing up with XBox 360 USB connectors, it was cool...but playing those old games I wanted the arcade feel: Hearing "Full point" in Karate Champ is not quite as amazing when you had to use the D-Pad and the ABXY buttons.

So I did what any one else would do, I ordered 4 joysticks and 40 buttons and 2 two player PCB boards that attach via USB, and a trackball, oh and 2 more LED joysticks (for Karate Champ!) and an OrangePi PC so I did not have to cannibalize the RPi media center.

I was excited , the OPi is:

  • Slightly faster than RPi 3 at 1.6 ghz vs 1.2
  • Has the same RAM
  • A Mic for Alexa support
  • An IR chip
  • It was only $27 with a case and power cord!


Sadly:

  • OS support is very poor 
  • The video drivers are closed source so no HW acceleration which unexpectedly makes big difference to the emulators.
So...
I built this:
The RPi found its way into this beast.  It took a ton of troubleshooting to get it to recognize both players on the separate joysticks (this post explains why) 
FYI, this is the quirk code for this unit: 

usbhid.quirks=0x0810:0xe001:0x40

It still needs a little love.  I have the second joysticks for player 1 and 2 (in the middle) to put in (they light up with LED lights!). The usb to PS2 connector for the track ball will be here shortly so it can go in. There are a couple of games that don't work quite right yet, but it is really close to functioning as expected...

Then I have to make it pretty with paint, some hot pink T-molding, and this beautiful vinyl overlay from Metro Styling (mine is that full image, but 16 inches x 5 feet): 



Then for the rest of the cabinet, I think I am going to mount it on top of a mini fridge, then fill it with Cherry Coke so that my love will enjoy it a little more.

The coolest part is seeing the kids totally into Mrs. Packman, or Galaga, or to hear them playing 4 player X-men or Teenage Mutant Ninja Turtles together (I haven't quite got them hooked on Gauntlet yet but there is still time).