Show Posts
Pages: 1 ... 59 60 [61] 62 63 ... 227
901  Using Arduino / Project Guidance / Re: Power a Precise Motor? on: January 28, 2014, 09:47:13 pm
How large is a large motor? This HERE is a motor controller that can deliver up to 43 Amps, however the forth link I posted is rated for 2 Amps. How much power/torque do you need?
902  Using Arduino / Project Guidance / Re: Power a Precise Motor? on: January 28, 2014, 09:36:35 pm
Quote
Is this possible (and if so, how) with Arduino? Can I use one to power a motor for specifically this purpose?
Yea it's possible, but not with the arduino alone. You will of course need a motor shield that can drive the stepper. There are also some good libraries in the Arduino Playground that you might want to check out, like the Adafruit Motor Controller or even the Arduino Motor Controller.

Here is another library that works with almost all third party motor controllers. Stepper

These here are compatible with the "Stepper" library.
DC 5V stepper motor
L9110S DC/Stepper Motor Driver Board H Bridge for Arduino
L298-Based Stepper/DC Motor Driver Board
DC Stepper Motor Driver Controller Board Module Model L298N for Arduino VE4A
903  Using Arduino / Programming Questions / Re: bluetooth problem on: January 28, 2014, 09:24:09 pm
What bluetooth module are you using, and do you have any code to show?
904  Using Arduino / Project Guidance / Re: Mental block with programming sequence on: January 28, 2014, 07:20:16 pm
This is not tested but if it doesn't work with 9 being in the while loop, change it to 8.
Code:
void getNumber(char buf[]){
    uint8_t i = 0, a;
    Serial.println("Getting Hp Number");
   
    while(i != 9 )   //allows only 8 Digit for Hp Number
    {
       a = getDigit();
       lcdPutCh(a);            // Display Hp Number on lcd
       buf[i]=a;               // store hp number into array for gsm       
       i++;
    }   
    //buf[i]=0;                 // reset my input hp number
}
905  Using Arduino / Project Guidance / Re: Mental block with programming sequence on: January 28, 2014, 03:19:45 pm
Quote
The moment I key In 9, this exact thing is shown(9incorrect Password)
At the Next number, 7,(7incorrect Password)

That's because you need to collect the full password first then compare it. Right now your reading in one char, then comparing it, second char, comparing it...etc. Use a while loop to gather the full password first then see if it is a match.
906  Using Arduino / Project Guidance / Re: My 1st project: TIE Crawler from the Star Wars Expanded Universe on: January 28, 2014, 03:07:40 pm
I'm going to keep the pictures large, this way it is easier to see the connections. Those two chips are Quad Half-H drivers (SN754410). One for the drive motors the other for the claw.
907  Using Arduino / Project Guidance / Re: My 1st project: TIE Crawler from the Star Wars Expanded Universe on: January 28, 2014, 02:44:32 pm
No, but you can use the Lego motors, like I did in my video.
908  Using Arduino / Project Guidance / Re: Problems with hacking Ikea Dioder on: January 28, 2014, 10:44:42 am
Like I said, I don't remember who it was that told me, but if it works with both then I was wrong and I apologize. I never questioned it, because at the time I only had one Arduino Uno, and I did not want to risk damaging it in any way.
909  Using Arduino / Project Guidance / Re: Problems with hacking Ikea Dioder on: January 28, 2014, 10:37:53 am
You should never have wall power and USB power plugged in at the same time, it can damage your Arduino.

I'm surprised to read that. How will this damage anything?

I was always told you should never have both plugged in, that you could burn out the Atmega chip.
I don't remember who it was that told me, but since then I always stuck by it.
910  Using Arduino / Project Guidance / Re: Problems with hacking Ikea Dioder on: January 28, 2014, 09:25:11 am
Once the arduino is programmed, you should disconnect the USB cable and just run on the AC adapter. The person in the link probably did some damage to his arduino too. Double check your wiring.
911  Using Arduino / Project Guidance / Re: Problems with hacking Ikea Dioder on: January 28, 2014, 09:06:20 am
You should never have wall power and USB power plugged in at the same time, it can damage your Arduino.

Quote
I'm using a 12V 1000mA adapter. Since the ULN2003a has a max of 500mA, would it be possible that I fried these components?
I need to see the wiring to the LEDs to make to tell you if you have or have not fried anything.  Actually if you have had both wall and USB plugged in for too long, its possible you fried your Arduino.
912  Using Arduino / Project Guidance / Re: Mental block with programming sequence on: January 28, 2014, 08:25:56 am
CTRL + T, will do wonders for your code, give it a try.

Ok, strcmp().
Well your master password is "97589398", so what you do is enter a password with the keypad and using strcmp or strncmp you can see if they are a match.

strcmp:
Quote
A zero value indicates that both strings are equal.
A value greater than zero indicates that the first character that does not match has a greater value in str1 than in str2;
And a value less than zero indicates the opposite.

Code:
if( !strcmp( numbuf, "97589398") )  // This will only be true if the passwords are equal
{
   Serial.println("Password Correct");
   pinMode(10,OUTPUT); // this is usually declared in the setup function
   digitalWrite(10,HIGH);
   lcdPutStr("Unlocked");
}   
else lcdPutStr("Incorrect Password");  // if it's just one line, it doesn't need breackets

Now you can also use strncmp, but this function is more of a filter.
Quote
char str[][5] = { "R2D2" , "C3PO" , "R2A6" };
  int n;
  puts ("Looking for R2 astromech droids...");
  for (n=0 ; n<3 ; n++)
    if (strncmp (str[n],"R2xx",2) == 0) // the 2 tells the function to look for a possible match 2 chars inward
    {
      printf ("found %s\n",str[n]);
    }
  return 0;

OUTPUT:
Looking for R2 astromech droids...
found R2D2
found R2A6
913  Using Arduino / Project Guidance / Re: Mental block with programming sequence on: January 28, 2014, 12:54:41 am
Post your full code, and for comparing the password use strcmp() or strncmp().
914  Using Arduino / Programming Questions / Re: Libraries? on: January 27, 2014, 10:58:23 pm
They mainly exist so you don't have to constantly rewrite code fragments for all your sketches, and it does make things a hell of a lot easier and more appealing to the eye.
915  Using Arduino / Programming Questions / Re: Shifting contents of an array on: January 27, 2014, 08:12:18 pm
When you fix #define N_CHARS (sizeof(Compass)/sizeof(Compass[0])) you dont need the extra 5.
Pages: 1 ... 59 60 [61] 62 63 ... 227