|
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 //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.
|
|
|
|
|
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.
|
|
|
|
|
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
|
if ((currentMillis - previousMillis) > interval) { No, make it this, 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. 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.
|
|
|
|
|