Show Posts
Pages: 1 ... 1205 1206 [1207] 1208 1209 ... 1893
18091  Using Arduino / Motors, Mechanics, and Power / Re: need guidance about servo and arduino mega on: December 09, 2011, 03:37:24 am
Forget the phone for now, and just get used to driving the servos from serial commands.
Zoomkat will be along shortly to post some example code.
18092  Using Arduino / Programming Questions / Re: stupid button press question on: December 09, 2011, 02:54:15 am
Quote
I set it as an output, then perform a digital read?
No, set it as an input, and perform a digitalWrite HIGH on it.
18093  Using Arduino / Programming Questions / Re: stupid button press question on: December 09, 2011, 02:47:47 am
Quote
where I have a pulldown resistor on said pin, and button pulls it high?
Why pay for a resistor, when you've got a pullup built-in for free?
18094  Community / Bar Sport / Re: Crap Science on TV on: December 09, 2011, 02:37:58 am
Quote
I swear I could come up with maybe 2 dozen boiler-plate news items that just need a few place and people's names inserted, the stations could use these, sack all the writers and have the stringers in the field just text the nouns

(May contain strong language)
18095  Using Arduino / Programming Questions / Re: Beginner - need help with my sketch on: December 08, 2011, 03:06:41 pm
Not really a good idea to edit the original post, better to post again with corrections.
18096  Using Arduino / Project Guidance / Re: guys I need an idea. on: December 08, 2011, 02:59:57 pm
Bank logos?
18097  Using Arduino / Programming Questions / Re: Beginner - need help with my sketch on: December 08, 2011, 11:16:47 am
Code:
randomchoice = random(1,3);
Well, I can see why it never goes to three, but not why it never picks one.
http://arduino.cc/en/Reference/Random

(Sorry, but I'm not going to download anything from an unknown source)
18098  Using Arduino / Project Guidance / Re: Is it possible / was it done ? -> Subtitles over VGA / HDMI video on: December 08, 2011, 07:23:01 am
720 x 1280 * 50Hz (or 60Hz) = 46 080 000 (or 55 296 000) pixels per second
It's gonna be tricky (or chunky) with a 16MHz processor
18099  Using Arduino / Project Guidance / Re: Feedback requested on my first Arduino project on: December 08, 2011, 05:22:10 am
Quote
but how do I get the right key for a letter? I don't see that 'A' = "SL" in this example.
'A' is the first letter in the alphabet, so it is the first letter in the array.
'Z' is the last in the alphabet, and the last letter in the array.
Code:
char* text = "THE QUICK BROWN FOX";
for (int i = 0; i < strlen (text); ++i) {
  char letter = text [i];
  char* code = morseCode [letter - 'A'] ;
  transmitCode (code);
}

(sorry, I don't like/use String)
18100  Using Arduino / Programming Questions / Re: Case switch menu system question on: December 08, 2011, 04:46:33 am
No, until you post your actual code, we're just wasting time.
18101  Using Arduino / Programming Questions / Re: HEX file on: December 08, 2011, 04:21:36 am
Hold down the SHIFT key when you compile - all will be revealed.
18102  Using Arduino / Programming Questions / Re: Case switch menu system question on: December 08, 2011, 04:12:13 am
Quote
But the original case runs in a WHILE loop that scans for a keypress... so when a button is presssed while in submenue, it also registers for original switch....
I don't understand this - are you saying there's some sort of callback from the keyboard input?
18103  Using Arduino / Project Guidance / Re: Feedback requested on my first Arduino project on: December 08, 2011, 04:10:41 am
Code:
hashMap[0]('A',"SL");
  hashMap[1]('B',"LSSS");
  hashMap[2]('C',"LSLS");
  hashMap[3]('D',"LSS");
  hashMap[4]('E',"S");
  hashMap[5]('F',"SSLS");
  hashMap[6]('G',"LLS");
  hashMap[7]('H',"SSSS");
etc, could be much simpler:
Code:
const char* morseCode [] = {"SL", "LSSS", "LSLS", "LSS"  etc };
Then
Code:
char* code = morseCode [letter - 'A'] ;
(with appropriate checks to ensure that "letter" is uppercase and in the range A - Z)

Also:
Code:
if ( morseCode[j] == 'S' ) {    //  short blink
        morseBlink(500);
      } else if (morseCode[j] == 'L') {    // L: long blink
is much easier to read.
18104  Using Arduino / Programming Questions / Re: Case switch menu system question on: December 08, 2011, 04:00:48 am
I'd put a fresh input and switch/case in each sub-menu function, but without seeing your actual code, it is difficult to say.
18105  Using Arduino / Project Guidance / Re: Robot Project on: December 08, 2011, 03:02:56 am
Something like one of these:
http://www.7dayshop.com/catalog/product_info.php?cPath=777_7&products_id=111184
Pages: 1 ... 1205 1206 [1207] 1208 1209 ... 1893