Show Posts
Pages: [1] 2 3 ... 3285
1  Using Arduino / Programming Questions / Re: pwm arduino uno on: August 28, 2014, 02:00:55 pm
    if(dataRecv.length > 1)

               if(dataRecv[1] == 'A' && dataRecv[2] == '6' && dataRecv[3] == '0' && dataRecv[4] == '0')
Suppose dataRecv.length is 2. What it this going to do?

    if(dataRecv == "A630")
be simpler?
2  Using Arduino / Programming Questions / Re: programming with stepper motor on: August 28, 2014, 01:53:30 pm
would have a way to make this programming q repeat 12x without copies it be 12x?
Use the Stepper library.

Stepper myStepper(/* appropriate pin numbers go here */);

3  Using Arduino / Programming Questions / Re: Help implement queue for ticker? on: August 28, 2014, 01:51:28 pm
What I need help on is reading data with and kind of pushing each byte onto the array, where every time it reads a byte, it pushes in to message[], and then I can call showMessage such that the display scrolls.
   if(Serial.available() > 0)
       char letter =;
       message[index++] = letter;
       message[index] = '\0';

At some point, you'll probably want to reset index to 0. You'll also need to, of course, define index as a global or static variable (of type byte, probably).
4  Using Arduino / Networking, Protocols, and Devices / Re: Bluetooth Handshake Arduino Processing on: August 28, 2014, 10:10:26 am
something like serial.available
Something exactly like Serial.available().
5  Using Arduino / Programming Questions / Re: help with for loop on: August 28, 2014, 10:05:09 am
    for (int j=0; j<5; j++)
      tagIn[j] = rfid.serNum[j];
There is no need to waste memory making a copy of that array.

        for(int k=0;k<5;k++)
Printing Authorize just once isn't sufficient?

    for(int l=0;l<5;l++)
      for(int o=0;o<5;o++)
If the first entry in the 2D array matches, is it reasonable to check the second?
6  Using Arduino / Programming Questions / Re: help with for loop on: August 28, 2014, 09:29:30 am
Nope. That piss-poorly indented code is just to hard to read.

Tools + Auto Format BEFORE you post code!
7  Using Arduino / Programming Questions / Re: bounce library 5 click 1 button function? on: August 28, 2014, 09:20:20 am
I just though the ++ option looked "cleaner".  Guess aesthetics should take a backseat.
The point was that:
is all that is needed. And THAT looks cleanest!
8  Topics / Robotics / Re: Control robotic arm using arduino and kinect on: August 28, 2014, 08:48:19 am
anyone knows how can I see what serial port of arduino is receiving ? I can't use serial monitor because port is already in use when i run the code so is there another way to see what is receiving ?
The application that is sending data to the Arduino needs to have a way of reading data that the Arduino sends. If it does, you are out of luck.

You could, of course, use the Serial Monitor application to send data to the Arduino in the format that you think that application is sending the data. Make the Arduino deal with the known format. If the Arduino then deals with the unknown format data in the same way, then you were correct in guessing what the application is sending. If not, you weren't. So, you make another guess.
9  Topics / Robotics / Re: n00b alert!: Trying to make a arduino powered rc controller. on: August 28, 2014, 08:38:58 am
i have been searching online for a similar project but cant find one that fits the bill
Aside from having jumped into the deep end without knowing how to swim, what is your problem?

You have several things you need to be able to do. You need to be able to read a value from each of the potentiometers (trivial), you need to be able to send that value over the radio, you need to receive that data (somewhere), and you need to make that value control one of the motors. Which part are you stuck on?
10  Using Arduino / Networking, Protocols, and Devices / Re: Multi-state input on ATMega328p and ATtiny85 on: August 28, 2014, 08:28:07 am
Would it be possible to define logic LOW/HIGH to distinguish which peripherals are actively sending a signal?
That's the way they are defined. You can not determine whether or not a pin has anything attached to it. If it does, though, the pin is either HIGH or LOW.
11  Using Arduino / Networking, Protocols, and Devices / Re: Sending integer data via XBEE.. on: August 28, 2014, 08:23:58 am
So are u here to troll me or to help me ......  smiley-razz
That depends. Are you here as a troll or for help?

If you were here for help, you'd have posted some code, described what it did, and did not do.
12  Using Arduino / Networking, Protocols, and Devices / Re: DUE and Xbee on: August 28, 2014, 08:22:13 am
In fact it's in my default class construtor :/
Bad idea. You are assuming that the hardware is ready. But, your constructor is most likely called before init() is called to get the hardware ready. So, it's like you didn't call begin() at all.

Since you can't take a hint, even when applied with a clue by four, POST ALL OF YOUR CODE!
13  Using Arduino / Networking, Protocols, and Devices / Re: Bluetooth Handshake Arduino Processing on: August 28, 2014, 08:18:39 am
Here i read what processing writes:
What does that show you?

Serial data arrives ssslllooowwwlllyyy. The Arduino reads it quickly. That code doesn't check that there is something to read, so most iterations of that loop are trying to read data that hasn't arrived.
14  Using Arduino / Programming Questions / Re: bounce library 5 click 1 button function? on: August 28, 2014, 08:07:49 am
      count = count++;
count++ increments the value in count. So, it is equivalent to count = count + 1. So, your code is equivalent to
count = count = count + 1;
Looks a bit odd written that way, doesn't it?

What is supposed to happen when count is 0?
15  Using Arduino / Programming Questions / Re: Help Needed with programming to recieve data in API mode through XBEE. on: August 28, 2014, 08:00:08 am
i know because in my loop i had an else condition that says to print data if no xbee response is present, in the serial monitor i get no data alone printed.
I'm sure that 2 second peak at the code would convey a lot more information than that string of words.
Pages: [1] 2 3 ... 3285