joystick module and RC motor

Hello,

I could need some help!. I'm trying to controll speed on a RC motor with a Joystick module and a NANO
card. I got everyting working but the joystick is to sesitive. Smallest movment on the joystick and the motor goes to top speed. I need help so i can use the hole scale on the joystick for trootle "only use x axis". is it programing or modification on boards?

Please help

Magnus

What joystick module, what motor, what code?

I got everyting working but the joystick is to sesitive. Smallest movment on the joystick and the motor goes to top speed. I need help so i can use the hole scale on the joystick for trootle "only use x axis". is it programing or modification on boards?

You may need to change the mapping in the code you did not post.

#7 below:

http://forum.arduino.cc/index.php/topic,148850.0.html

Thank you!!!....here is the code.

#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"4L01.h"
#include "RF24.h"
#include "printf.h"
#include "printf.h"
//
// Hardware configuration
//
// Set up nRF24L01 radio on SPI bus plus pins 9 & 10
RF24 radio(9,10);

uint8_t data[2]; //buffer to store received data
const uint8_t buffer_size = sizeof(data);
//pins that used for the Joystick
const int analogInPinY= A0; //
const int analogInPinX = A1;//
const int StearRight = 3;
const int StearLeft = 5;
const int tx_led=2;// transmission indicator
int Y_value = 0; // values read from the pot
int X_value = 0;
int outputValue = 0;
/*
const int transmit_pin=6;
int transmit_enable;
int ForwrdButton=2;
int BackwrdButton=3;
*/
//
// Topology
//

// Single radio pipe address for the 2 nodes to communicate.
const uint64_t pipe = 0xE8E8F0F0E1LL;

//
// Setup
//

void setup(void)
{

Serial.begin(9600);
printf_begin();

//
// Setup and configure rf radio
//

radio.begin();

radio.openWritingPipe(pipe);
//
// Dump the configuration of the rf unit for debugging
//

radio.printDetails();

//
// Set up buttons
//

/*to be used later
pinMode(ForwrdButton,INPUT );
pinMode(BackwrdButton,INPUT);
pinMode(transmit_enable,INPUT);
*/
pinMode(tx_led,OUTPUT);
digitalWrite(tx_led,LOW);
pinMode(StearRight,INPUT);
pinMode(StearLeft,INPUT);
digitalWrite(StearRight,HIGH);
digitalWrite(StearLeft,HIGH);

}

//
// Loop
//

void loop(void)
{

X_value = analogRead(analogInPinX);
data[0] = map(X_value, 0, 1023, 100, 200);

if(data[0]<100){
data[0]=100;
}

radio.write( data, buffer_size );

Serial.println(data[0]);
delay(10);
}