Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Interfacing / Re: reading rpm signal from cpu fan on: January 30, 2009, 06:31:42 pm
just thought i would check in to see if any one made progress towards measuring rpm through the pulses.. i am trying to measure RPM's on a mode car using arduino... but the code posted before does not seem to give consistent rpm output...

i am using novak gtb ESC with 7.4v lipo batter to power a 3.5r brushless motor...

any thoughts?

Thank you!
2  Forum 2005-2010 (read only) / Interfacing / Re: Basic Servo Interfacing on: July 27, 2008, 05:54:50 pm
Mem and Kbit you two are absolutely right, I am completely new to this world so just trying to find my way through things.. thanks again for your help!
3  Forum 2005-2010 (read only) / Interfacing / Re: Basic Servo Interfacing on: July 26, 2008, 05:44:43 pm
everyone thank you for your help... the following simple code seems to work just fine on an analog type servo... i am using an EFLRS60 from eflite... the other JR DS285 i beleive is a digital servo and only works if i use digitalwrite... not sure why that's the case though... any ways just thought i would share my findings..


#include <Servo.h>

Servo servo1;

void setup()
{
  
  Serial.begin(19200);
  servo1.attach(9);
  Serial.print("Servo1 Ready\n");

}

void loop()
{
  
    Serial.print("Servo 1 position 0\n");
    servo1.write(0);
    Servo::refresh();
    delay(1000);
    
    Serial.print("Servo 1 position 90\n");
    servo1.write(90);
    Servo::refresh();
    delay(1000);
    
    Serial.print("Servo 1 position 180\n");
    servo1.write(178);
    Servo::refresh();
    delay(1000);    
        
}

4  Forum 2005-2010 (read only) / Interfacing / Re: Basic Servo Interfacing on: July 25, 2008, 09:16:03 pm
yes it is JR Servo DS 285... i have seen them used on align trex 450 rc helicopters
5  Forum 2005-2010 (read only) / Interfacing / Re: Basic Servo Interfacing on: July 25, 2008, 08:48:36 pm
thank you so much, that definitly did get it to start moving... i am trying to make it go from 0 degrees to 180 degrees.. or left to right so i can mount a sensor on it...

i tried updating the code as follows but seems to slow the movement down a lot... do you think it is some sort of a timing issue?

#include <Servo.h>
  
Servo servo1;
  
void setup()
{
  
  pinMode(9,OUTPUT);  
  Serial.begin(19200);
  servo1.attach(9);
  servo1.setMaximumPulse(2000);
  servo1.setMinimumPulse(700);
  Serial.print("Servo1 Ready\n");
  
}
  
void loop()
{
    
    Serial.print("Servo 1 position 0\n");
    servo1.write(0);
    Servo::refresh();
    delay(1500);
    
    Serial.print("Servo 1 position 180\n");
    servo1.write(180);
    Servo::refresh();
    delay(1500);
    
    Servo::refresh();  
    
    Serial.print("\n");
    delay(3000);  
}
6  Forum 2005-2010 (read only) / Interfacing / Basic Servo Interfacing on: July 25, 2008, 08:25:27 pm
Folks I am a newbie to the arduino like mcu world... just getting started with all this...

i am having a lot of  trouble just getting one servo to work with arduino...  would really appreciate it if anyone can shed some light as to what i am doing wrong here... the servo seems to twitch once in a while ... when the code runs.. but nothing else.. i am using the servo library

my setup is the basic arduino USB board from sparkfun.com
JR Servo DS285

Connected to Pin 9 on arduino
Power source is from the +5 onboard arduino
the arduino is connected to my laptop via USB

#include <Servo.h>

Servo servo1;

void setup()
{
  
  pinMode(9,OUTPUT);
  Serial.begin(19200);
  servo1.attach(9);
  servo1.setMaximumPulse(2000);
  servo1.setMinimumPulse(700);
  Serial.print("Servo1 Ready\n");

}

void loop()
{
  
    Serial.print("Servo 1 position 70\n");
    servo1.write(70);
    delay(1500);
    
    Serial.print("Servo 1 position 100\n");
    servo1.write(100);
    delay(1500);
    
    Servo::refresh();
    
    Serial.print("\n");
    delay(3000);  
}
Pages: [1]