Creating a mini NES with a Raspberry Pi

Mini NES RetroPie
Mini NES RetroPie
Mini NES RetroPie

It all started with the Nintendo Classic craze. I had a friend that was rambling about one the other day. I mentioned that I could totally make him one but better because it would emulate more than just Nintendo. Enter RetroPie. I was looking at putting the bill of materials together and thinking of cases for the mini NES, then I realized why not just print one! So BAM and BAM.

 

https://www.thingiverse.com/thing:1887826 
then this https://www.thingiverse.com/thing:2011955 

Then this for giggles
https://www.thingiverse.com/thing:1710104

 

Here’s what we are doing

  1. Flashing RetroPie to an SD card for a Raspberry Pi
  2. Soldering header pins to the RUN pin holes on the RPi
  3. Soldering wires to some push buttons
  4. Soldering some wires to an LED
  5. 3D Printing a mini NES case for the RPi
  6. 3D Printing a bracket for the NES case
  7. Glueing push buttons, LED and bracket into the printed case
  8. Wiring the LED and buttons to the RPi
  9. Testing it all

 

Here’s what you need

  1. Raspberry Pi (save yourself a headache, get a RPi 3!)
  2. RPi power supply MINIMUM of 2.5A!
  3. SD card 8gb+ class 10
  4. HDMI cable
  5. USB keyboard
  6. Network cable (even though the RPi 3 has wifi you will at least need to do the initial wifi setup with a LAN connection)
  7. A 3D Printer to print the case and the bracket
  8. (2) push buttons
  9. (2) male header pins
  10. Super glue and hot glue
  11. (1) red LED
  12. (1) 100 ohm resistor
  13. (6) pieces of jumper wire with connections (you can cut some in half if long enough)

 

Whats Up

I will assume you have a network connection (non wifi) a USB keyboard a TV or Monitor or tv with an HDMI connection and that you have active internet. You will need to know how to solder, and be somewhat comfortable with a terminal and hopefully the Linux environment. I also assume you have and know how to use a 3D printer. I will also assume that you know and are comfortable with Raspberry Pies. Lots of ASSumptions.

This post is not designed as a how to install RetroPie but more of a how to get RetroPie installed and create the scripts for shutdown the Pi and lighting the LED, then you can follow the first install guide by RetroPie to get you going with the actual RetroPie software.

View Post

I am not responsible for any damage that may happen to you, your computer, or your Raspberry Pi etc. Take this adventure at your own risk.

ESP8266 and MQTT

ESP8266 and MQTT, Google that and see what happens (you most likely already did and that is how you got here). Shit is everywhere. It’s gobbin up the bandwidth of the intarwebs. And you know what? I couldn’t get any of that shit to work on my standard ESP8266-01. I have a few of them, I tried them all with all kinds of shit. I would get close but never a damn cigar (I can’t smoke it anyways). Until today for months I have been stuck on this. So if you are like me and have not been able to get the damn thing to work, for whatever reason, try this. Hope it helps.

This is the page that saved it all for me, thank these guys (I did not read or follow any guidelines on this page, I merely snagged their code):
https://developer.ibm.com/recipes/tutorials/connect-espressif-esp8266-to-ibm-iot-foundation/

I copied “mainIoTF.lua” and made some minor tweaks to get it working. I removed the orgID and changed the broker to my raspi IP address. Don’t forget to change the topic. I made those tweaks and uploaded it. BAM!! I was getting data send via MQTT to the Pi every 10 seconds.

This is what I was getting on Node-Reds debug window every 10 seconds (the number will change):  {"d": {"data":69}}

This is where it comes from, should be easy enough to modify:
m:publish(topic ,'{"d": {"data":'..t1..'}}', 0, 0,

I came back and edited this post because I hate it when I find a site that says they found the fix, but never posts it.. so heres the code. Like I said, its 99% the same code from the other site I linked/mentioned. But here it is for you anyways.