Check out my youtube which linked on that video. I have other videos there already so you might get what you are looking for.Man hopefully you do video sooner than later! Right now I'm just three printing as much as I can and following moe's pictures and what I can gather from this forum.
What you need to do is do a remap routine.I’m working on the electrical part of my build currently. Have the board connected to cannon and servos. My issue is it’s fine turning head left and right but when i tilt head down gun goes up and when head up gun goes down. Any ideas how to fix this? Or what code part to edit to reverse the signal for #6 servo connection?
Forgot to mention I have 0 knowledge with using arduino. I got the code on following simple copy and paste.What you need to do is do a remap routine.
For arduino you use the map function
![]()
Arduino map - map a value from one range to another
Arduino map is a useful function but it may not do what you expect! Find out here why it may go wrong and how to use it correctly.www.best-microcontroller-projects.com
for python I documented how I used a value remap here:
The basic remap formula is: new value = ((old value - old min)/(old max - old min))*(new max-new min) + new min
The Aliens Legacy • View topic - Wiimote with nunchuk on linux via bluetooth (Xeno/Pred)
The Aliens Legacy is a global community for fans of the Alien film series. The discussion of the Alien series of films and the props used in them is the aim, but if it's got Big Bugs and Big Guns, then they are welcome too!forum.alienslegacy.com
no not really. Your other option is to flip the servo install location by 180 degrees...Forgot to mention I have 0 knowledge with using arduino. I got the code on following simple copy and paste.
Happen to know of a copy paste kind of code with the channel 6 already reversed?
Actually I did this How to reverse a servo without a radiono not really. Your other option is to flip the servo install location by 180 degrees...
Swapping the servo motor wires and the potentiometer +- wires was way faster and easier for me and now works.Ok I worked on it a little bit more. So, PWM signal range is 0-2300 typically. It varies based on many factors.
So i thought why not an if and elseif statement:
if (val > max/2)
val1 = max - val
elseif(val< max/2)
val1 = max - val
So this yielded that the simple solution was to do a recalibration of:
value1 = maxiumum value - original value
So using that equation should be simple to flip things.
For example
0 950 1150 1350 2300
value of 950 remaps to 1350 by taking 2300 - 950 = 1350
and conversely value of 1350 remaps to 950 by taking 2300 - 1350 = 950
Now the kicker is if your end value ends up being out of range you may need to adjust the numbers used.
Well sometimes that is not an optionSwapping the servo motor wires and the potentiometer +- wires was way faster and easier for me and now works.
No sir, I meant the piece that holds the plasma cannon. The piece that makes the cannon move all directions.
moe, Could you post a picture of how you mounted the second servo at the base? I think that is the only real outstanding question that is not sufficiently covered with documentation or pictures.
That looks awesome but I'm really new to this and I don't really see how the flashlight is actually wired in? I see it looks like you took out the bulb and just stuck it in there and what looks like on moe's picture a double a battery in some sort of a holder. But how is the back of it actually activated? And connected to I suppose you Arduino or your wrist computer? Thank you again!
Below is my Arduino ini. Compare it to yours and you may see the issue.Excellent I got it to work! I just tried different pins for the pwm I'm not quite sure where they were labeled in the code but they actually work out! Thank you all!
I don't have a sketch board to draw on easily so I'll try to describe what to do for the Flashlight only:So how did you actually wire in power in ground the two wires for the flashlight toggle and the two wires to turn on the cannon laser lights? Do you have some sort of schematic again I need all this. I did get the head tracker to work though! Additionally how did you actually put in the flashlight and connect it inside the gun? Do you have a picture of that exact setup? Thank you again!
What model flashlight did you use?I don't have a sketch board to draw on easily so I'll try to describe what to do for the Flashlight only:
Step 1) Solder directly to the terminals on the flashlight. Now you have one red wire (Flashlight Positive) and one black wire (ground).
Step 2) Ground the flashlight in the backpack where the battery pack is.
Step 3) FOR FLASHLIGHT ONLY, you need to run 2 wires from the backpack to the gauntlet (5V Power and flashlight positive). There will be other wires for powering the servos, reset button, etc but that is seperate for now.
Step 4) In the gauntlet: From the power in, wire one 5v Power to the double momentary switch (one button only)
Step 5) In the gauntlet: From the power in, wire one 5v Power to the latching switch.
Step 6) From the double momentary, wire the other side of the one button to the Flashlight positive.
Step 7) From the Latching switch, wire the other side of the switch to the Flashlight positive.
Let me know if that is clear. If someone has a easy sketch program to use I will download it and use that to illistrate my point.
Excellent Moe thank you very much!!! I'll give this a shot, I'll let you know when I'm able to accomplish this I'm still 3d printing out a lot of the stuff and find time to do this in between taking care of the household.I don't have a sketch board to draw on easily so I'll try to describe what to do for the Flashlight only:
Step 1) Solder directly to the terminals on the flashlight. Now you have one red wire (Flashlight Positive) and one black wire (ground).
Step 2) Ground the flashlight in the backpack where the battery pack is.
Step 3) FOR FLASHLIGHT ONLY, you need to run 2 wires from the backpack to the gauntlet (5V Power and flashlight positive). There will be other wires for powering the servos, reset button, etc but that is seperate for now.
Step 4) In the gauntlet: From the power in, wire one 5v Power to the double momentary switch (one button only)
Step 5) In the gauntlet: From the power in, wire one 5v Power to the latching switch.
Step 6) From the double momentary, wire the other side of the one button to the Flashlight positive.
Step 7) From the Latching switch, wire the other side of the switch to the Flashlight positive.
Let me know if that is clear. If someone has a easy sketch program to use I will download it and use that to illistrate my point.
Next question how did you wire that battery pack through the usb? In the picture it looks like you just stuck two wires in there or is there some sort of an adapter? Thank youI used the GearLight Flashlight from amazon here: https://www.amazon.com/gp/product/B072WHQFJ7/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
View attachment 1657134
Next question how did you wire that battery pack through the usb? In the picture it looks like you just stuck two wires in there or is there some sort of an adapter? Thank you
I used one of these: https://www.amazon.com/Partstock-Co...071&sprefix=usb+2.0+male+solder,aps,66&sr=8-4Next question how did you wire that battery pack through the usb? In the picture it looks like you just stuck two wires in there or is there some sort of an adapter? Thank you
Excellent ksj!!! Thx for taking the time to answer! I appreciate it
Some options that could work for you:
![]()
USB to TTL Serial Cable - Debug / Console Cable for Raspberry Pi
The cable is easiest way ever to connect to your microcontroller/Raspberry Pi/WiFi router serial console port. Inside the big USB plug is a USB<->Serial conversion chip and at the end ...www.adafruit.com
![]()
USB Micro-B Breakout Board
Simple but effective - this breakout board has a USB Micro-B connector, with all 5 pins broken out. Great for pairing with a microcontroller with USB support, or adding USB 5V power to a ...www.adafruit.com
![]()
USB Type A Plug Breakout Cable with Premium Female Jumpers
If you'd like to connect a USB-capable chip to your USB host, this cable will make the task very simple. There is no converter chip in this cable! Its basically a plain USB cable ...www.adafruit.com
![]()
USB-A Male Plug to 5-pin Terminal Block
This is the USB-A Male Plug to 5-pin Terminal Block. If you need to connect to a device with a USB Jack, maybe make your own USB stick or custom cable of sorts - this adapter will ...www.adafruit.com