Show Posts
Pages: 1 ... 8 9 [10] 11 12 ... 285
136  Using Arduino / Programming Questions / Re: help fixing my code? :) on: August 06, 2014, 11:28:30 am
Did you think you could just hook a speaker up to a digital pin and get speech out of an Arduino? You can get tones and music, but no speech.

You might need this:
https://www.sparkfun.com/products/11711
As far as I can see you are the only person that has mentioned speech in this thread.  I took the reference to a speaker to refer to a device for producing tones and by extension, music, from the Arduino, somehow involving the variable z.  I am still waiting to see what the other 25 single letter int variables will be used for.
137  Using Arduino / Programming Questions / Re: continuously rotation of LED on: August 06, 2014, 06:24:41 am
Quote
I already modified it.
I do wish that people would not modify code in posts because it makes a nonsense of comments about the original code, and you still have not put it in code tags as suggested.
138  Using Arduino / Programming Questions / Re: Motor Stutters on: August 06, 2014, 05:47:48 am
Quote
a "rule of thumb" is to use a voltage for the motor from 10 to 20 times the rated voltage for the motor.
Ouch !
If that is the case then why is the motor not rated 10 to 20 times higher ?
139  Using Arduino / Programming Questions / Re: continuously rotation of LED on: August 06, 2014, 05:43:34 am
Some questions

Why are the pin numbers for ledPin, ledPin1 and ledPin2 also in the ledPins array ?
How are the buttons wired ?
Do they have any pull down resistors ?
Why are you using ints for variables that could just as easily be bytes which would save space ?
 
140  Using Arduino / Programming Questions / Re: Combining Codes on: August 06, 2014, 01:44:46 am
When you combine the programs please be aware that using the servo library prevents the use of PWM on pins 9 and 10 on boards other than the Mega.
141  Using Arduino / Programming Questions / Re: help fixing my code? :) on: August 05, 2014, 05:04:04 pm
z will probably a sound on a speaker
Then why not give it a name like speakerNote or speakerVolume ?  What range of values do you expect the variable to hold and will the value ever be negative ?  What I am really asking is should the variable be an integer or would another data type be more appropriate ?
142  Using Arduino / Programming Questions / Re: help fixing my code? :) on: August 05, 2014, 04:56:31 pm
no its true im gonna make each one do something
I can't wait to see the program. 
How do you know that you will need 26 integer variables and are the names significant ?  Can you give an example of using one of them, say the z variable ?
143  Using Arduino / Programming Questions / Re: Using an integer to blink an led? on: August 05, 2014, 04:50:47 pm
That is what you said originally
Code:
void setup()
{
  Serial.begin(115200);
  for (int myInteger = 1; myInteger < 101; myInteger++)
  { 
    if (myInteger%10 == 0)
    {
      Serial.print(myInteger);
      Serial.println(" is divisible by 10");
    }
  }
}

void loop()
{
}
144  Using Arduino / Programming Questions / Re: help fixing my code? :) on: August 05, 2014, 04:49:10 pm
Quote
i need all those variables
I seriously doubt that.
145  Using Arduino / Programming Questions / Re: Using an integer to blink an led? on: August 05, 2014, 04:42:39 pm
Quote
I misstated in my opening post. I need the led to blink when an increment is reached, not a multiple of 10
I was OK with the original requirement but now I am lost.

Can you give some examples of when the LED should blink based on your code ?
146  Using Arduino / Programming Questions / Re: help fixing my code? :) on: August 05, 2014, 04:02:21 pm
Quote
im a beginner at robotics but not java tell me if im doing something wrong
Code:
int q,w,e,r,t,y,u,i,o,p,a,s,d,f,g,h,j,k,l,z,x,c,v,b,n,m;
You are doing something wrong.

How many of those integer variables do you actually need ?
147  Using Arduino / Programming Questions / Re: help fixing my code? :) on: August 05, 2014, 12:21:15 pm
I can't be bothered with looking at yet another website to see your code.  Why not paste it here, using code tags, or attach it to a post using the Additional Options links at the bottom of the edit window.
148  Using Arduino / Programming Questions / Re: Mapping analog voltage to multiple digital output pins/momentary latching on: August 05, 2014, 12:18:39 pm
Quote
In the schematic I posted below, the inputs float when no momentary is pressed, since there is no pull down/pull up
You only have one input and it is not floating.  It is pulled to GND by the resistor at the bottom of the diagram.
149  Using Arduino / Programming Questions / Re: [NOT RESOLVED]Serial Monitor-- can I do that ? on: August 05, 2014, 12:12:40 pm
Sry but u only blamed me u didn t helped ...
Well, he did reply to your post in the other thread.  Just because you raised the question in two places don't epect answers in both of them.
150  Using Arduino / Programming Questions / Re: arduino, data from serial monitor to lcd on: August 05, 2014, 12:08:58 pm
You know how to do
Code:
Serial.println(" cm");
Have wild guess how to lcd.print() the same text....
Pages: 1 ... 8 9 [10] 11 12 ... 285