Loading...
  Show Posts
Pages: 1 ... 39 40 [41] 42 43 ... 116
601  Using Arduino / Programming Questions / Re: IR Remote Code on: March 14, 2013, 09:55:23 am
Quote
when I verify this i get
a lot of compiling error.
Ok, what errors?
602  Using Arduino / Programming Questions / Re: Switch-case problem: exit from case during it's running time on: March 14, 2013, 09:43:40 am
Replace "nowtime-prevtime" with "millis() - nowtime"
603  Using Arduino / Project Guidance / Re: Sparkfun Keypad Defective?? Pictures included on: March 13, 2013, 07:48:37 pm
I solved my problem, and I think I spotted yours. Your resistors, are they going to GND or V+?
604  Using Arduino / Project Guidance / Re: Arduino+ RF on: March 13, 2013, 02:47:18 pm
I imagine an Arduino is somewhere in the mix too, right? You need to download the Virtualwire library.
605  Using Arduino / Programming Questions / Re: Playing 1000 songs from SD card on: March 13, 2013, 02:10:24 pm
Im not familiar with that library, but you could maybe try this.

pseudo
Code:
//look at the two buttons
if(button1)
{
  //increment track
}
if(button2)
{
  //decrement track
}

//Make the track an int to inc or dec and then convert that int to a string.
//With the int now a string, use strcat() to make it look like "0002.wav".
track = 2;
char *StrTrack = itoa(track);
strcat(StrTrack,".wav"); // It should produce "0002.wav".
606  Using Arduino / Project Guidance / Re: Sparkfun Keypad Defective?? Pictures included on: March 13, 2013, 01:55:11 pm
I think I now see what your problem is. I just tried to make my own keypad password, with a changeable master password and once I change the master, my '1' button does not work. Even in the serial monitor, it won't work. I don't understand what changed, but I think your having the same issue, however yours just wont work at all.

This is very strange.

Now if it was just the keypad, you should get a reading when you touch pins 5 and 8, but even then, nothing happened.

It must be a bug in the library.
607  Using Arduino / Programming Questions / Re: [QUESTION] How to use millis() function? on: March 13, 2013, 01:00:39 pm
Apologies, I over looked the else statement. You do still need this,"unsigned long currentMillis = millis();" to have something the millis() can compare to.
 
608  Using Arduino / Programming Questions / Re: Basic Serial on: March 13, 2013, 12:32:23 pm
A byte ranges from 0 - 255 or 00000000 to 11111111. There are examples provided in the IDE that may help you. Look at some simple serial communication examples, and play around with them.
609  Using Arduino / Programming Questions / Re: 8x8 max7219 programing on: March 13, 2013, 12:03:46 pm
What are the errors your getting, post them.
610  Using Arduino / Programming Questions / Re: Button to start an array on: March 13, 2013, 12:01:40 pm
Double declaired
Quote
int thisPin;
in setup() and
Quote
for (int thisPin = 0; thisPin < pinCount; thisPin++) {
in the loop().

ledPin is not the same as ledPins[]
611  Using Arduino / Programming Questions / Re: 8x8 max7219 programing on: March 13, 2013, 11:56:54 am
Quote
delay(10);
this is WAY too fast, make it bigger for more delay.

delay(200) should be good.
612  Using Arduino / Project Guidance / Re: Pendulum Balance Robot on: March 13, 2013, 11:53:23 am
Try this, comment out "myEnc.write(-512);" and spin the encoder, does it give out readings. Whats happening is, your telling the encoder to be set to a value, and then without any actual movement, its reading back that same value.
613  Using Arduino / Programming Questions / Re: [QUESTION] How to use millis() function? on: March 13, 2013, 11:44:14 am
Quote
if ((currentMillis - previousMillis) > interval) {
No, make it this,
Code:
if ((millis() - previousMillis) > interval) {
Otherwise "currentMillis - previousMillis" will always be 0, because you declaired "previousMillis = currentMillis;"

Add: actually you dont need this line anymore, "previousMillis = currentMillis;" just replace previousMillis with currentMillis in here.
Code:
if ((millis() - previousMillis) > interval) {
614  Using Arduino / Programming Questions / Re: Binary counting using 12 LEDs on: March 13, 2013, 10:59:10 am
Try this.
Look at the key, if it is not '#' or '*' then store it in a variable, convert that variable to an int, and then wait for the key to be '#' or '*'. Once key is '#' or '*', the code will decide whether to make it + or - the counter.
615  Using Arduino / Project Guidance / Re: Pendulum Balance Robot on: March 13, 2013, 10:25:40 am
I think it would be best to start over and do tests to see if it works, and again after each additional code.
Pages: 1 ... 39 40 [41] 42 43 ... 116