r/arduino•
CThomason3

Help with custom portal gun

Software Help

Hello there!

So I am not the greatest when it comes to more advanced arduino code (or Tuesday for some of you). Because of this I was wondering if I could get help modifying the code for a portal gun project I am wanting to build. In this case it isn't any normal portal gun. It is the portal gun from the Portal 2 mod "Portal Stories: Mel."

Code Reference: https://github.com/Lunchbox7985/Portal-Gun

PSM References: https://youtu.be/XWIzPGqV0PM at about 1:40

The "problem" with this code is it is mimicking the portal gun seen in the base 2 games. Here is a few bits I need to add for this to work.

  1. When the portal gun hasn't fired/when the base portals have disappeared, the portal gun has a beam of green/blue light coming from the inner tube unlike the main game where it is just some kind of indicator.

  2. I would like add a switch to change the boot up sequence between base portal and portal mel. Mainly because of how long the start up sequence is in mel but I want to have it to show off!

  3. Everytime the light beam is on I would like it to look a little unstable, I am considering replacing the 2 neopixel jewels with a strip but that is still up in the air

I know updating the sounds and such will be easier but getting the lights to work the way I want it will be the issue. If anyone is able to help with this that would be greatly appreciated. I hope this isn't too much of an ask. I would just rather ask people who know what they are doing rather than asking something like chatgpt

Thank you for taking the time to read this!!!

Posted Jan 14, 2026, 12:09 AM UTC

11
Loading comments…