Introduction: How to Make an RGB-LED Health Indicator for Minecraft - Arduino!

You want to make cool light feedback for your perfect gaming experience in minecraft? Look no further!

What you'll need:

  • 1 Arduino (any type that accepts Vin Power)
  • 1 Breadboard / Prototypeboard
  • A few Jumper-wires
  • 3 Transistors (I didn't have power transistors so I used signal)
  • A 12V DC Power Supply (You probably get one when you buy the LED-Strip)
  • 1 or multiple 12V RGB LED-Strips
  • Minecraft 1.8
  • Python ready to be used

P.S: If you made this, please share it with the "I made it!" Button! It's really motivating and intresting to see what you guys do with this!

Step 1: Setting Up the Circuit

Build the basic circuit shown in the Image above! You may have to modify this a bit if you're using a different RGB LED. My RGB LED has 3 negative RGB pins and one positive pin. Yours might have 3 positive RGB pins and one negative pin.

Step 2: Setting Up the Arduino

Once you have everyhing set up you can upload the Arduino project file that's provided in the downloads and close the Arduino IDE.

Step 3: Setting Up Minecraft

Once you're done with the Arduino you can go to your Minecraft directory using %appdata% on Windows. Next go to the logs folder and paste the python file that's provided in the downloads. Next Shift+Right Click while no file is selected in the folder and click on "Open Command Window here". Type "python ard.py" and wait for it to display:

"COM 5
TRUE"

If python is not set up, watch this tutorial:

https://www.youtube.com/watch?v=mXXlt9bFIuI

Step 4: In-Game

You're almost done now! Next you have to create a new SINGLE-PLAYER world, give yourself a command block using "/give <playername> command_block" and paste this text into it: http://pastebin.com/Tmy4xX8B
Activate the command block with a button and wait for the structure to build. Once it's done you will see a sign that says "Objective Add" click on it and you should be done!

Check the LED(s)! If they're changing colors you did everything right! If they're not check the next step!

Step 5: Any Problems?

If it doesn't work or you're experiencing any problems try theese steps:

  1. Check the command prompt window did it say "COM5 True"? If not write a comment!
  2. If 1. worked but the console displays nothing else you probably have a problem In-Game! When the script detects a health change it writes "Detected 0-10!" in the console.
  3. Check the circuit! Did you connect all the right cables? Check if you connected the power supply and the RGB pins of the LED(s)! Maybe you connected the R cable to the G pin on the LED or vise versa.
  4. Be sure the LED is actually working!
  5. Write a comment if you still have a problem!

Comments

author
seamster made it!(author)2015-07-30

Nicely done. Thanks for sharing this!

author
Tymek11rt made it!(author)2016-06-30

Hey man I get this:
ValueError: "port" must be None or a string, not <type 'int'>

when i use "python ard.py"

author
hsudden made it!(author)2015-08-11

Hi, I am working on replicating this project, and i am running into a problem. after a while the command blocks in game will stop reporting the player's current health. Do you know of any way to fix this?

author
MarcelSimader made it!(author)2015-08-11

That's probably because the clock stopped running. It's very simple to fix!

First you have to remove the parts that I highlighted in the picture from the first command blocks in the row(where the signs are)

(for some reason the command blocks have too much text)

and then just remove the redstone block and place it again!

If that doesn't work just write another command and I'll look into it!

2015-08-12_00.01.53.png2015-08-12_00.01.56.png2015-08-12_00.01.46.png2015-08-12_00.05.47.png2015-08-12_00.05.56.png
author
hsudden made it!(author)2015-08-11

Ah, thank you. that has fixed it! i will post a "i made it" comment soon!

About This Instructable

1,050views

18favorites

Bio: I am a man and I like to build things. I build things out of wood. I also like to make circuits and programs.
More by MarcelSimader:How to make an RGB-LED Health indicator for Minecraft - Arduino!
Add instructable to: