Forum >Replies by hardmouse
userhead hardmouse
Replies (18)
  • You Reply: So, by your code. 90 is the maximum?

    When I test the Arduino SWEEP sample code, it only good until 60(default was 180).
    Any inter over 60 just hold in position.

    // Sweep
    // by BARRAGAN <http://barraganstudio.com>
    // This example code is in the public domain.


    #include <Servo.h>

    Servo myservo;  // create servo object to control a servo
                    // a maximum of eight servo objects can be created

    int pos = 0;    // variable to store the servo position

    void setup()
    {
      myservo.attach(9);  // attaches the servo on pin 9 to the servo object
    }


    void loop()
    {
      for(pos = 0; pos < 60; pos += 1)  // goes from 0 degrees to 180 degrees
      {                                  // in steps of 1 degree
        myservo.write(pos);              // tell servo to go to position in variable 'pos'
        delay(15);                      // waits 15ms for the servo to reach the position
      }
      for(pos = 60; pos>=1; pos-=1)    // goes from 180 degrees to 0 degrees
      {                               
        myservo.write(pos);              // tell servo to go to position in variable 'pos'
        delay(15);                      // waits 15ms for the servo to reach the position
      }
    }
  • You Reply: So, by your code. 90 is the maximum?

    When I test the Arduino SWEEP sample code, it only good until 60(default was 180).
    Any inter over 60 just hold in position.

    // Sweep
    // by BARRAGAN <http://barraganstudio.com>
    // This example code is in the public domain.


    #include <Servo.h>

    Servo myservo;  // create servo object to control a servo
                    // a maximum of eight servo objects can be created

    int pos = 0;    // variable to store the servo position

    void setup()
    {
      myservo.attach(9);  // attaches the servo on pin 9 to the servo object
    }


    void loop()
    {
      for(pos = 0; pos < 60; pos += 1)  // goes from 0 degrees to 180 degrees
      {                                  // in steps of 1 degree
        myservo.write(pos);              // tell servo to go to position in variable 'pos'
        delay(15);                      // waits 15ms for the servo to reach the position
      }
      for(pos = 60; pos>=1; pos-=1)    // goes from 180 degrees to 0 degrees
      {                               
        myservo.write(pos);              // tell servo to go to position in variable 'pos'
        delay(15);                      // waits 15ms for the servo to reach the position
      }
    }
  • You Reply: By the way, I did try using Arduino NANO and the expansion shield, it works fine. But since the design of flyduino is much smaller. I'd like to use it as my first choice.  ;)
  • You Reply: By the way, I did try using Arduino NANO and the expansion shield, it works fine. But since the design of flyduino is much smaller. I'd like to use it as my first choice.  ;)
  • You Reply: The sample code is using MEGASERVO library which not working under IDE 1.0.1 so I modified it to servo instead. It doesn't work. And please, tried it yourself before post GUESSING answer. The code works with no problem. It's the reaction from servo doesn't seems right. If you want I can make a video for you. The power source is 7.2V lipo battery and I also using 15A UBEC regulate the current down to 6V. This setting works in all my other robots.

    Re:Lauren
    Here is the link:
    [url=http://www.thingiverse.com/thing:41840]http://www.thingiverse.com/thing:41840[/url]
  • You Reply: The sample code is using MEGASERVO library which not working under IDE 1.0.1 so I modified it to servo instead. It doesn't work. And please, tried it yourself before post GUESSING answer. The code works with no problem. It's the reaction from servo doesn't seems right. If you want I can make a video for you. The power source is 7.2V lipo battery and I also using 15A UBEC regulate the current down to 6V. This setting works in all my other robots.

    Re:Lauren
    Here is the link:
    [url=http://www.thingiverse.com/thing:41840]http://www.thingiverse.com/thing:41840[/url]
  • You Reply: If only connect to your UNO, you only need this:
    www.dfrobot.com/index.php?route=product ... PSl5Ue9KSM
    Beaware you also need external 6V power for servos.

    If you are thinking flyduino, you don't need UNO. Because itself is a atmega328. But personally I think flyduino is not so friendly. I still can't get it to work. Not many help for Flyduino online or even here.
  • You Reply: So, no solution for this one?
  • You Reply: So, no solution for this one?
  • You Reply: Flyduino-A 12 Servo Controller itself is a Arduino board and it works alone. All you need it a FTDI breakout board to  upload your program into it. I got 2 of them but the question I got is to controlling the servos. Even the sample code is not working properly.
  • You Reply: Hi,
    I am having problem with following code to control servos via flyduino:
    [quote]#include <Servo.h>
    #define NBR_SERVOS 12
    #define FIRST_SERVO_PIN 2

    Servo Servos[NBR_SERVOS] ;

    int pos = 0;

    void setup()
    {
      for( int i =0; i < NBR_SERVOS; i++)
        Servos[i].attach( FIRST_SERVO_PIN +i, 800, 2200);
    }
    void loop()
    {
     
        for(pos = 0; pos < 180; pos += 1){
          for( int i =0; i <NBR_SERVOS; i++){
            Servos[i].write(pos);
          }
          delay(15);
        }
        for(pos = 180; pos>=1; pos-=1){
          for( int i =0; i <NBR_SERVOS; i++){
            Servos[i].write(pos);
          }
          delay(15);
        }
    }[/quote]

    The servo suppose to moving form 0~90 degree and back to 0 degree and keep looping. However, servos do moves but they only moving in between reading POS:45~55 and jiggling when reading less than 45 or greater than 55.

    Any ideas? I really hope to get my quadrabot moving by using this board since it's the smallest board I can find to fit in my design. Thanks!

    [img]http://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-ash3/65111_10152349937770111_1238878931_n.jpg[/img]
  • You Reply: Does it read 2G SD card? and I format it in FAT format.
  • You Reply: Does it read 2G SD card? and I format it in FAT format.
  • You Reply: Does it read 2G SD card? and I format it in FAT format.
  • You Reply: I have one player but never have it working because the program always stuck or halt after command line "Wire.endTransmission();". I am using either 328 or 1280 or many other arduino families or mutant. I guess its my library issue or OS issue? (WIN7 i am using)
  • You Reply: I have one player but never have it working because the program always stuck or halt after command line "Wire.endTransmission();". I am using either 328 or 1280 or many other arduino families or mutant. I guess its my library issue or OS issue? (WIN7 i am using)
  • You Reply: I have one player but never have it working because the program always stuck or halt after command line "Wire.endTransmission();". I am using either 328 or 1280 or many other arduino families or mutant. I guess its my library issue or OS issue? (WIN7 i am using)
  • You Reply: Mine goes the other way. It works fine on MEGA but not working on Due.
    I have video posted to show the result.

    [url=http://www.youtube.com/watch?v=Dfl6HTHLONU]http://www.youtube.com/watch?v=Dfl6HTHLONU[/url]