Show Posts
Pages: [1] 2 3 ... 137
1  Using Arduino / Motors, Mechanics, and Power / Re: Servos were trembling, especially when reaching 100% PWM duty cycle on: April 21, 2014, 08:03:46 pm
Servo PWM   should never be anything close to 100% duty cycle.

Servo pulse length between 0.5 and 1.5 milliseconds    and  pulse spacing about 20 milliseconds.
2  Using Arduino / Sensors / Re: sensor HIH 43030 sparkfun [fr] on: April 21, 2014, 08:01:18 pm
Est google brisé dans votre pays ?

3  Using Arduino / Motors, Mechanics, and Power / Re: Induction Motor Control! on: April 20, 2014, 04:08:27 pm
Quote
That is, if I mechanically spin an excited induction generator/motor, I should be able to form 3-phase power out.

No, you won't.

4  Using Arduino / Programming Questions / Re: Out of memory, how to reduce this program's size on: April 20, 2014, 03:18:33 pm
You have a lot of duplication of your output statements there.

One idea might be,   to write all the outputs into a single char array,    and then print that array to both the serial and the SD card.
5  Using Arduino / Programming Questions / Re: Out of memory, how to reduce this program's size on: April 20, 2014, 03:15:03 pm
Code:
static const int RXPin = 5, TXPin = 4; //GPS is attached to pin 4(TX from GPS) and pin 5(RX into GPS)
SoftwareSerial ss(RXPin, TXPin);

This looks the wrong way round, to me.   The first parameter of the SoftwareSerial constructor,   is the pin which is the input signal into the Arduino.   This would appear to be inconsistent with what the previous line in your code implies.
6  Using Arduino / Programming Questions / Re: Out of memory, how to reduce this program's size on: April 20, 2014, 03:09:18 pm
You haven't shown us the code for those sensor libraries,  it's difficult to know how compact they are.

One approach is to create your own minimised version of the sensor libraries,  by taking out any crap that you don't need or use.
7  Using Arduino / Programming Questions / Re: if else or switch case? on: April 20, 2014, 03:04:38 pm
If you have a lot of choices,   and the are numerical or can be represented as numerical,   there are better ways to choose than either if/else  or switch/case.

For example, if you state variable is s,  and s can have the value 1 to 25,  you could write

Code:
if ( s == 1 ) {}
else if ( s==2 ) {}
else if ( s==3 ) {}
//  et cetera

A more efficient scheme would be

Code:
if ( s < 13 )
{
    if ( s < 6 )
    {
        if ( s < 3 )
        {
        }
        else // s is 3 or higher
        {
        }
    }
    else  // s is 6 or higher
    {
    }
}
else  //  s is 13 or higher
{
}


The advantage of this is,   you get to the point of knowing what to do in only 4 or 5 comparisons of s,    instead of possibly 24 failed checks.
8  Using Arduino / Programming Questions / Re: Doesn't send sms on: April 20, 2014, 02:59:00 pm
When you press the button,   you probably only want to send it once.
9  Using Arduino / Programming Questions / Re: error compilling when verify the code on: April 20, 2014, 02:54:49 pm
This might be caused because NewSoftSerial has been renamed to SoftwareSerial,    for some long confusing saga  the details of which escape me.

http://arduiniana.org/libraries/newsoftserial/      may help
10  Using Arduino / Programming Questions / Re: Trouble implementing Madgwick AHRS (with MATLAB sample) on: April 20, 2014, 02:47:34 pm
Quote
Furhtermore. Do you initialze the quaternion (at the starting point of your program) with a predefined value? (like the g gravity vektor [0,0,-1] or just with the default values:
Code:

q.w = 1.0;
q.x = 0.0;
q.y = 0.0;
q.z = 0.0;

That is a bad initialisation choice for a quaternion.    The x,y,z components represent a scaled unit vector ( multiplied by the sine of the rotation ),   but 0,0,0    cannot be scaled to a unit vector by any means.
11  Using Arduino / Programming Questions / Re: the if-case is taken only one time in the while-loop, why? on: April 19, 2014, 12:29:03 pm
What is that "continue" for ?

The continue keyword has almost no legitimate use in C/C++
12  Using Arduino / General Electronics / Re: somebody please explain this? sketch attached on: April 17, 2014, 12:19:48 pm
Not continuously variable.  Three fixed speeds.  Like high, medium and low speed,  and off.

I have several large desk fans,  several pedestal fans, several ceiling fans, between 5 and 50 years ago,  all the same controls,  three push buttons and off.
13  Using Arduino / General Electronics / Re: somebody please explain this? sketch attached on: April 17, 2014, 09:38:55 am
How do room fans that have a selection of three speeds work ?

They have been around a long time,   and I somewhat doubt that they have variable frequency drives.
14  Using Arduino / Programming Questions / Re: rfid programming for attendance system on: April 17, 2014, 08:14:31 am
RFID works over very short distances.

It won't tell you,  who is present in a classroom.    It might tell you,   who has walked through a doorway.   Although it won't tell you very reliably whether they were walking IN the door,  or OUT of the door.
15  Using Arduino / Programming Questions / Re: Problem with my program with libraries adafruit_gps.h and SD.h on: April 17, 2014, 08:12:38 am
What happens when you run this program ?

You have to take the GPS outside,  or near a very large window,   and wait between 20 seconds and 20 minutes for it to start up.
Pages: [1] 2 3 ... 137