Show Posts
Pages: 1 ... 91 92 [93] 94 95 ... 252
1381  Using Arduino / Project Guidance / Re: is this program is writ??? replr me on: January 14, 2014, 12:21:17 am
That's a good sensor, yes, you can use interrupts with it. Look at post above to see the pins and interrupts.

NOTE: I don't think you want it as CHANGE, you may want it as HIGH or RISING.
1382  Using Arduino / Project Guidance / Re: is this program is writ??? replr me on: January 13, 2014, 11:50:44 pm
Interrupt pins:
Pin 2 = interrupt 0
Pin 3 = interrupt 1

Your IR sensor, don't you need to do some calculations with the data from it? I don't know if it can be tied into an interrupt and still work. Post a link to your particular IR sensor.
1383  Using Arduino / Project Guidance / Re: is this program is writ??? replr me on: January 13, 2014, 11:36:35 pm
First, use CODE tags, not QUOTE tags.
Second, what Arduino are you using? If is anything other than a Arduino Mega or Arduino Mega related, then your interrupt address should not be 2, it should be 0 or 1.

Do you have a link to your sensor?

This will turn just slightly, is that what you want, or something sharper?
1384  Using Arduino / Project Guidance / Re: Is there a good place to post code for reviews? on: January 13, 2014, 03:15:29 am
If is it Arduino related then you can post it here and we will give feedback. Not arduino related, the post is removed.
1385  Using Arduino / Programming Questions / Re: String Delcaration and Comparison on: January 13, 2014, 12:27:43 am
Look into char arrays and parsing strings. There are many examples you can find with a quick search.
1386  Using Arduino / Programming Questions / Re: [HELP] Servo motor delayed by unknown programming problems on: January 12, 2014, 10:21:34 pm
EDIT: I was beaten to it.

for(pos = 0; pos < 1500; pos += 1)

Your FOR loop loops 1500 times, in which you are adding a 5 millisecond delay per loop. With some simple  math, 1500 * 5 milliseconds = 7500 milliseconds or 7.5 seconds.

So it takes 7.5 seconds for just that one FOR loop to end, and to make it worse, You have done the exact same thing for the second FOR loop.

Why is your range 0 - 1499, when that library already takes care of that and made it so that you only need to enter 0 - 179?
1387  Using Arduino / Programming Questions / Re: Program for keypads on: January 12, 2014, 04:38:54 pm
That same error or a different one? I  tried your code and those were the only two mistakes that gave errors. The mistakes were fixed and now it compiles.
1388  Using Arduino / Programming Questions / Re: Program for keypads on: January 12, 2014, 03:07:17 pm
Where did you put the library? It should be in a "libraries" folder in the Arduino sketch folder, which should be located in your Mydocuments.
1389  Using Arduino / Programming Questions / Re: Program for keypads on: January 12, 2014, 02:58:01 pm
 Should be capital
#include <keypad.h>

These don't match.
void setLocked(int Locked){
  if (locked)
1390  Using Arduino / Programming Questions / Re: 315 MHz Tx and Rx problems. on: January 11, 2014, 10:16:23 pm
In the picture with your transmitter, you have the data line on pin 39, but your transmitter's code is set for pin 3. Which one is it really?
1391  Using Arduino / Programming Questions / Re: Compile Error ? on: January 11, 2014, 05:43:50 pm
LiquidCrystal_I2C lcd(0x3F,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line
Take display out.
1392  Using Arduino / Programming Questions / Re: Controlling two+ servos over a serial connection, problem with arrays? on: January 11, 2014, 04:06:39 pm
Look into sprintf and either strtok or parsing data.
1393  Using Arduino / Project Guidance / Re: Controlling the Arduino with an Android over Bluetooth? on: January 10, 2014, 11:59:13 pm
Try this code.
 Example sketch for the RFCOMM/SPP Bluetooth library - developed by Kristian Lauszus
 For more information visit my blog: or
 send me an e-mail:

#include <SPP.h>
USB Usb;
BTD Btd(&Usb); // You have to create the Bluetooth Dongle instance like so
/* You can create the instance of the class in two ways */
SPP SerialBT(&Btd); // This will set the name to the defaults: "Arduino" and the pin to "1234"
//SPP SerialBT(&Btd, "Lauszus's Arduino","0000"); // You can also set the name and pin like so
char val;
boolean firstMessage = true;

void setup() {
  pinMode(3, OUTPUT);
  if (Usb.Init() == -1) {
    Serial.print(F("\r\nOSC did not start"));
    while(1); //halt
  Serial.print(F("\r\nSPP Bluetooth Library Started"));
void loop() {
  if(SerialBT.connected) {
    if(firstMessage) {
      firstMessage = false;
      SerialBT.println(F("Hello from Arduino")); // Send welcome message

      val =;     
      if( val == 'H' || val == 'h' )               // if 'H' was received
        digitalWrite(3, HIGH);  // turn ON the LED
      if( val == 'L' || val == 'l' )
        digitalWrite(3, LOW);   // otherwise turn it OFF
    firstMessage = true;
1394  Using Arduino / Project Guidance / Re: Distributing current evenly between two parallel programmes on: January 10, 2014, 06:22:12 pm
The LEDs draw whatever current they need, you don't really have any control over that. Why do you think you need to balance the current?
1395  Using Arduino / Project Guidance / Re: Hey, need some help on where to start programming! (Balancing Bot) on: January 10, 2014, 06:20:03 pm
If the gyro is on a flat surface, I would imagine the numbers should not be fluctuating.
Pages: 1 ... 91 92 [93] 94 95 ... 252