Show Posts
Pages: [1] 2 3 ... 137
1  Using Arduino / Motors, Mechanics, and Power / Re: Induction Motor Control! on: Today at 04:08:27 pm
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.

2  Using Arduino / Programming Questions / Re: Out of memory, how to reduce this program's size on: Today at 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.
3  Using Arduino / Programming Questions / Re: Out of memory, how to reduce this program's size on: Today at 03:15:03 pm
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.
4  Using Arduino / Programming Questions / Re: Out of memory, how to reduce this program's size on: Today at 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.
5  Using Arduino / Programming Questions / Re: if else or switch case? on: Today at 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

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

A more efficient scheme would be

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.
6  Using Arduino / Programming Questions / Re: Doesn't send sms on: Today at 02:59:00 pm
When you press the button,   you probably only want to send it once.
7  Using Arduino / Programming Questions / Re: error compilling when verify the code on: Today at 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.      may help
8  Using Arduino / Programming Questions / Re: Trouble implementing Madgwick AHRS (with MATLAB sample) on: Today at 02:47:34 pm
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:

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.
9  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++
10  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.
11  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.
12  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.
13  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.
14  Using Arduino / Programming Questions / Re: Get Frames from ADNS-9800 on: April 17, 2014, 08:05:16 am
> 6. Check for first pixel by reading bit zero of Motion register. If = 1, first pixel is available.

Check bit zero.

That is not the same as checking that the whole byte has the value 1.
15  Using Arduino / Programming Questions / Re: Best way to read in an analog trigger signal on: April 17, 2014, 08:02:13 am
Your analog signal is going to transition between high and low,   something in the ballpark of 1000 times a second.   And it is going to be negative about half the time,   which won't do the analog-digital input much good.

You need a circuit which detects the peak level of the analog signal on some basis.

Even then,  if there are beats in the music,   that signal will often be zero.
Pages: [1] 2 3 ... 137