Monday, November 9, 2009

First Arduino Sketch - USB/LED morse code generator

I recently got a Duemilanove - of course I wanted to try it out, but all my "bits" are in storage while the basement is renovated.  So, what is something interesting that only uses the built-in LED and the USB serial interface?     Decided to try a morse code generator with adjustable delays to match the proper WPM timing.


//what to do when you only have the builtin led and usb and all your other bits are in storage
//morse code of course!
// set pin numbers:
const int ledPin =  13;      // the number of the LED pin

int incomingByte = 0;
char buffer[1025];
int buffercount=0;

// the follow variables is a long because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long interval = 240;           // interval at which to blink (milliseconds)
int wpm = 5; //stabdard is how many time paris is sent in a min.  Paris is 50 dots durations using standard timing

void setup() {
  Serial.begin(9600);
  // set the digital pin as output:
  pinMode(ledPin, OUTPUT);     
  buffer[1024]='\0'; 
}

void dot()
{
    digitalWrite(ledPin,HIGH);
    delay(interval);
    digitalWrite(ledPin,LOW);
    delay(interval);
}
void dash()
{
    digitalWrite(ledPin,HIGH);
    delay(interval*3);
    digitalWrite(ledPin,LOW);
    delay(interval);
}


void dotdash(char *s)
{
  Serial.println(s);
  for(int i=0;i<5;i++)  //5 as morse has 1-5 ._ per letter
  {
    if(s[i]=='\0')
    {
      break;
    }
    else if(s[i]=='.')
    {
      dot();
    }
    else if(s[i]=='-')
    {
      dash();
    }
  }
  delay(interval*3); // intra-char delay
}

void morse(char letter)
{
  Serial.print(letter, BYTE);
  switch(letter)
  {
    case 'A': dotdash(".-"); break;
    case 'B': dotdash("-..."); break;
    case 'C': dotdash("-.-."); break;
    case 'D': dotdash("-.."); break;
    case 'E': dotdash("."); break;
    case 'F': dotdash("..-."); break;
    case 'G': dotdash("--."); break;
    case 'H': dotdash("...."); break;
    case 'I': dotdash(".."); break;
    case 'J': dotdash(".---"); break;
    case 'K': dotdash("-.-"); break;
    case 'L': dotdash(".-.."); break;
    case 'M': dotdash("--"); break;
    case 'N': dotdash("-."); break;
    case 'O': dotdash("---"); break;
    case 'P': dotdash(".--."); break;
    case 'Q': dotdash("--.-"); break;
    case 'R': dotdash(".-."); break;
    case 'S': dotdash("..."); break;
    case 'T': dotdash("-"); break;
    case 'U': dotdash("..-"); break;
    case 'V': dotdash("...-"); break;
    case 'W': dotdash(".--"); break;
    case 'X': dotdash("-..-"); break;
    case 'Y': dotdash("-.--"); break;
    case 'Z': dotdash("--.."); break;
    case '0': dotdash("-----"); break;
    case '1': dotdash(".----"); break;
    case '2': dotdash("..---"); break;
    case '3': dotdash("...--"); break;
    case '4': dotdash("....-"); break;
    case '5': dotdash("....."); break;
    case '6': dotdash("-...."); break;
    case '7': dotdash("--..."); break;
    case '8': dotdash("---.."); break;
    case '9': dotdash("----."); break;
    case '+': wpm++; interval=60000/(wpm*50);  Serial.print("WPM: "); Serial.print(wpm,DEC); Serial.print("/"); Serial.println(interval, DEC); break;
    case '-': wpm--;  if(wpm<1) wpm=1;; interval=60000/(wpm*50);  Serial.print("WPM: "); Serial.print(wpm,DEC); Serial.print("/"); Serial.println(interval, DEC); break;
    case ' ': Serial.println("[end of word]"); delay(interval*7);break;
    default: break;   
  }
}


char toupper(char l)
{
  if(l >= 97 && l <= 122)
  {
    return l-32;
  }
  else return l;
}

void loop()
{
  while(Serial.available() > 0 && buffercount < 1024) {
    incomingByte = Serial.read();
    buffer[buffercount++]=toupper(incomingByte);
    buffer[buffercount]='\0';
  }
  
  if (buffercount > 0) {
    for(int i=0;i<1024;i++)
    {
      if(buffer[i]=='\0')
      {
        buffer[0]='\0'; // reset buffer
        buffercount=0;
        break; //end for loop
      }
      else
      {
        morse(buffer[i]);
      }
    }
  }

}

Saturday, November 7, 2009

Family Updates

This post is to create an area for Lisa to post updates!

Welcome!

Hi and welcome!

We have recently switched our website to blogger, so please let me know if anything is broken!

I'll post my technical musings here....

Thanks,

S.

Edgett Family Tree

The following is an extraction of my family tree showing 5 generations of decendents of Joel EDGETT (b 1740). I have also added place holders for my Grandfather (6th generation), my father (7th) and myself (8th). Information for the three of us is restricted for confidentiality.
Joel EDGETT and his two sons came to New York as British Empire Loyalists. They latter took land and settled Edgett's Landing in the coast of New Brunswick on the Bay of Fundy. Several years back I drove through New Brunswick and found the street sign depicting where the village of Edgett's landing used to be. I am still attempting to trace back further then Joel EDGETT. I have found references to a changes of name from ADGET or ADJET or ADSIT to EDGETT. I have also found the following possible lineage:

  • Parents of Joel Edgett: George ADSIT/ADGET/EDGETT, m. Ann AVERY (No Dates)
  • I am not sure about these:
  • Parents of George ADGET: John ADJET/EDGETT, m. to Mindwell WEBB (No Dates)
    or
  • Parents of George ADSIT/EDGET: John ADSIT, m. Sarah HOWARD (1686)
If anyone has found information linking Joel Edgett to any previous generations of EDGETT / ADGET / ADJET I would certainly love to hear from them.



Descendent of Joel EDGETT (Restricted to 5 Generations)
1 Joel EDGETT b. 1740 
 m. Ester MANN 
 2 Joel EDGETT Jr. b. 1761 d. 1841 
 m. 1783 Lois PECK b. 1762 
 3 John EDGETT b. 1789 
 m. 1815--3--2 Sarah GOUGH/GOFF b. 1794 d. 1876-11-14 
 4 John EDGETT Jr. b. 1816 d. 1879 
 m. Ruth STEEVES b. 1819 d. 1903 
 5 Gill EDGETT 
 4 Arthur EDGETT b. 1839 d. 1907-3-27 
 m. Rachel Elizabeth CLEVELAND b. 1841 d. 1922-1-13 
 5 Harry Arnedell EDGETT b. 1871 d. 1955-3-28 
 m. 1896 Jessie May DIXON d. 1911-7-15 
 m. 1914-11-4 Emily Amenda HEATHER b. Nov. 7th, 1888 d. 1944-8-13 
 6 xxxxx EDGETT (Restricted - Living)
 7 xxxxx EDGETT (Restricted - Living)
 8 Simon EDGETT (Living)
 m. 1997 Lisa M. DILLON EDGETT (Living)
 5 Maud Rebecca EDGETT b. 1869 
 m. 1899-8-15 Thomas George McBride 
 5 Sarah Louise EDGETT b. 1893 d. 1900 
 5 Frank Authur EDGETT b. 1875 d. 1939-8-24 
 5 Ethelwin EDGETT b. 1878 d. 1883 
 5 Cora Bernice EDGETT b. 1883 d. 1950-8-21 
 4 George EDGETT 
 4 Isaiah EDGETT b. 1823-08-22 d. 1864 
 4 Ward EDGETT b. 1824 d. 1888 
 m. Jane CARLISLE b. 1826 d. 1905 
 4 Caroline Augusta EDGETT b. 1826 
 m. Charles BAILEY 
 4 Sarah EDGETT 
 m. Malcolm CARLISLE b. 1820 d. 1897 
 4 Nancy EDGETT b. 1830 
 m. William DANIELS b. 1817 
 4 Mary E. EDGETT b. 1834 
 4 Ruth Adelaide EDGETT b. 1832 
 m. Douglas T. NICHOL b. 1831 d. 1911 
 4 infant EDGETT b. 1820 d. 1820 
 3 Joel EDGETT III b. 1786 
 m. Melinda PERKINS 
 4 Joel Edgett 
 4 William EDGETT b. 1815 
 m. Eliza THORPE b. 1817 
 4 Ann EDGETT 
 4 Lois EDGETT 
 4 David EDGETT b. 1822 d. 1895 
 4 Isaac EDGETT 
 4 James E. EDGETT b. 1827 d. 1895 
 m. Abigail MOORE b. 1832 d. 1901 
 5 David EDGETT b. 1856 
 5 Esther EDGETT b. 1859 
 5 Melinda EDGETT b. 1860 
 5 Sarah EDGETT b. 1862 
 5 John EDGETT b. 1867 
 5 James Browning EDGETT b. 1874-11-29 d. 1946-11-2 
 m. 1902 Bertha BISHOP b. 1873 
 m. 1909-11-10 Charlotte Lee Marie BISHOP b. 1876-1-23 d. 1975-11-28 
 3 Rebecca EDGETT 
 m. John WITHERSPOON 
 4 Cynthia WITHERSPOON 
 4 Alton WITHERSPOON 
 3 Abigail EDGETT 
 m. Mr. Dewitt 
 4 James DEWITT 
 3 William EDGETT b. 1793 
 m. Rosana Johah
 4 Abegail EDGETT 
 m. John BOYD 
 4 Hiram EDGETT b. 1819 d. 1906 
 m. Martha G. WILLIAMS b. 1823 d. 1909 
 4 William EDGETT 
 4 Isaac EDGETT 
 3 Hiram EDGETT b. 1796-08-08 d. 1876-08-27 
 m. 1821--3--1 Nancy Pearson b. 1800-11-28 d. 1844-09-3 
 4 Edward EDGETT b. 1823-12-10 
 m. Olive STEEVES b. 1827 d. 1892 
 4 Ruth EDGETT b. 1825--9--7 
 m. John R. LAWRENCE 
 4 Solomon EDGETT b. 1827-8-22 d. 1897 
 m. Eliza Jane KINNE b. 1833 d. 1902 
 4 William EDGETT b. 1829-4-29 d. 1892 
 m. Mary Jane MILTON 
 4 Harriet EDGETT b. 1830-12-11 d. 1868 
 m. Elijah KINNIE b. 1830 
 4 Hiram EDGETT b. 1833-5-22 d. 1898 
 m. Harriet PECK b. 1837 d. 1932 
 4 Adonirim Judson EDGETT b. 1835-4-22 d. 1860 
 4 Nancy EDGETT b. 1839--1--8 d. 1857 
 4 John Harvey EDGETT b. 1841--5--? d. 1841 
 4 Samuel Robinson EDGETT b. 1844--3--2 d. 1924 
 m. Elizabeth MCKINLEY b. 1846 d. 1874 
 m. Isabella KELLY b. 1847 d. 1912 
 4 infant EDGETT b. 1822 d. 1822 
 3 Ruth EDGETT b. 1799 
 m. Isaac GROSS b. 1798 d. 1878 
 4 Lavinia GROSS 
 4 Richard GROSS 
 4 Isaac GROSS Jr. b. 1825 
 4 Mary Jane GROSS b. 1827 d. 1906 
 m. Samuel J. CALKIN b. 1831 d. 1909 
 4 Ruth A. GROSS b. 1829 d. 1915 
 m. William BRAY b. 1828 d. 1890 
 4 Reuben GROSS b. 1831 
 4 Boaz GROSS b. 1833 
 4 William S. GROSS b. 1835 
 4 Joel GROSS b. 1839 
 4 Lois GROSS b. 1839 
 3 Handysyd EDGETT b. 1802-3-25 
 m. Ruth GROSS b. 1804 d. 1881 
 4 Handy EDGETT b. 1824 d. 1876 
 m. Priscilla b. 1829 
 4 William EDGETT b. 1826 d. 1840 
 4 infant EDGETT 
 4 Hiram EDGETT b. 1828 d. 1865 
 m. Helen MURPHY 
 4 Isaac EDGETT 
 4 George EDGETT b. 1833 d. 1904 
 m. Florette AMOS 
 4 Reuben EDGETT b. 1835 d. 1904 
 m. Eveline BRAY 
 4 Isaac EDGETT b. 1838 
 m. Elizabeth B. FISKE 
 4 Mary Elizabeth EDGETT b. 1840 d. 1904 
 m. Francis KORNEGAY 
 4 Ruth Susan EDGETT b. 1843 
 m. William Henry EDGETT b. 1846 d. 1894 
 4 William Henry EDGETT b. 1846 d. 1894 
 m. Margaret ROSS
 3 Lois EDGETT 
 3 Lavina EDGETT 
 2 John EDGETT b. 1762 d. 1835-11-03 
 m. Rhoda PECK b. 1769 
 3 John A. EDGETT b. 1802 
 3 Thomas EDGETT 
 3 Stephen EDGETT 
 3 Peter EDGETT 
 3 Rachel EDGETT 
 3 Nancy EDGETT 
 3 Hannah EDGETT 
 3 Rhoda EDGETT 
 3 Jerusha EDGETT 
 2 Isiah EDGETT

All information Copyright &copy 1999, Simon Edgett