Show Posts
Pages: 1 ... 33 34 [35] 36 37 ... 288
511  Using Arduino / Programming Questions / Re: NOOB Servo problem on: June 06, 2014, 03:35:07 pm
I suggest that you post the complete program for one servo and answer the questions about debug output and switch wiring.
512  Using Arduino / Project Guidance / Re: double servo control on: June 05, 2014, 12:39:35 pm
Quote
i am using an old UNO
What model of Uno is it and how many pins does it have ?

How about using analogue inputs and resistor ladders to put different voltages on an analog pin to signal extend, stop and retract actions depending on the switch position ?  Only one pin is needed per channel using that method.  Control 4 jacks with 4 pins.

Or maybe a rotary selector switch with 4 positions (one analogue pin) to select  and one switch to select the action (a second analogue pin).  So, control 4 jacks with just 2 pins.
513  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
514  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.
515  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 ?
516  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.
517  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 ?
518  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 ?
519  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 ?
520  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.
521  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 ?
522  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.
523  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
524  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.
525  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. 
Pages: 1 ... 33 34 [35] 36 37 ... 288