Controlling motor with softpot, help needed

My project is to control a motor using a softpot. To be more specific I'm wanting the motor to react to the speed at which I run my finger across the softpot. So if I were to run my finger across the softpot slowly the motors rpms will also be slow, likewise the other way around. Thank you

And your question is ?

What have you tried so far ?
What is this “softpot” of which you speak ? Maybe http://softpots.com/

I'm sorry for not addressing myself correctly. I was nervous posting here for the first time :blush:. So my question is, how do I control a motors rpms in relation to the speed of my finger using a softpot? I'm using an arduino mega2560, a softpot SoftPot Membrane Potentiometer - 100mm - SEN-08607 - SparkFun Electronics, a hobby motor, and adafruit motor shield Adafruit Motor/Stepper/Servo Shield for Arduino kit [v1.2] : ID 81 : $19.50 : Adafruit Industries, Unique & fun DIY electronics and kits. Once more I'm sorry for being a noob to the forum(forums in general), I promise to learn.

UKHeliBob:
And your question is ?

What have you tried so far ?
What is this "softpot" of which you speak ? Maybe http://softpots.com/

Thanks for the link. That's put us all in the picture.:wink:

Edwardh12:
I'm sorry for not addressing myself correctly. I was nervous posting here for the first time :blush:. So my question is, how do I control a motors rpms in relation to the speed of my finger using a softpot? I'm using an arduino mega2560, a softpot SoftPot Membrane Potentiometer - 100mm - SEN-08607 - SparkFun Electronics, a hobby motor, and adafruit motor shield Adafruit Motor/Stepper/Servo Shield for Arduino kit [v1.2] : ID 81 : $19.50 : Adafruit Industries, Unique & fun DIY electronics and kits. Once more I'm sorry for being a noob to the forum(forums in general), I promise to learn.

Thanks for the reply. With more information it will be easier to provide help.

So, what experience have you got of using the Arduino ?
Do you know how to read a value from an analogue port connected to a potentiometer ?
Do you know how to read the value at intervals to see whether it has changed and by how much ?

I have only made a few projects using arduino and I understand basic coding. Majority of my codes will contain many if statements and for loops, so I don't feel too strong. I have been able to get readings out of the softpot and have used the smooth code example from arduino, I have also ground the wiper pin of the softpot so its not floating all over the place. No, I don't know how to use intervals but now that you mention it I'll check them out. What I've been trying to do is to have a set timer run then collect the positions that were used throughout the timers span, and hopefully with that I could get the velocity and relate it to the rpm of the motor. Problem is I have a hard time writing the code.

Exactly how have you wired it up.
Grounding the wiper does not sound right.

Here is an idea based on the BlinkWithoutDelay example in the IDE.

start of loop()
  if millis() - start time is greater than reading interval
    read potPin
      if pot has moved
        save start time
        call speed adjustment function
      end of if
  end of if
end of loop()

speed adjustment function
  calculate the PWM adjustment needed based on the amount pot moved
  apply adjustment to the current PWM value
  limit the PWM value to between 0 and 255
  apply the changed PWM value to the motor
end of function

Lots of details to sort out of course