tag:blogger.com,1999:blog-20389899.post2646593125155430337..comments2023-10-18T09:52:57.648-04:00Comments on The Inventive Tinkerer: MORSERPete Marchettohttp://www.blogger.com/profile/07272568978812952829noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-20389899.post-31767968865430706512009-04-14T17:26:00.000-04:002009-04-14T17:26:00.000-04:00I like this. But you could make it simpler to read...I like this. But you could make it simpler to read and understand if you made a generic send function.<br /><br />private void send(string str)<br />{<br /> for x = 0 to lenght(str)<br /> if (int)substirng(str(x,0)== 1<br /> Send dash<br /> else send dot <br /> next x<br />}<br /> Then at the top you have you serial input go to a case statment that calls the function as such..<br />case "A"<br /> send("101101")<br />The string uses 1 and 0's to correspond to the dots and dashes.Anonymousnoreply@blogger.com