Show Posts
Pages: 1 ... 14 15 [16] 17 18 ... 269
226  Using Arduino / Project Guidance / Re: double servo control on: June 05, 2014, 09:41:59 am
now.. adding everything up i am out of digital pins... need 4 more...

i could split everything and run 2 arduinos, but is there an io shield that is recommend?
Which Arduino are you using and how much other hardware have you got attached ?

2 servos = 2 pins
1 button = 1 pin
Total = 3 pins
227  Using Arduino / Project Guidance / Re: help creating a scratching controller on: June 05, 2014, 09:37:42 am
I have a wibble device but my wobbulator interface is using a non standard spiffle protocol ever since I installed tutankhamun.  HELP! smiley

I expect that my reply means as much to you as your question does to me.  Please provide some links to the devices/products that you mention to avoid everyone having to guess.
228  Using Arduino / Programming Questions / Re: Serial monitor not displaying anything. on: June 05, 2014, 09:31:56 am
Code:
    bufferCount = ReadLine(myData);
Questions for you. 

Does calling ReadLine() update the myData array ?
Try printing it when each character is read from Serial and see what you get.

Code:
  while (true)
  {
    if (Serial.available() > 0)
    {
      c = Serial.read();
      if (c != '\n') {
        str[index++] = c;
      }
      else
      {
        str[index] = '\0';  // null termination character
        break;
      }
    }
  }
Will the while condition ever be false and end the while loop, thus exiting the ReadLine() function ?
229  Using Arduino / Programming Questions / Re: Help me in pressure sensor read from 0 - 10Vdc 0-250 bar on: June 05, 2014, 04:53:06 am
Have you written any code for this or do you want it written for you ?
If the latter then Gigs & Collaborations is the place to ask.

If the former, then please post your program (all of it), a link to the measuring device and a circuit diagram showing how the Arduino. the device and the power supply are wired.
230  Using Arduino / Programming Questions / Re: Bit of help converting for loops? on: June 05, 2014, 04:47:23 am
Good for you for getting it working, but you are still using delay() which will be blocking to some extent.  What sort of value does the wait variable have when the functions are called ?
231  Using Arduino / Programming Questions / Re: i cannot use 'import' command.. plz help on: June 05, 2014, 01:32:08 am
Code:
import processing.serial.*;
Looks like a Processing command to me.  Are you trying to compile this on an Arduino ?
232  Using Arduino / Programming Questions / Re: Bit of help converting for loops? on: June 05, 2014, 01:30:29 am
Without seeing your whole program it is difficult to give full help, but all of the functions you included in your post, both original and revised, use the delay() function so will be blocking to some extent.

The for loop versions will block longer of course but we need to see how and where the functions are called in order to provide help.  For instance, what are the values of j and k when the revised version of the rainbow() function is called and how frequently is it called ?
233  Using Arduino / Programming Questions / Re: Help with robot code on: June 04, 2014, 05:02:04 pm
Do you get any values at all if you print the left and right distances ?

Also, note that ping() returns a long but you are comparing the value returned with ints.
234  Using Arduino / Programming Questions / Re: converting character strings to numbers on: June 04, 2014, 04:09:33 pm
Now that I have seen your code I see that you are using Strings, not strings.  Not the same thing at all.

Have you been trying to use atoi() and atof() with Strings ?
235  Using Arduino / Programming Questions / Re: converting character strings to numbers on: June 04, 2014, 02:01:32 pm
Quote
Perhaps with atoi() and atof(), but I can't get that to work.
Can you please post a program showing what you tried and details of what did not work.
236  Using Arduino / Programming Questions / Re: Trying to make a standalone signal system... on: June 04, 2014, 02:55:55 am
Code:
if (route = 0)
This compiles but does not do what you want.
You need to use == to test a value as you have done correctly later in the program.

Code:
  for(int x = 0; x<13; x++){
    pinMode(x, OUTPUT);
  }
Do you really want to set pins 0 and 1 to OUTPUTs ?

Code:
if (digitalRead(cancelButton) == HIGH) route = 0; //reset route if cancel pressed
if (route = 0) { //only do this if no route has been set
  if (digitalRead(cb[1]) == HIGH) {
    route = 10;
  }
Personally I would always enclose the code block for a true if statement in braces rather than sometimes omitting them when the block has only one line of code
237  Using Arduino / Programming Questions / Re: extending battery life on Arduino uno servo control setup on: June 04, 2014, 01:34:47 am
As I said in my previous post
Quote
The library is not installed, installed in the wrong place, named wrongly or you did not stop/start the IDE after the installation.
Where is the library installed ?  Please give the full path of the folder and its name.

It should be in the libraries folder of the folder holding your programs, not the libraries folder where the Arduino executable is located.  If the problem is with the library location then looking at your code will not help.
238  Using Arduino / Programming Questions / Re: Help with logic on: June 04, 2014, 01:29:38 am
Quote
Is there a way i could have a current position variable? if  tell the stepper to move say 20 steps clockwise from 0 and it takes say 5 seconds to complete is there a way to check at what step it is at part way through the move?
Not unless you have some form of feedback from the motor such as a rotary encoder.  What you could do as a compromise is to move the motor one step at a time instead of 20 then you would at least know which individual step it was executing at any point in the program. 
239  Using Arduino / Programming Questions / Re: custom characters on: June 03, 2014, 03:03:36 am
Quote
my string"bhuvanesh:gd mrng"is not showing up
What, if anything, does show up ?
240  Using Arduino / Programming Questions / Re: extending battery life on Arduino uno servo control setup on: June 03, 2014, 01:11:05 am
Quote
I get a pop up when I verify that says ('IRrecv' does not name a type) And it highlights  IRrecv irrecv(RECV-PIN);
The library is not installed, installed in the wrong place, named wrongly or you did not stop/start the IDE after the installation.
Pages: 1 ... 14 15 [16] 17 18 ... 269