{"id":13033,"date":"2021-05-29T17:17:08","date_gmt":"2021-05-29T10:17:08","guid":{"rendered":"https:\/\/www.makeriot2020.com\/?p=13033"},"modified":"2021-05-29T17:20:10","modified_gmt":"2021-05-29T10:20:10","slug":"your-first-sketch-embeetle-ide","status":"publish","type":"post","link":"https:\/\/www.makeriot2020.com\/index.php\/2021\/05\/29\/your-first-sketch-embeetle-ide\/","title":{"rendered":"Your First Sketch  &#8211; Embeetle IDE"},"content":{"rendered":"\n<p>So you have finally decided to give the<a rel=\"noreferrer noopener\" href=\"https:\/\/www.embeetle.com\" target=\"_blank\"> Embeetle IDE<\/a> a try, I mean, why not, you have nothing to loose right ? After starting the IDE, you get to this screen&#8230;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"453\" height=\"648\" data-src=\"http:\/\/144.126.248.244\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-29-33.png\" alt=\"\" class=\"wp-image-13034 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-29-33.png 453w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-29-33-210x300.png 210w\" data-sizes=\"(max-width: 453px) 85vw, 453px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 453px; --smush-placeholder-aspect-ratio: 453\/648;\" \/><figcaption>The Embeetle IDE Home Screen<\/figcaption><\/figure><\/div>\n\n\n\n<p>You are presented with many different options, but which one should you choose&#8230; Many of you will choose <strong>&#8220;Create Empty&#8221;<\/strong>, but be warned: <strong>This is not what you want<\/strong>. For those of us that come from standard IDE software, especially the Arduino IDE, we believe that the source files should only contain void setup() and void loop()&#8230; and then we can continue with our coding &#8230; <br><br>This is however very very wrong&#8230; Many IDE&#8217;s hide most of the code from you, in an effort to make it &#8220;easier to use&#8221;. Embeetle does not do that. So unless you are very confident in your C\/C++ skills, Do not choose this option.<br><br>Embeetle requires you to use real C++ when you write code, so while you can still do all the things you are used to do with &#8220;Arduino C&#8221; there will definitely be a few differences that you need to take account of. Professional developers will not have a problem however, as you are already used to declaring function prototypes etc&#8230;<br><br>So where do we start then?<br><br>Select the &#8220;Download Sample Project from Embeetle Server&#8221; option.<br><br>After a few seconds, you will be presented with this screen:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"650\" height=\"537\" data-src=\"http:\/\/144.126.248.244\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-39-56.png\" alt=\"\" class=\"wp-image-13035 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-39-56.png 650w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-39-56-600x496.png 600w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-39-56-300x248.png 300w\" data-sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 650px; --smush-placeholder-aspect-ratio: 650\/537;\" \/><\/figure><\/div>\n\n\n\n<p>Now, we have to mention another point about Embeetle. Embeetle does not only support Arduino Boards. Embeetle supports many other devices, and the list is growing.. so you will have to choose your device&#8230; So as an example, I will show you how to load the standard &#8220;blink&#8221; sketch on the Arduino Uno R3 ..<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"656\" height=\"540\" data-src=\"http:\/\/144.126.248.244\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-43-36.png\" alt=\"\" class=\"wp-image-13036 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-43-36.png 656w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-43-36-600x494.png 600w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-43-36-300x247.png 300w\" data-sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 656px; --smush-placeholder-aspect-ratio: 656\/540;\" \/><\/figure><\/div>\n\n\n\n<p>After selecting a Vendor and a Board, and some scrolling, I have selected the Arduino Uno R3 Blinky sketch.<br>Go ahead and click on the &#8220;Create&#8221; button. Embeetle will now generate your sketch, generate a makefile and all the other needed files that are normally hidden away from you, and then open the editor window&#8230; <br><br><strong><em>An important note here:<br><br>When you have installed Embeetle for the first time, you may not have all the required toolchains and other drivers installed on your computer. Usually, this can be a real pain to figure out. But, once again, Embeetle will take care of it&#8230; with a little bit of your help, of course&#8230; You may be presented with a small window, asking you to choose toolchain and or linker applications. Click on the drop-down menu, and select the option in GREEN. nothing else, and click apply&#8230; Embeetle will automatically download and install it, no further actions required from you!~ Easy, is it not ? <\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"641\" data-src=\"http:\/\/144.126.248.244\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-50-13-1024x641.png\" alt=\"\" class=\"wp-image-13037 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-50-13-1024x641.png 1024w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-50-13-600x376.png 600w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-50-13-300x188.png 300w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-50-13-768x481.png 768w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-16-50-13.png 1136w\" data-sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/641;\" \/><figcaption>The Embeetle Editor<\/figcaption><\/figure>\n\n\n\n<p>So now, the Editor has opened, and you are all confused, as it does not look anything like what you are used to, so what do we do now ? Lets look around the IDE quickly&#8230;<br><br>At the top left, we have a menu bar, and below that, a few tool buttons, not many, as we dont need all of those cluttered buttons anyway&#8230;<br>The most important here is :<br>The Broom : Cleans your project<br>The Hammer: Builds ( compiles ) your project<br>The Chip : Flashes the project onto the device<br>The Serial Port: Opens the Serial Monitor<\/p>\n\n\n\n<p>In the center column, we have the File tree, showing all the files your project are using, with green dots in front, meaning in use, and red meaning not used, <br><br>and directly below that, the Dashboard&#8230;<br><br>This is where you will select your tools, as well as the serial port your device is connected to&#8230;<\/p>\n\n\n\n<p>On the Far right, you have a symbol table, and some diagnostics ( but this is usually for the more advanced users, although everyone can benefit from using how to use these<\/p>\n\n\n\n<p><strong>Connecting your Device<\/strong><\/p>\n\n\n\n<p>Let us connect our device. <br>1.) Start by plugging you Arduino Uno R3 into the USB Cable, and connecting the cable to your computer.<br>2.)In the Dashboard window, Click on Probe -&gt; Com-Port -&gt; Select and choose your port ( on Ubuntu, it wil be \/dev\/ttyUSB0 or similar, on Windows it may be com3 or similar<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"288\" height=\"305\" data-src=\"http:\/\/144.126.248.244\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-17-03-07.png\" alt=\"\" class=\"wp-image-13038 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-17-03-07.png 288w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-17-03-07-283x300.png 283w\" data-sizes=\"(max-width: 288px) 85vw, 288px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 288px; --smush-placeholder-aspect-ratio: 288\/305;\" \/><figcaption>After selecting your device communications port<\/figcaption><\/figure><\/div>\n\n\n\n<p>3.) A red warning will now appear, &#8220;APPLY DASHBOARD CHANGES&#8221;. Click on this to confirm your changes.<br>4.) your device are now connected, and you can start coding&#8230;<\/p>\n\n\n\n<p>Let us have a quick look at the coding style, as is is quite different from what you would use in an the Arduino IDE<\/p>\n\n\n\n<p>The most important change is that you will need to declare function &#8220;prototypes&#8221; This is normal in standard C\/C++ but is not needed in the Arduino IDE&#8230;<\/p>\n\n\n\n<p>this means doing this:<br><br>void setup();<br>void loop();<\/p>\n\n\n\n<p>You will have to declare any other functions that you write on your own as well&#8230; including their datatypes, and any parameters that they require&#8230; Once again, this is usually not a problem for the casual home user, and the professional developers already know what this means&#8230;<br><br>The complete sketch is below<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/*\n  IMPORTANT NOTE FOR ARDUINO USERS\n  ================================\n\n  The language used in Arduino sketches is a subset of C\/C++.\n  However, in Embeetle you should use plain C\/C++, which means\n  that:\n\n    - Functions should have a function prototype, usually\n      declared at the top of the file.\n\n    - Include statements are important to use functions,\n      variables and classes from other files.\n\n*\/\n\n#include &lt;Arduino.h&gt;\n\n\/*\n  Blink\n\n  Turns an LED on for one second, then off for one second, repeatedly.\n\n  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO\n  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to\n  the correct LED pin independent of which board is used.\n  If you want to know what pin the on-board LED is connected to on your Arduino\n  model, check the Technical Specs of your board at:\n  https:\/\/www.arduino.cc\/en\/Main\/Products\n\n  modified 8 May 2014\n  by Scott Fitzgerald\n  modified 2 Sep 2016\n  by Arturo Guadalupi\n  modified 8 Sep 2016\n  by Colby Newman\n\n  This example code is in the public domain.\n\n  http:\/\/www.arduino.cc\/en\/Tutorial\/Blink\n*\/\n\n\/\/ the setup function runs once when you press reset or power the board\n\nvoid setup();\n\nvoid loop();\n\nvoid setup() {\n  \/\/ initialize digital pin LED_BUILTIN as an output.\n  pinMode(LED_BUILTIN, OUTPUT);\n}\n\n\/\/ the loop function runs over and over again forever\nvoid loop() {\n  digitalWrite(LED_BUILTIN, HIGH);   \/\/ turn the LED on (HIGH is the voltage level)\n  delay(1000);                       \/\/ wait for a second\n  digitalWrite(LED_BUILTIN, LOW);    \/\/ turn the LED off by making the voltage LOW\n  delay(1000);                       \/\/ wait for a second\n}\n\nNow, let us build and flash the code to the device\n\nClick on the hammer tool... \n\n<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"559\" height=\"596\" data-src=\"http:\/\/144.126.248.244\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-17-11-53.png\" alt=\"\" class=\"wp-image-13039 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-17-11-53.png 559w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-17-11-53-281x300.png 281w\" data-sizes=\"(max-width: 559px) 85vw, 559px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 559px; --smush-placeholder-aspect-ratio: 559\/596;\" \/><\/figure><\/div>\n\n\n\n<p>Embeetle will compile and build your code, and inform you at the bottom of the console if all went well. If it did, click on the Chip Tool to Flash it to your device<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"560\" height=\"568\" data-src=\"http:\/\/144.126.248.244\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-17-13-46.png\" alt=\"\" class=\"wp-image-13040 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-17-13-46.png 560w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-17-13-46-100x100.png 100w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2021\/05\/Screenshot-at-2021-05-29-17-13-46-296x300.png 296w\" data-sizes=\"(max-width: 560px) 85vw, 560px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 560px; --smush-placeholder-aspect-ratio: 560\/568;\" \/><\/figure><\/div>\n\n\n\n<p>Once again, Embeetle will inform you of the status of the Upload, and if you did everything correctly, the led on the UNO will start flashing&#8230;.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>In our next article, we will look at how to use the Library manager. This is definitely one of the most powerful features of Embeetle, only to be surpassed by the source analyser and the symbol generator.. but more on that later.<\/p>\n\n\n\n<p>Thank you<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So you have finally decided to give the Embeetle IDE a try, I mean, why not, you have nothing to loose right ? After starting the IDE, you get to this screen&#8230; You are presented with many different options, but which one should you choose&#8230; Many of you will choose &#8220;Create Empty&#8221;, but be warned: &hellip; <a href=\"https:\/\/www.makeriot2020.com\/index.php\/2021\/05\/29\/your-first-sketch-embeetle-ide\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Your First Sketch  &#8211; Embeetle IDE&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,106],"tags":[108,107],"class_list":["post-13033","post","type-post","status-publish","format-standard","hentry","category-arduino","category-embeetle-ide","tag-arduino-2","tag-embeetleide"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/posts\/13033","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/comments?post=13033"}],"version-history":[{"count":0,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/posts\/13033\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/media?parent=13033"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/categories?post=13033"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/tags?post=13033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}