author

JamesM176

Inbox View Profile
4Comments

Tell us about yourself!

  • JamesM176 made the instructable Morse Code Decoder
    Morse Code Decoder

    Works, and the serial decoding works too.

    View Instructable »
  • JamesM176 commented on pinaki_s91's instructable Morse Code Decoder
    Morse Code Decoder

    This is great! It was just what I was looking for. I would say that I had to play around with the timings a little. I used 10 for time between de-bounce, 800 for skip to next dot or dash, less than 300 for dit, greater than 300 for dash. OH... and I added support for numbers. Would you guys mind if I created a new indestructible with my version? I will totally credit you for most of the work.Here are the key lines I added for number support. I did it in a very similar way to your letter search: bool numberFound = false; static String numbers[] = { "-----",".----", "..---", "...--", "....-", ".....", "-....", "--...", "---..", "----.", "N" }; in…

    see more »

    This is great! It was just what I was looking for. I would say that I had to play around with the timings a little. I used 10 for time between de-bounce, 800 for skip to next dot or dash, less than 300 for dit, greater than 300 for dash. OH... and I added support for numbers. Would you guys mind if I created a new indestructible with my version? I will totally credit you for most of the work.Here are the key lines I added for number support. I did it in a very similar way to your letter search: bool numberFound = false; static String numbers[] = { "-----",".----", "..---", "...--", "....-", ".....", "-....", "--...", "---..", "----.", "N" }; int i = 0; while (numbers[i] != "N") //loop for comparing input code with letters array { if (numbers[i] == code) { Serial.print(char('0' + i)); numberFound = true; break; } i++; }i=0<<<<< your code checks for letters >>>>>> if ( (letters[i] == "E") &&(numberFound == false)) { Serial.println("<Wrong input>"); //if input code doesn't match any letter, error } code = ""; //reset code to blank string numberFound = false; //reset to search for numbers again.

    Well, a line feed for every character would be pretty wasteful of paper. This code also has no breaks for words, which would make your print out a bit harder to read. I would suggest creating a variable that counts horizontal position, then line feeds to the next line when it reaches the end of each line. (probably 40 characters on most reciept printers.

    View Instructable »
  • What kind of range do you get for a human hand? How close where you when the detector first went to a 2 level? Were the distances linearly proportional to the numbers, or were the number zones smaller as you got closer? Does the direction that you approach the antenna for make any difference? Do you think if you expanded the code, could you get 1024 different touch zones out of one resistor? Because if you could then, WOW! I am definitely planning on making this.

    View Instructable »