RC scale model of battleship Yamato

Hi, I'm doing a personal project using arduino to convert a 1/350 scale model of the battleship Yamato to RC. I am using four 6V 450 mA motors for 4 propellers, a servo to steer, and a servo to control the front two turrets at a realistic speed. I'm using a flysky FS-i6AB reciever with a I6X transmitter. Due to lack options, i am stacking two ardumoto motor drivers on top of each other to be able to use 4 motors. I have access to multiple UNOs and only one Mega.

My difficulty is the code. All the codes ive found don't necessarily do everything i want to do. I'm still learning arduino code, and I have tried modifying codes ive found with mo luck. I'm really more of a mechanic than a programmer. It would be amazing if someone could help me out with this and how to execute this.

If you have found code that does much of what you want but not everything then post it here and specify what it does and what else you want it do in some detail. If you can work out a detailed specification you can almost certainly get some help to achieve it.

At the moment I'm not at all clear why you need an Arduino if you already have an RC system which seems to me to be perfectly adequate to control everything you need.

Steve

I just thought I would try something different with materials I could access with out having to purchase them.

I can put the codes below. There are more but these two are ones I could get to. Im trying to have the flysky's channel 2 control the motors, channel 1 for the rudder (middle: 90 left full rudder: 47.5 right full rudder: 137.5), and channel 4 for the guns. I dont know how to accurately calculate the correct values put out by each channel on the receiver, nor how to utilize these values. The code to get the realistic speed of the guns interferes with the code to return values from the receiver, and I am unsure how to keep that speed while still having receiver values getting returned at the regular rate they should be returned.

clarka22:
The code to get the realistic speed of the guns interferes with the code to return values from the receiver, and I am unsure how to keep that speed while still having receiver values getting returned at the regular rate they should be returned.

I would suggest that something is using blocking code. Likely the use of the delay() function. The common fix is to learn to use millis. But that would be guessing since I cannot see your code. :-p

Edit: I am not sure what restriciton you are under with regards to the motor drivers, but Pololu has many to choose from.

Oh, and pics. Seriously. I want to see pics of your model.

We can't really help much with code we can't see. But if you're trying to make a servo work slowly for your guns then using VarSpeedServo.h instead of the standard Servo.h will probably help.

There are loads of examples of reading RC receiver signals and then driving servos from them so that part is definitely not too difficult.

Steve

Here are some of the codes I've tested. Some work to an extent, others not at all. @vinceherman I have one pic of it. Hopefully, that suits you.

Test_Program_1.ino (4.1 KB)

test_program_2.ino (5.25 KB)

Second_Transmitter_Receiver_Code.ino (9.85 KB)

arduino_fc.ino (4.83 KB)

here is the pic of the model

clarka22:
Here are some of the codes I've tested. Some work to an extent, others not at all. @vinceherman I have one pic of it. Hopefully, that suits you.

Four bits of code some of which (but you're not saying which ones) don't do anything at all doesn't really help.

Pick just the one that is nearest to doing something useful, which is what you will logically start with. Post that one and don't forget to say what it actually does and what you want to change or add to it.

Steve

It sounds like you're going to have the Arduino act as an ESC for the motors and you need it to limit the speed of the servo traversing the guns.

What's the need on the rudder(s)? I'd expect that to be a simple mechanical linkage to the servo.

I'm pretty sure this code is the closest to doing something useful. There is also a kit that I bought from eBay that included motors, prop shafts, rudders, and stuff to hook up servos. but, it's more difficult than I thought it would to hook the rudder servo up. Ill provide a link.

link to RC kit for this specific model:
https://www.ebay.com/itm/TAMIYA-1-350-Yamato-Battleship-Brass-RC-Upgrade-Kit/292584759259?hash=item441f691fdb:m:mkeQq_7gb6r_0rmXwlHinMA&var=591391718445

Keep in mind that on eBay there is an example config for the regular way to do this and vids on youtube for the example configuration. But I'm not doing the example configuration. There is also a picture with the contents of the kit for reference I guess.

Test_Program_1.ino (4.1 KB)

s-l400(1).jpg