I am not sure how much help I can be as I suspect we are doing very different things to accomplish the same end. I use a dedicated R/C receiver and transmitter, mine is a 2.4 spectrum but I have also used an old Airtronics fm unit, they work the same. It looks like you are hacking an existing receiver.
My components are
Mega
R/C receiver
ESC
Motor
Servo
Hook Up is
Mega to the receiver
servos to the mega
motor to an ESC
the ESC to the Mega.
The sticks on my R/C transmitter fire up the motor and turn the servo, I have an Uno and it would work the same way.
I will post this to your thread too and add some pictures.
Here is the code I used for the Throttle test, I need to dig up my test code that combines this with the servo for rotation
// This sketch uses the servo library to arm the Hacker X-5 Pro ESC.
// beauty works with Castle Creations just fine
#include <Servo.h>
Servo esc; // Define the ESC as a servo object
int arm = 1000; // defines pulse width of 1000 us
int speedvalue = 1000; //should be throttle off
int speedcalue2 = 1000; // should be throttle off
int steady = 300;
int initiate = 0;
int escPin = 9;
// RC Reciever control
int ch1; // Here's where we'll keep our channel values
int current_throttle = 0;
int Min_throttle = 0;
// Led Stuff
int led = 10; // the pin that the LED is attached to
int brightness = 0; // how bright the LED is
int pos;
void setup()
{
// declare pin 10 to be an output for LED:
pinMode(led, OUTPUT);
pinMode(5, INPUT); // Throttle on our Receiver
esc.attach(9);
esc.writeMicroseconds(arm); // This command sends a pulse train
// from pin 9 that continues until
// the pin is called to do something else.
/* Once armed the setup could also be used to specify the
run speed of the motor. The commented out lines provide
a 2 second delay between changes in speed.
delay(2000);
esc.writeMicroseconds(1200);
delay(2000);
esc.writeMicroseconds(1300);
delay(2000);
esc.writeMicroseconds(1400);
delay(2000);
*/
// Enable to put in debugging lines
// Serial.begin(9600); // Pour a bowl of Serial
}
void loop()
{
/*
Calls a sub to throttle up motor from 0 rpm to a steady running value.
The if statement is used to run the throttle up once.
*/
while (Min_throttle <= 10)
{
current_throttle = pulseIn(5, HIGH, 25000); // get current throttle val
delay(3000); // give the operator a chance to do something
// there is some bounce on my DX7 this
// low point is actually 1095 to 1098
// 1100 works as a nice high point
if (current_throttle <= 1100)
{
Min_throttle = Min_throttle + 1;
delay(1000); // 1 second
}
if (current_throttle != pulseIn(5, HIGH, 25000))
{
throttleUp();
initiate = 1;
}
}
esc.detach(); // Disengage ESC from pin
}
//**************************************************
// Currently a tad slow as I am only increasing by a factor
// of 1 will have play with this to get the best
// speed for throttle up
void throttleUp()
{
ch1 = pulseIn(5, HIGH, 25000); // Read the pulse width of
speedvalue = current_throttle;
if (speedvalue < ch1)
{
for (int count = speedvalue; count < ch1; count++){
Serial.println(speedvalue);
digitalWrite(escPin, HIGH);
esc.writeMicroseconds(speedvalue);
digitalWrite(escPin, LOW);
speedvalue = speedvalue + 1;
delay(20);
}
}
if (speedvalue > ch1)
{
for (int count = speedvalue; count > ch1; count--){
digitalWrite(escPin, LOW);
esc.writeMicroseconds(speedvalue);
speedvalue = speedvalue - 1;
digitalWrite(escPin, LOW);
delay(20);
}
}
}
If you are using an all in one unit from the truck then you will have to figure out how it all works, I should add as a R/C helicopter/ plane guy I have spare r/c bits around.