{"id":53,"date":"2014-02-25T22:18:31","date_gmt":"2014-02-25T22:18:31","guid":{"rendered":"http:\/\/www.flat-planet.net\/?p=53"},"modified":"2014-02-27T15:22:39","modified_gmt":"2014-02-27T15:22:39","slug":"new-toy-arduino-uno","status":"publish","type":"post","link":"https:\/\/flat-planet.net\/?p=53","title":{"rendered":"New Toy &#8211; Arduino Uno"},"content":{"rendered":"<p>Hey,<\/p>\n<p>As I mentioned on another page I&#8217;d ordered an <a href=\"http:\/\/arduino.cc\/en\/Main\/arduinoBoardUno\">Arduino Uno<\/a> and <a href=\"http:\/\/arduino.cc\/en\/Main\/ArduinoEthernetShield#.Uw0UCoXlVFU\">Ethernet Shield<\/a> as an small side project, and they arrived today &#8211; great job <a href=\"http:\/\/ie.farnell.com\/\">Farnells<\/a> for next working day delivery!<\/p>\n<p><a href=\"http:\/\/www.flat-planet.net\/wp-content\/uploads\/2014\/02\/IMG_20140225_214550.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-54\" alt=\"Arduino Uno - Rev 3\" src=\"http:\/\/www.flat-planet.net\/wp-content\/uploads\/2014\/02\/IMG_20140225_214550.jpg\" width=\"2592\" height=\"1944\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.flat-planet.net\/wp-content\/uploads\/2014\/02\/IMG_20140225_214605.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-55\" alt=\"Arduino Ethernet Shield\" src=\"http:\/\/www.flat-planet.net\/wp-content\/uploads\/2014\/02\/IMG_20140225_214605.jpg\" width=\"2592\" height=\"1944\" \/><\/a><\/p>\n<p>Of course, I didn&#8217;t bother to read all the directions and soon found out that the connection is a USB Type B connector &#8211; last time I used one of those was about 6 years ago in a big external HDD \ud83d\ude42<\/p>\n<p>Quick trip to PC World solved that, and grabbed a 4GB microSD card to increase storage.<\/p>\n<p>Got the development environment installed without any issue, and the Uno grabbed COM11 &#8211; loaded in the blink template and bingo &#8211; working without a hitch.<\/p>\n<p>Started playing with that a bit to create a very simple morse code SOS program.<\/p>\n<pre><span style=\"color: #cc6600;\">void<\/span> <span style=\"color: #cc6600;\"><b>loop<\/b><\/span>() {\r\n\u00a0\u00a0x\u00a0=\u00a00;\r\n\u00a0\u00a0<span style=\"color: #cc6600;\">while<\/span> ( x &lt; 3 ) {\r\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #cc6600;\">digitalWrite<\/span>(led, <span style=\"color: #006699;\">HIGH<\/span>);   <span style=\"color: #7e7e7e;\">\/\/ turn the LED on (HIGH is the voltage level)<\/span>\r\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #cc6600;\">delay<\/span>(500);               <span style=\"color: #7e7e7e;\">\/\/ wait for a half second<\/span>\r\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #cc6600;\">digitalWrite<\/span>(led, <span style=\"color: #006699;\">LOW<\/span>);    <span style=\"color: #7e7e7e;\">\/\/ turn the LED off by making the voltage LOW<\/span>\r\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #cc6600;\">delay<\/span>(500);               <span style=\"color: #7e7e7e;\">\/\/ wait for a half second<\/span>\r\n\u00a0\u00a0\u00a0\u00a0x++;\r\n\u00a0\u00a0}\r\n\u00a0\u00a0x\u00a0=\u00a00;\r\n\u00a0\u00a0<span style=\"color: #cc6600;\">while<\/span> ( x &lt; 3 ) {\r\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #cc6600;\">digitalWrite<\/span>(led, <span style=\"color: #006699;\">HIGH<\/span>);   <span style=\"color: #7e7e7e;\">\/\/ turn the LED on (HIGH is the voltage level)<\/span>\r\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #cc6600;\">delay<\/span>(1000);               <span style=\"color: #7e7e7e;\">\/\/ wait for a second<\/span>\r\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #cc6600;\">digitalWrite<\/span>(led, <span style=\"color: #006699;\">LOW<\/span>);    <span style=\"color: #7e7e7e;\">\/\/ turn the LED off by making the voltage LOW<\/span>\r\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #cc6600;\">delay<\/span>(500);               <span style=\"color: #7e7e7e;\">\/\/ wait for a half second<\/span>\r\n\u00a0\u00a0\u00a0\u00a0x++;\r\n\u00a0\u00a0}\r\n\u00a0\u00a0x\u00a0=\u00a00;\r\n\u00a0\u00a0<span style=\"color: #cc6600;\">while<\/span> ( x &lt; 3 ) {\r\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #cc6600;\">digitalWrite<\/span>(led, <span style=\"color: #006699;\">HIGH<\/span>);   <span style=\"color: #7e7e7e;\">\/\/ turn the LED on (HIGH is the voltage level)<\/span>\r\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #cc6600;\">delay<\/span>(500);               <span style=\"color: #7e7e7e;\">\/\/ wait for a half second<\/span>\r\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #cc6600;\">digitalWrite<\/span>(led, <span style=\"color: #006699;\">LOW<\/span>);    <span style=\"color: #7e7e7e;\">\/\/ turn the LED off by making the voltage LOW<\/span>\r\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #cc6600;\">delay<\/span>(500);               <span style=\"color: #7e7e7e;\">\/\/ wait for a half second<\/span>\r\n\u00a0\u00a0\u00a0\u00a0x++;\r\n\u00a0\u00a0}\r\n\u00a0\u00a0<span style=\"color: #cc6600;\">delay<\/span>(2000); <span style=\"color: #7e7e7e;\">\/\/ wait 2 secs<\/span>\r\n}<\/pre>\n<p>Clearly I need to get back to coding &#8211; was just thinking that if you add in functions this is a good example of many programmatic structures in a very short, easy to follow example (also need to get this blog indenting code correctly) [Edit &#8211; fixed. Turns out the editor has a copy-as-html feature which is nice].<\/p>\n<p>Looking forward to getting the network shield up and running tomorrow, but just to tired to jump into it now.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey, As I mentioned on another page I&#8217;d ordered an Arduino Uno and Ethernet Shield as an small side project, and they arrived today &#8211; great job Farnells for next working day delivery! Of course, I didn&#8217;t bother to read all the directions and soon found out that the connection is a USB Type B [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,27],"tags":[30,31,29,33,32],"series":[],"class_list":["post-53","post","type-post","status-publish","format-standard","hentry","category-arduino","category-projects","tag-arduino-2","tag-new-toy","tag-programming","tag-projects-2","tag-simple-things"],"_links":{"self":[{"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/posts\/53","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/flat-planet.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=53"}],"version-history":[{"count":5,"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/posts\/53\/revisions"}],"predecessor-version":[{"id":70,"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/posts\/53\/revisions\/70"}],"wp:attachment":[{"href":"https:\/\/flat-planet.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=53"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/flat-planet.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=53"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/flat-planet.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=53"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/flat-planet.net\/index.php?rest_route=%2Fwp%2Fv2%2Fseries&post=53"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}