<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Arduino for Makers &#8211; Robohub</title>
	<atom:link href="https://robohub.org/tag/arduino-for-makers/feed/" rel="self" type="application/rss+xml" />
	<link>https://robohub.org</link>
	<description>Connecting the robotics community to the world</description>
	<lastBuildDate>Sun, 04 Oct 2026 22:52:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>
	<item>
		<title>Arduino for Makers #2: Deconstructing Arduino programs</title>
		<link>https://robohub.org/arduino-for-makers-2-deconstructing-arduino-programs/</link>
		
		<dc:creator><![CDATA[Myke Predko]]></dc:creator>
		<pubDate>Thu, 09 Apr 2015 21:42:27 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Arduino for Makers]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://robohub.org/arduino-for-makers-2-deconstructing-arduino-programs/</guid>

					<description><![CDATA[In this new tutorial series, robotics educator and author Myke Predko introduces you to the basics of Arduino with simple projects that can be created in just a few minutes with inexpensive and easy-to-obtain parts. In this tutorial, Myke dives into how to program your Arduino so that you can plan an effective software architecture and [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><em><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-48158" src="http://robohub.org/wp-content/uploads/2015/04/Simple-Arduino-Pinout.jpg" alt="Simple-Arduino-Pinout" width="800" height="355" srcset="https://robohub.org/wp-content/uploads/2015/04/Simple-Arduino-Pinout.jpg 800w, https://robohub.org/wp-content/uploads/2015/04/Simple-Arduino-Pinout-425x188.jpg 425w, https://robohub.org/wp-content/uploads/2015/04/Simple-Arduino-Pinout-500x221.jpg 500w" sizes="(max-width: 800px) 100vw, 800px" />In this new tutorial series, robotics educator and author Myke Predko introduces you to the basics of Arduino with simple projects that can be created in just a few minutes with inexpensive and easy-to-obtain parts. In this tutorial, Myke dives into how to program your Arduino so that you can plan an effective software architecture and monitor your application. Look for new tutorials every 2-3 weeks, or see all the tutorials in this series <a href="http://robohub.org/tag/arduino-for-makers/" data-wpel-link="internal">here</a>. </em><br />
<span id="more-48154"></span></p>
<p><em> <img decoding="async" class="aligncenter size-full wp-image-48160" src="http://robohub.org/wp-content/uploads/2015/04/Picture-1-Initial-Arduino-Program-Development-Tool.png" alt="Picture 1 - Initial Arduino Program Development Tool" width="1280" height="720" srcset="https://robohub.org/wp-content/uploads/2015/04/Picture-1-Initial-Arduino-Program-Development-Tool.png 1280w, https://robohub.org/wp-content/uploads/2015/04/Picture-1-Initial-Arduino-Program-Development-Tool-425x239.png 425w, https://robohub.org/wp-content/uploads/2015/04/Picture-1-Initial-Arduino-Program-Development-Tool-1024x576.png 1024w, https://robohub.org/wp-content/uploads/2015/04/Picture-1-Initial-Arduino-Program-Development-Tool-500x281.png 500w" sizes="(max-width: 1280px) 100vw, 1280px" /></em></p>
<p>Welcome back. In this article, I want to discuss some of the particulars of programming an Arduino so that you better understand what is happening when your program is built. I’ll also discuss how to best architect your software. The Arduino software approach is somewhat unusual compared to other devices and, for beginners at least, takes away the need to do the high level design of the application. As a result, there are a few things to understand and keep in the back of your mind if you want your application to run without anything unexpected happening. In this article, I will provide you with a couple of simple applications to illustrate how Arduino software works, as well as a way to monitor the operation of the application.</p>
<p>In case you found the opening paragraph ominous and were wondering the Arduino is a potential minefield when it comes to software development, let me reassure you that it is as easy to program as any other device I’ve worked with and has been designed to allow for very sophisticated applications. It balances the needs of the beginner and expert application developer quite nicely.</p>
<p>When you’re creating with real time applications (applications that respond to different inputs), the common basic architecture is:</p>
<ul>
<li>System Initialization (“setup()”)
<ul>
<li>Define and initialize system and state variables</li>
<li>Setup hardware interfaces</li>
</ul>
</li>
<li>Repeat input/output processing code (“loop()”)
<ul>
<li>Get inputs</li>
<li>Process inputs with/update system and state variables</li>
<li>Drive outputs</li>
</ul>
</li>
</ul>
<p>The Arduino development software eliminates the need to come up with this program type, instead using the “setup()” and “loop()” methods, which provide this capability for you. As can be seen in Figure 1, when you first start the Arduino development tool or start a new “sketch” .ino (which I usually hear called an “ee-no”) file, the basic code with “setup()” and “loop()”are created – it is now up to you to put in the code for these two methods.</p>
<p>You may have heard that Arduino programming is really C++. However, when you compare example C++ programs to the Arduino .ino code, you will find that though there are some similarities, they really don’t look the same. This is because the .ino code is appended to the end of the C++ file containing the following “main()”:</p>
<pre>#include &lt;Arduino.h&gt;

void setup();
void loop();

int main(void)
{
 setup();

#if defined(USBCON)
USBDevice.attach();
#endif

setup();
for (;;) {
  loop();
  if (serialEventRun) serialEventRun();
 }
 return 0;
}

// user .ino file is appended here
</pre>
<p>In the “main()” code, you can see the calls to the “setup()” and “loop()” methods, along with a few other pieces that need to be explained.</p>
<p>The first is the “#include &lt;Arduino.h&gt;” statement, in which the basic operations provided by the Arduino system are defined. “#include” statements copy in the contents of the specified file before the file is compiled.</p>
<p>Next are the “USBCON” and “USBDevice” statements. These are required if an Arduino USB Host Shield is used in the application. An Arduino USB Host Shield is a shield that enables the Arduino application to be augmented with USB hubs, keyboards, mice, joysticks, thumb drives and other devices.</p>
<p>We will be discussing the “for” statement and looping in a later article, but I wanted to point out that the “for(;;)” statement is a way of creating an infinite loop. When execution reaches this statement, the statements inside the curly braces (“{“ &amp; “}”) that follow will be repeated as long as the Arduino is running.</p>
<p>I will discuss the “Serial Events” in a bit more detail below, but its purpose is to poll the Arduino’s serial communications hardware and perform any necessary operations. This is an important function for helping you to understand how your application is working.</p>
<p>Finally, the “return 0;” statement is put there as a matter of form – execution will never reach it because of the infinite loop above it. Many compilers will flag a warning or an error if a return statement is not at the end of your code, so putting it in will avoid this potential problem.</p>
<p>To demonstrate the operation of the “setup()” and “loop()” methods, I created the <a href="http://robohub.org/wp-content/uploads/2015/04/Console_Test.zip" data-wpel-link="internal">Console_Test</a> application, which you can copy and paste into the Arduino development system:</p>
<pre>// Console_Test - Message from "setup()" and "loop()"
//
// myke predko
void setup() {
 Serial.begin(9600);       // Initialize Serial Library
 Serial.println("Hello world!"); // Output with New Line
}

void loop() {
 Serial.println("Loop Line"); // Output with New Line
}</pre>
<p>This application performs the following actions:</p>
<ul>
<li>Enables “Serial Events”, and outputs a message indicating that it is up and running</li>
<li>Every time the “loop()” method is called, outputs a message</li>
</ul>
<p>To test out this application, start up the Arduino development system and copy the following statements into “setup()”:</p>
<pre>Serial.begin(9600);       // Initialize Serial Library
Serial.println("Hello world!"); // Output with New Line
</pre>
<p>and the following statement into “loop()”:</p>
<pre>Serial.println("Loop Line"); // Output with New Line
</pre>
<p>Next, save the sketch as “Console_Test” and then transfer it to your Arduino using the “Upload” button shown in Figure 1. To see the application running and outputting the messages, click on the “Open Serial Monitor” button at the top right corner of Figure 1. After a few seconds, the Arduino will reset and restart running the application. You will see a display like Figure 2 for a second or so … at least until the repeating “Loop Line” messages cause the “Hello World!” message to scroll off the screen.</p>
<p>The “Serial.begin” statement loads in and starts (“instantiates” in Object Orientated speak) the “Serial” object, which is used for serial communications between the Arduino’s processor and the host PC. Serial communications are set at 9,600 bits per second (bps), which is actually 960 bytes per second (as ten bits are required for sending each byte of data). The “Serial.println” statements send the included string of characters to the host PC.</p>
<p>Serial Events are a great way to show that your application is working and to provide instructions to the Arduino during operation, but there are a couple of things to be wary of.</p>
<p>If you look at the “main()” code above, you will see that Serial Events only execute after a “loop()” operation. In the Arduino, Serial Events are not interrupt-driven; the <em>receive</em> buffer is only checked after a “loop()” and while the <em>send</em> buffer is being transmitted. The hardware receive registers in the ATMega, the processor used in the Arduino, can really only store one byte at a time safely, so the “loop()” code must execute in less time than it takes to receive a single byte (which is 10.4 milliseconds). This is not a major issue but it does mean that you should make your “loop()” code execute as quickly as possible – this is especially true if you work at higher speeds. Normally, I like to have communications at a minimum of 115,200 bps, which means that if I were to run at this communications speed in an Arduino, my “loop()” code must always execute in less than 87 microseconds to avoid the possibility of losing characters.</p>
<p>When you’re starting out, running Arduino “Serial” communications at 9,600 bits per second will probably be fast enough for most applications. As long as you don’t have long delays in your “loop()” code, you should not have any issues.</p>
<p>The second potential issue to watch for is the size of the “Serial” <em>send</em> and <em>receive</em> buffers, which are only 64 bytes in size. These are in software, and are independent of the hardware registers. Sending a message longer than 64 bytes will result in parts of it being “truncated” (cut off) and allowing the <em>receive</em> buffer to grow beyond 64 bytes will result in incoming data being lost. This may seem like an unlikely occurrence, but it can happen if all the bytes in the send message(s) in “setup()” are longer than 64 bytes, as they aren’t sent until “loop()” is first executed. It is possible to increase the size of the “Serial” <em>send</em> and <em>receive</em> buffers, but with a bit of care in your programs, there will be no need to.</p>
<p>While it is not important at this point in time, everything that is loaded into the Arduino is built during the transfer operation. This includes “Libraries” and any other code that you want to bring in to your Sketches. The advantage of doing this is to avoid the need for separate build processes; it also allows the code to be modified easily. You may notice that the time the Arduino development tool takes to compile your application seems unreasonably long – that is because it is going out and getting all possible library and include file code, and compiling it along with your application before building an executable with only the necessary pieces.</p>
<p>I realize that there is a lot of information here. It can all be boiled down to the following statements for the beginning user:</p>
<ol>
<li>Application setup is put in “setup()”</li>
<li>Repeating code for the application is put in “loop()” and must execute as quickly as possible</li>
<li>“Serial” is used for providing information about the execution of a program</li>
</ol>
<p>… but, I wanted to provide background information for individuals who may have had some programming experience on different platforms and wanted to understand how the Arduino works “behind the curtains”. For completely new users, I’m hoping that the information here will help you when you start doing your own applications and things go a bit wonky.</p>
<img decoding="async" class="aligncenter size-full wp-image-48159" src="http://robohub.org/wp-content/uploads/2015/04/Picture-2-Looping-Arduino-Program.png" alt="Picture 2 - Looping Arduino Program" width="663" height="378" srcset="https://robohub.org/wp-content/uploads/2015/04/Picture-2-Looping-Arduino-Program.png 663w, https://robohub.org/wp-content/uploads/2015/04/Picture-2-Looping-Arduino-Program-425x242.png 425w, https://robohub.org/wp-content/uploads/2015/04/Picture-2-Looping-Arduino-Program-175x100.png 175w, https://robohub.org/wp-content/uploads/2015/04/Picture-2-Looping-Arduino-Program-500x285.png 500w" sizes="(max-width: 663px) 100vw, 663px" />
<p><strong>Example Programs:</strong></p>
<ul>
<li><a href="http://robohub.org/wp-content/uploads/2015/04/Console_Test.zip" data-wpel-link="internal">Console_Test</a></li>
</ul>
<p><strong>Next Article:</strong> Arduino Integer Data Types</p>
<p><strong>Websites for Further Reading:</strong></p>
<ul>
<li><a href="http://arduino.cc/en/Hacking/BuildProcess" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://arduino.cc/en/Hacking/BuildProcess</a> “Aduino Build Process” explaining the nuts and bolts of how things go together</li>
<li><a href="https://code.google.com/p/arduino/wiki/BuildProcess" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://code.google.com/p/arduino/wiki/BuildProcess</a> A practical explanation of how the build process works</li>
<li><a href="http://arduino.cc/en/Hacking/Bootloader?from=Tutorial.Bootloader" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://arduino.cc/en/Hacking/Bootloader?from=Tutorial.Bootloader</a> Arduino Bootloader description and information</li>
<li><a href="http://arduino.cc/en/reference/libraries" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://arduino.cc/en/reference/libraries</a> Arduino Libraries</li>
<li><a href="http://www.instructables.com/id/HOW-TO-use-the-ARDUINO-SERIAL-MONITOR/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://www.instructables.com/id/HOW-TO-use-the-ARDUINO-SERIAL-MONITOR/</a> How-To use the Arduino Serial Monitor</li>
<li><a href="http://arduino.cc/en/Main/ArduinoUSBHostShield" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://arduino.cc/en/Main/ArduinoUSBHostShield</a> Arduino USB Host Shield</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Arduino for Makers #1: Setting up a development station</title>
		<link>https://robohub.org/arduino-for-makers-1-setting-up-a-development-station/</link>
		
		<dc:creator><![CDATA[Myke Predko]]></dc:creator>
		<pubDate>Mon, 09 Mar 2015 19:43:44 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Arduino for Makers]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://robohub.org/arduino-for-makers-1-setting-up-a-development-station/</guid>

					<description><![CDATA[In this new tutorial series, robotics educator and author Myke Predko will introduce you to the basics of Arduino with simple projects that can be created in just a few minutes with inexpensive and easy-to-obtain parts. Along the way, you will learn how to get the most out of electronics, how to create software that [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><em>In this new <a href="http://robohub.org/tag/arduino-for-makers/" data-wpel-link="internal">tutorial series</a>, robotics educator and author Myke Predko will introduce you to the basics of Arduino with simple projects that can be created in just a few minutes with inexpensive and easy-to-obtain parts. Along the way, you will learn how to get the most out of electronics, how to create software that is easy to understand and debug, and you will develop the toolset you need to determine whether or not the Arduino is the right choice for your own project, and if so, how to implement it efficiently. The series is for anyone interested in Arduino, from high school students to professional engineers. As a follow up to his <a href="http://robohub.org/arduino-for-makers-0-introduction-to-the-series/" data-wpel-link="internal">introduction to the series</a>, in this tutorial Myke gives directions for setting up your own Arduino development station. Look for new lessons every 2-3 weeks.</em><br />
<span id="more-46942"></span></p>
<p><em> <img decoding="async" class="aligncenter size-full wp-image-46943" src="http://robohub.org/wp-content/uploads/2015/03/Figure-1-Basic-Development-Circuit.png" alt="Figure 1 - Basic Development Circuit" width="1280" height="720" srcset="https://robohub.org/wp-content/uploads/2015/03/Figure-1-Basic-Development-Circuit.png 1280w, https://robohub.org/wp-content/uploads/2015/03/Figure-1-Basic-Development-Circuit-425x239.png 425w, https://robohub.org/wp-content/uploads/2015/03/Figure-1-Basic-Development-Circuit-1024x576.png 1024w, https://robohub.org/wp-content/uploads/2015/03/Figure-1-Basic-Development-Circuit-500x281.png 500w" sizes="(max-width: 1280px) 100vw, 1280px" /></em></p>
<p>Most “getting started” Arduino tutorials start by getting to you build a flashing LED application. While the application I present here is similar, rather than just getting the Arduino’s built-in LED to flash as a “one off” application, we will be setting up the parts and tools for projects that we will implement in the future. While I provide you with the tools to create your first Arduino application, you’ll be preparing for creating your own Arduino-based robots down the line.</p>
<p>Before we get started, let’s talk about some basic electrical rules you will need to understand for this project. Chances are you already know them, but it never hurts to spend a minute and review:</p>
<ol>
<li>Current flows from positive voltage (marked with red) to negative voltage (marked with black, and often referred to as “ground” or “Gnd”).</li>
<li>Current flows through an LED in only one direction (which causes it to light) and the negative connection is normally marked with a flat on its package.</li>
</ol>
<p>As I go on with the article series, I will expand upon these electrical rules, but this is all you have to know for now. If you look at Figure 1 at the start of this article, you will see that positive voltage from the Arduino has a red connection, the negative (Gnd) has a black connection, and the LED has a flat side that indicates for the direction of current flow through the device.</p>
<p>The parts needed for this first iteration of your Arduino development station are:</p>
<ul>
<li><a href="http://www.amazon.com/gp/product/B006H06TVG/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B006H06TVG&amp;linkCode=as2&amp;tag=therobpod-20&amp;linkId=FIACLJYPVX45INUR" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Arduino Uno (R3 or R3 SMD)</a>. When you start out, I recommend that you use the “R3” version with the long rectangular chip in a socket rather than the small, flat square chip. The socketed chip can be replaced if it is ever damaged and it is about $5.00 cheaper.</li>
<li>Breadboard for quickly creating (and taking apart) your circuits.</li>
<li>5mm PTH red LED. This common LED consists of a red “bead” that lights when current passes through it. As noted above, current only flows through an LED in one direction with the negative connection marked with a flat on the side of the package.</li>
<li>100 Ohm, 1/4Watt resistor. This part reduces the current that will flow through the LED. While you can get a single 100 Ohm resistor, I recommend that you get a kit of resistors so that you have a stock of different values that can be applied in different circumstances.</li>
<li>22 gauge wire. This is for connections – it is worth purchasing a breadboard wiring kit with precut and stripped wires for the breadboard.</li>
</ul>
<p>There are many places where these parts can be bought. At the end of the article, I have provided pointers to <a href="https://www.sparkfun.com/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Sparkfun</a> and their part numbers for the components listed above. Sparkfun is an excellent supplier and one that I feel confident recommending – but I should point out that you may want to explore local electronics shops in your area. None of the components are hard to get and chances are you can buy the components locally for about the same price without having to wait for shipping.</p>
<img decoding="async" class="aligncenter size-full wp-image-46944" src="http://robohub.org/wp-content/uploads/2015/03/Figure-2-Breadboard-internals.png" alt="Figure 2 - Breadboard internals" width="1280" height="720" srcset="https://robohub.org/wp-content/uploads/2015/03/Figure-2-Breadboard-internals.png 1280w, https://robohub.org/wp-content/uploads/2015/03/Figure-2-Breadboard-internals-425x239.png 425w, https://robohub.org/wp-content/uploads/2015/03/Figure-2-Breadboard-internals-1024x576.png 1024w, https://robohub.org/wp-content/uploads/2015/03/Figure-2-Breadboard-internals-500x281.png 500w" sizes="(max-width: 1280px) 100vw, 1280px" />
<p>The “Breadboard” is a type of electronic circuit board in which wires and component leads can be pushed into (and pulled out of) to make simple circuits quickly. As can be seen in Figure 2, the middle holes are connected together vertically while the holes on the outside rows are connected horizontally. I place components in the central area and let the vertical connections connect components together while the horizontal connections are used for “power rails”. Note that I connect the ground power rails on both sides of the breadboard, but only provide power to one side; I will be discussing the reason for this in a future article.</p>
<p>The “5V” and “Gnd” connections from the Arduino to the Breadboard power rails are a convention that I will be using for future articles. This setup allows for fast wiring of application circuitry while allowing for high power devices to be supplied separately and not from the Arduino. Many Arduino applications use its power supply in ways that could lead to burning it out or worse. This wiring convention and reasons behind it will be discussed in future articles.</p>
<p>With the electronics parts together, there are a few tools that I recommend that you buy at this time:</p>
<ul>
<li>Plastic kit box to provide for quick clean up and transportation to other locations. This should have separate compartment for various parts and tools. I like the <a href="http://www.amazon.com/gp/product/B002RL9E16/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B002RL9E16&amp;linkCode=as2&amp;tag=therobpod-20&amp;linkId=PUNO4JWWZIGSFDMS" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Stanley Sortmaster</a> because the compartment separators can be set to allow storage of larger parts, and there is very little chance that the small parts in one compartment will find their way into another.</li>
<li>6’ A-B USB Cable.</li>
<li>Needle nose pliers.</li>
<li>Wire strippers. These can double as wire cutters.</li>
</ul>
<p>All these components can be purchased at a local dollar store. The USB Cable really doesn’t belong as a “tool”, but I wanted to make the point of looking for it at a dollar store – it will be considerably cheaper at a dollar store than at a specialty electronics store.</p>
<p>With the parts and tools available, you can now wire the circuit as shown in Figure 1. The circuit is quite simple: an LED with 100 Ohm resistor is connected to the “5V” output of the Arduino and the Arduino’s pin “3”. When pin “3” outputs a “LOW” voltage, current flows through the LED and it lights. When pin “3” outputs a “HIGH” voltage, current no longer flows through the LED and it no longer lights. This action can be tested by connecting the Arduino to your PC using the USB power (which provides power to the circuit) followed by disconnecting the wire from the Arduino’s pin 3 (the LED’s negative (flat) side) and connecting it to the 5V rail or one of the two Gnd rails on the breadboard.</p>
<p>As a side point, I highly recommend designing your circuits so they can be tested easily without requiring any Arduino software. I guarantee you that it will save hours of wondering why Arduino code doesn’t seem to be working when the real problem is that there is something wrong with the electrical circuit.</p>
<p>With the application built, you’re now ready to create the Arduino code to test everything out. At the end of the article, I have provided the download page for the Arduino software development environment (often called “Arduino Software”) (referred to here as the “Arduino Sketchpad”) and there are specific instructions for installing the software. It can be loaded into Windows PCs, Macs or Linux systems, and just takes a few minutes to install.</p>
<img decoding="async" class="aligncenter size-full wp-image-46945" src="http://robohub.org/wp-content/uploads/2015/03/Figure-3-Arduino-Sketchpad.png" alt="Figure 3 - Arduino Sketchpad" width="1280" height="720" srcset="https://robohub.org/wp-content/uploads/2015/03/Figure-3-Arduino-Sketchpad.png 1280w, https://robohub.org/wp-content/uploads/2015/03/Figure-3-Arduino-Sketchpad-425x239.png 425w, https://robohub.org/wp-content/uploads/2015/03/Figure-3-Arduino-Sketchpad-1024x576.png 1024w, https://robohub.org/wp-content/uploads/2015/03/Figure-3-Arduino-Sketchpad-500x281.png 500w" sizes="(max-width: 1280px) 100vw, 1280px" />
<p>The Arduino Sketchpad’s many options can be somewhat overwhelming to new users, and for that reason, I suggest that beginners focus on the five icons that are labeled in Figure 3; these are the only controls that will be required for quite a while.</p>
<p>When you have your Arduino Sketchpad up and running, cut and paste in the following program:</p>
<pre>// flash - Flash LED on Pin 3
//
// myke predko


void setup() {
 pinMode(3, OUTPUT); // Make Pin 3 an Output
}


void loop() {
 digitalWrite(3, HIGH); // Pin 3 is high voltage (LED off)
 delay(250); // Wait 1/4s
 digitalWrite(3, LOW); // Pin 3 is low voltage (LED ON)
 delay(250); // Wait 1/4s
}
</pre>
<p>Then, click the “Save Sketch” icon to save the Sketch (which is what the Arduino application is called), and then click on the “Transfer to Arduino” (aka “Upload”). After a few seconds, you will get the “Done uploading” message and the LED should start flashing (if it doesn’t then use the hint above for debugging the application – chances are you have the LED orientated the wrong way or the resistor connected to the wrong power rail).</p>
<p>Now, you have a working Arduino development station. I know it doesn’t seem like much right now, but in the coming weeks, we’ll look at using this as a base for learning more about Arduino and creating your own robots.</p>
<p><strong>Further Reading:</strong></p>
<ul>
<li><a href="http://arduino.cc/en/main/software" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://arduino.cc/en/main/software</a> Arduino Software Download Page</li>
<li><a href="http://forum.arduino.cc/index.php?board=2.0" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://forum.arduino.cc/index.php?board=2.0</a> Arduino “Installation &amp; Troubleshoot” Forum</li>
<li><a href="http://www.ladyada.net/learn/arduino/lesson1.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://www.ladyada.net/learn/arduino/lesson1.html</a> First project tutorial</li>
<li><a href="http://electronicsclub.info/leds.htm" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://electronicsclub.info/leds.htm</a> Introduction to Light Emitting Diodes (LEDs)</li>
<li><a href="http://www.electronics-tutorials.ws/resistor/res_9.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://www.electronics-tutorials.ws/resistor/res_9.html</a> Resistor Tutorial and Summary</li>
</ul>
<p><strong>Parts:</strong></p>
<ul>
<li><a href="https://www.sparkfun.com/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.sparkfun.com/</a> for parts:
<ul>
<li><a href="https://www.sparkfun.com/products/11021" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.sparkfun.com/products/11021</a> Arduino Uno &#8211; R3</li>
<li><a href="https://www.sparkfun.com/products/9590" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.sparkfun.com/products/9590</a> LED &#8211; Basic Red 5mm</li>
<li><a href="https://www.sparkfun.com/products/10969" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.sparkfun.com/products/10969</a> 1/4W Resistor Kit</li>
<li><a href="https://www.sparkfun.com/products/9567" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.sparkfun.com/products/9567</a> Breadboard &#8211; Translucent</li>
<li><a href="https://www.sparkfun.com/products/124" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.sparkfun.com/products/124</a> Jumper Wire Kit</li>
</ul>
</li>
</ul>
<p>&nbsp;</p>
<p><strong>Previous Article: </strong><a href="http://robohub.org/arduino-for-makers-0-introduction-to-the-series/" data-wpel-link="internal">Arduino for Makers #0: Introduction to the series</a><strong><br />
</strong><strong>Next Article:</strong> Arduino Programing deconstructed</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Arduino for Makers #0: Introduction to the series</title>
		<link>https://robohub.org/arduino-for-makers-0-introduction-to-the-series/</link>
		
		<dc:creator><![CDATA[Myke Predko]]></dc:creator>
		<pubDate>Wed, 25 Feb 2015 21:06:14 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[Arduino for Makers]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://robohub.org/arduino-for-makers-0-introduction-to-the-series/</guid>

					<description><![CDATA[In this new tutorial series, robotics educator and author Myke Predko will introduce you to the basics of Arduino with simple projects that can be created in just a few minutes with inexpensive and easy-to-obtain parts. Along the way, you will learn how to get the most out of electronics, how to create software that [&#8230;]]]></description>
										<content:encoded><![CDATA[<div id="attachment_46551" style="width: 854px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-46551" class="wp-image-46551 size-full" src="http://robohub.org/wp-content/uploads/2015/02/Arduino_pinouts.jpg" alt="Arduino_pinouts" width="844" height="546" srcset="https://robohub.org/wp-content/uploads/2015/02/Arduino_pinouts.jpg 844w, https://robohub.org/wp-content/uploads/2015/02/Arduino_pinouts-425x274.jpg 425w, https://robohub.org/wp-content/uploads/2015/02/Arduino_pinouts-463x300.jpg 463w" sizes="(max-width: 844px) 100vw, 844px" /><p id="caption-attachment-46551" class="wp-caption-text">Arduinio Pinouts</p></div>
<p><em>In this new tutorial series, robotics educator and author Myke Predko will introduce you to the basics of Arduino with simple projects that can be created in just a few minutes with inexpensive and easy-to-obtain parts. Along the way, you will learn how to get the most out of electronics, how to create software that is easy to understand and debug, and you will develop the toolset you need to determine whether or not the Arduino is the right choice for your own project, and if so, how to implement it efficiently. </em></p>
<p><em>The series is for anyone interested in Arduino, from high school students to professional engineers. In this introduction, Myke gives an overview of the benefits – and limitations – of using Arduino for your project. Look for new tutorials every 2-3 weeks. </em><span id="more-46549"></span></p>
<p>People who know me know that I have a love-hate relationship with Arduino.</p>
<p>The Arduino concept is brilliant: it’s a very low-cost open source and open hardware platform that is quick and easy to connect to. Arduino is very flexible: software applications use “C” syntax for commonality and are easy to enhance with “libraries” for specific interfaces and Input/Output (IO) devices. The development tools are available for just about every system out there and they do provide extension paths for the development tools. There are a number of different Arduino devices, each with different features that optimize them for different applications as well as a plethora of “shields” that allow users to hook up various devices quickly and (for the most part) easily.</p>
<p>These core features and philosophies have resulted in Arduino becoming the <em>de facto</em> standard for intelligent projects – there are so many well-documented Arduino projects out there that if you’re not comfortable with programming, chances are you will be able to find a project that uses the exact same (or at least very similar and easily changeable) devices as the ones you would like to use. Nobody could ever fault you for starting your project with an Arduino.</p>
<p>On the other side of the equation, there are some things I dislike about Arduino, however: its 8-bit processor, its schizophrenic design tools, its inability to do meaningful application debug, and the expectation on the part of many new developers that using Arduino means they are 80% of the way towards having a product ready for market.</p>
<p>To expand on these issues:</p>
<ol>
<li>In 2015, <strong>nothing</strong> should be controlled by an 8-bit processor. If you take a quick look at <a href="http://www.digikey.com/catalog/en" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Digi-Key</a>, you will find 32-bit Cortex M series processors from a variety of manufacturers that have more memory and peripherals while running a considerably faster speeds for the same cost (or less) than the ATmega used in the Arduino. I’m pointing out the Cortex processors (that, I should point out, are being used in the Arduino Duo board) because code can be passed between devices, giving a lot more freedom when choosing devices for a given application (which would extend the “open source”, “open hardware” concept even further).</li>
<li>The standard Arduino development tool was designed for both the new user as well as the experienced one, and I don’t think it is well suited for anybody. I believe that a new developer should have as simple a development tool as possible, with only the required controls in front of them. As an experienced programmer, I revel in using Eclipsed-based development tools where I have 500+ options at my disposal.</li>
<li>Going with my comment regarding the widespread availability of 32-bit processors, I also feel that the lack of a source code level debugger with stepping and breakpoints is a serious deficiency in the Arduino. These are features that I have been working with for more than thirty years, and I consider this to be a major oversight. In this tutorial series, I will share techniques that will help you understand and debug your Arduino applications.</li>
<li>Just about every Arduino presentation I have ever seen has stated that one of its advantages is that it can be used in commercial products. To test out this assertion, I googled “<a href="https://www.google.ca/webhp?sourceid=chrome-instant&amp;ion=1&amp;espv=2&amp;ie=UTF-8#q=Arduino+used+in+commercial+products" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Arduino used in commercial products</a>,” and much to my surprise, I discovered that almost all the top ranked websites focused on why Arduino <strong>isn’t </strong>used in commercial products. <br /><BR>There is one notable exception to Arduino’s not being used in commercial products “as is” – and that is 3D printers. There are many shields available that make the interfacing to the different components of a 3D printer (the extruder, filament feed and movement motors) very easy, and it is the mechanical components where the primary differentiators lie (most use the same types of electrical components and standard, open source software). Along with the large (and generally boxy) shape of 3D printers, it doesn’t make sense to use anything else to control them.</li>
</ol>
<p>There are currently 24 Arduino boards to choose from, each with a different processor running at a different speed, having varying memory and unique input/output (IO) pin configurations. The range is quite remarkable, with many boards providing the basic socket connections of the original Arduino “Uno” layout shown in the image at the start of this article. Other Arduino boards provide different built-in IO connections or physical layout (the LilyPad Arduino is designed to be stitched into clothing). In the list of reference websites below, I’ve included the Arduino page listing all the different types of “standard” Arduinos that are available.</p>
<div id="attachment_46552" style="width: 810px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-46552" class="wp-image-46552 size-full" src="http://robohub.org/wp-content/uploads/2015/02/Arduino_Shields.jpg" alt="Arduino_Shields" width="800" height="751" srcset="https://robohub.org/wp-content/uploads/2015/02/Arduino_Shields.jpg 800w, https://robohub.org/wp-content/uploads/2015/02/Arduino_Shields-425x398.jpg 425w, https://robohub.org/wp-content/uploads/2015/02/Arduino_Shields-319x300.jpg 319w" sizes="(max-width: 800px) 100vw, 800px" /><p id="caption-attachment-46552" class="wp-caption-text">Arduino shields</p></div>
<p>One aspect that makes Arduino very exciting for me is the many different “shields” that are available for it. An Arduino “shield” is simply a PCB that is designed to plug into the Arduino Uno sockets and access specific pins for specific purposes. The different shields enhance the IO capabilities of the Arduino, and make creating an application a lot easier and faster. Unfortunately there is a downside: the need to allocate the IO pins used in order to ensure that multiple shields don’t use the same IO pins for the same functions. I’ll discuss this issue more in future posts.</p>
<p>I’ve numbered this first tutorial #0 for a reason: I want to set the stage (and some boundaries) for this series and share my own personal philosophies that will guide the materials and projects we will cover together. The Arduino is a great product with a large mass of resources and people behind it, but I want to get you to think about the Arduino as a <em>part</em> of your introduction to programming, electronics and robotics, so that you can understand its limitations and, hopefully, some day look beyond it create your own “big idea”.</p>
<p>One thing that has always really annoyed me are projects that require specialized parts that are limited in availability (usually because the author has a bunch of them he wants to sell). All the projects here will use standard parts available from reputable distributors. While I know I’ll be doing some junkbox applications, I’ll make sure that the descriptions of the parts that I use will be sufficient that you will be able to go out and find your own sources for the components and assemblies that I reference.</p>
<p>In the end, however, my goal is to have fun and to get you to try things with Arduino that haven’t been done before. And since a big part of having fun is to be able to do things quickly, the projects that we will undertake together will take just a few minutes to wire and program.</p>
<p>I hope that you will share your suggestions for tutorials and projects in comments section below. Don’t be afraid of being too outlandish; while I probably won’t go do a tutorial on building a remote trigger pull on a 12-gauge shotgun as part of a home-grown burglar deterrent/elimination system, your crazy idea could spur me onto something interesting. Let’s get some of those ideas going and see where they lead.</p>
<p><strong>Next Article:</strong> Setting up your own Arduino development station.</p>
<p><strong>Resources &amp; Further Reading:</strong></p>
<ul>
<li><a href="https://www.youtube.com/watch?v=UoBUXOOdLXY" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.youtube.com/watch?v=UoBUXOOdLXY</a> Massimo Banzi: How Arduino is open-sourcing imagination</li>
<li><a href="http://arduino.cc/en/Products.Compare" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://arduino.cc/en/Products.Compare</a> Different Arduino Boards</li>
<li><a href="http://shieldlist.org/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://shieldlist.org/</a> Arduino Shield List</li>
<li><a href="http://www.instructables.com/id/Intro-to-Arduino/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://www.instructables.com/id/Intro-to-Arduino/</a></li>
<li><a href="https://learn.sparkfun.com/tutorials/what-is-an-arduino" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://learn.sparkfun.com/tutorials/what-is-an-arduino</a></li>
</ul>
<p><em>Myke welcomes feedback, and you can email him at <a href="mailto:myke.predko@mimetics.ca">myke.predko@mimetics.ca</a> or leave a comment below.</em></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 

Served from: robohub.org @ 2026-10-21 19:06:40 by W3 Total Cache
-->