<?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>ESP8266 | Learn with Edwin Robotics</title>
	<atom:link href="https://learn.edwinrobotics.com/category/esp8266/feed/" rel="self" type="application/rss+xml" />
	<link>https://learn.edwinrobotics.com</link>
	<description>Tutorials on basics of electronics, etc.</description>
	<lastBuildDate>Thu, 28 Mar 2019 05:08:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>DRV8833 DC/Stepper motor driver hookup guide</title>
		<link>https://learn.edwinrobotics.com/drv8833-dcstepper-motor-driver-hookup-guide/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=drv8833-dcstepper-motor-driver-hookup-guide</link>
					<comments>https://learn.edwinrobotics.com/drv8833-dcstepper-motor-driver-hookup-guide/#respond</comments>
		
		<dc:creator><![CDATA[Abhishek Nair]]></dc:creator>
		<pubDate>Wed, 28 Jun 2017 06:44:55 +0000</pubDate>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Particle Photon]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<guid isPermaLink="false">http://learn.edwinrobotics.com/?p=1914</guid>

					<description><![CDATA[<img width="6000" height="4000" src="https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover.jpg" class="attachment- size- wp-post-image" alt="" style="float:left; margin:0 15px 15px 0;" decoding="async" fetchpriority="high" srcset="https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover.jpg 6000w, https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover-1080x720.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover-140x94.jpg 140w" sizes="(max-width: 6000px) 100vw, 6000px" />The Edwin Robotics DRV8833 breakout board is capable of controlling up to 2 DC motors or one bi/uni-polar stepper motor a max current of 1.2A. The DRV8833 comes with 2 full H-bridges which give bi-directional control of your DC motors. It is similar to the L9110S in its voltage range ( 2.7V &#8211; 10.8V), but [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="6000" height="4000" src="https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover.jpg" class="attachment- size- wp-post-image" alt="" style="float:left; margin:0 15px 15px 0;" decoding="async" loading="lazy" srcset="https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover.jpg 6000w, https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover-1080x720.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover-140x94.jpg 140w" sizes="auto, (max-width: 6000px) 100vw, 6000px" /><p>The Edwin Robotics DRV8833 breakout board is capable of controlling up to 2 DC motors or one bi/uni-polar stepper motor a max current of 1.2A. The DRV8833 comes with 2 full H-bridges which give bi-directional control of your DC motors. It is similar to the L9110S in its voltage range ( 2.7V &#8211; 10.8V), but carrying 50% more oomph. This makes it ideal for projects where the motors will be run from a 9V battery.</p>
<p>The board can be powered using the provided screw terminals or through micro-USB, checkout out <a href="https://shop.edwinrobotics.com/connectors/106-microusb-dc-jack-female.html" target="_blank" rel="noopener">micro-USB to DC Jack adapter</a> if you would like to use a standard power adapter with the board</p>
<h2> Hardware Required</h2>

<table id="tablepress-23" class="tablepress tablepress-id-23">
<tbody>
<tr class="row-1">
	<td class="column-1"><div id="attachment_1928" style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/drivers/924-drv8833-dcstepper-motor-driver-breakout-board.html"target="_blank"><img decoding="async" aria-describedby="caption-attachment-1928" src="http://learn.edwinrobotics.com/wp-content/uploads/Feature-1-150x150.jpg" alt="DC Motor Driver" width="150" height="150" class="size-thumbnail wp-image-1928" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Feature-1-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/Feature-1-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/Feature-1-184x184.jpg 184w, https://learn.edwinrobotics.com/wp-content/uploads/Feature-1.jpg 800w" sizes="(max-width: 150px) 100vw, 150px" /></a><p id="caption-attachment-1928" class="wp-caption-text">Edwin Robotics DRV8833 Motor Driver</p></div></td><td class="column-2"><div id="attachment_241" style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/boards/75-arduino-uno-r3.html"target="_blank"><img decoding="async" aria-describedby="caption-attachment-241" src="http://learn.edwinrobotics.com/wp-content/uploads/2016/05/UNO-150x150.jpg" alt="Arduino UNO Microcontroller board" width="150" height="150" class="size-thumbnail wp-image-241" srcset="https://learn.edwinrobotics.com/wp-content/uploads/2016/05/UNO-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/2016/05/UNO-184x184.jpg 184w" sizes="(max-width: 150px) 100vw, 150px" /></a><p id="caption-attachment-241" class="wp-caption-text">Arduino UNO</p></div></td><td class="column-3"><div id="attachment_1571" style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/prototyping/19-male-female-jumper-wires-pack-of-10.html"target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1571" src="http://learn.edwinrobotics.com/wp-content/uploads/179-2-150x150.jpg" alt="Arduino Jumper wires" width="150" height="150" class="size-thumbnail wp-image-1571" srcset="https://learn.edwinrobotics.com/wp-content/uploads/179-2-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/179-2-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/179-2-184x184.jpg 184w, https://learn.edwinrobotics.com/wp-content/uploads/179-2.jpg 600w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a><p id="caption-attachment-1571" class="wp-caption-text">Male-Female Jumper wires</p></div></td>
</tr>
<tr class="row-2">
	<td class="column-1"><div id="attachment_1999" style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/robotics/31-300-rpm-dc-geared-motor.html"target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1999" src="http://learn.edwinrobotics.com/wp-content/uploads/300-RPM-w-yellow-Wheel-150x150.jpg" alt="" width="150" height="150" class="size-thumbnail wp-image-1999" srcset="https://learn.edwinrobotics.com/wp-content/uploads/300-RPM-w-yellow-Wheel-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/300-RPM-w-yellow-Wheel-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/300-RPM-w-yellow-Wheel-1024x1024.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/300-RPM-w-yellow-Wheel-1080x1080.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/300-RPM-w-yellow-Wheel-184x184.jpg 184w, https://learn.edwinrobotics.com/wp-content/uploads/300-RPM-w-yellow-Wheel.jpg 1500w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a><p id="caption-attachment-1999" class="wp-caption-text">DC Geared Motor with Wheel</p></div></td><td class="column-2"><div id="attachment_2000" style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/connectors/56-9v-dc-battery-snapper.html"target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2000" src="http://learn.edwinrobotics.com/wp-content/uploads/9v-battery-snapper-1-150x150.jpg" alt="9v battery snap in cable" width="150" height="150" class="size-thumbnail wp-image-2000" srcset="https://learn.edwinrobotics.com/wp-content/uploads/9v-battery-snapper-1-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/9v-battery-snapper-1-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/9v-battery-snapper-1-184x184.jpg 184w, https://learn.edwinrobotics.com/wp-content/uploads/9v-battery-snapper-1.jpg 800w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a><p id="caption-attachment-2000" class="wp-caption-text">9V DC Battery Snapper</p></div></td><td class="column-3"><div id="attachment_2002" style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/connectors/106-microusb-dc-jack-female.html"target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2002" src="http://learn.edwinrobotics.com/wp-content/uploads/microUSB-to-DC-Jack-Female-Front-150x150.jpg" alt="" width="150" height="150" class="size-thumbnail wp-image-2002" srcset="https://learn.edwinrobotics.com/wp-content/uploads/microUSB-to-DC-Jack-Female-Front-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/microUSB-to-DC-Jack-Female-Front-184x184.jpg 184w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a><p id="caption-attachment-2002" class="wp-caption-text">microUSB to DC Jack Female Connector</p></div></td>
</tr>
</tbody>
</table>
<!-- #tablepress-23 from cache -->
<h2>Features</h2>
<ul>
<li>Dual-H-bridge motor driver: can drive two DC motors or one uni/bi-polar stepper motor</li>
<li>Operating voltage: 2.7‌‌ V to 10.8 V</li>
<li>Output current: 1.2 A continuous (2 A peak) per motor</li>
<li>Motor outputs can be paralleled to deliver 2.4 A continuous (4 A peak) to a single motor</li>
<li>Inputs are 3V- and 5V-compatible</li>
<li>Under-voltage lockout and protection against over-current and over-temperature</li>
<li>Reverse-voltage protection circuit</li>
<li>Current limiting can be enabled by adding sense resistors (not included)</li>
</ul>
<h2>Pinouts:</h2>
<div class="row-fluid build-text">
<div id="attachment_1993" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/Pin-DEscription-new.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1993" class="wp-image-1993" src="http://learn.edwinrobotics.com/wp-content/uploads/Pin-DEscription-new.png" alt="DRV8833 motor driver pin description" width="500" height="500" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Pin-DEscription-new.png 2750w, https://learn.edwinrobotics.com/wp-content/uploads/Pin-DEscription-new-150x150.png 150w, https://learn.edwinrobotics.com/wp-content/uploads/Pin-DEscription-new-300x300.png 300w, https://learn.edwinrobotics.com/wp-content/uploads/Pin-DEscription-new-1024x1024.png 1024w, https://learn.edwinrobotics.com/wp-content/uploads/Pin-DEscription-new-1080x1080.png 1080w, https://learn.edwinrobotics.com/wp-content/uploads/Pin-DEscription-new-184x184.png 184w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1993" class="wp-caption-text"><em>DRV8833 Motor driver pin description</em></p></div>
<p>&nbsp;</p>
<h3>Power</h3>
<ul>
<li><strong>Vm</strong> &#8211; This is the voltage supply for the motors. Keep this voltage between 2.7V and 10.8V. This Supply Pin is not Reverse polarity protected, so care must be taken while connecting jumper wires to it.</li>
<li><strong>Power Screw Terminal: </strong>The Power Screw terminal is labelled with + and -, connect your power supply according to label, this terminal is reverse polarity protected.</li>
<li><strong>USB Power In</strong>: You can power the board with micro USB connector provided; this is reverse polarity protected as well.</li>
<li><strong>GND</strong> &#8211; This is the shared logic and motor ground. All grounds are connected</li>
</ul>
</div>
<div class="row-fluid build-text">
<h3><span id="signal-in-pins" class="anchor-link-target"></span>Signals</h3>
<p>These are all &#8216;2.7V or higher logic level&#8217; inputs</p>
<ul>
<li><strong>AIN1, AIN2</strong> &#8211; Two inputs to the Motor A H-bridges. Speed control supported using PWM.</li>
<li><strong>BIN1, BIN2</strong> &#8211; Two inputs to the Motor B H-bridges. Speed control supported using PWM.</li>
<li><strong>FLT</strong> -This is the <strong>Fault</strong> output, which will drive low if there&#8217;s a thermal shutdown or overcurrent.</li>
<li><strong>SLP</strong> &#8211; sleep pin for quickly disabling the driver. On Board 10K pullup resistor provided to keep the driver enabled.</li>
</ul>
<p>The control inputs are pulled low internally, effectively disabling the motor driver outputs by default. See the truth tables in the DRV8833 datasheet for more information on how the inputs affect the driver outputs.</p>
<p><strong>The FAULT pin is an open-drain output that is driven low by the chip whenever an over-current, over-temperature-or under-voltage condition occurs. Otherwise, it remains in a floating state, so you will need to connect an external pull-up resistor (or use a micro-controller input with its built-in pull-up enabled) if you want to monitor fault conditions on the driver.</strong></p>
<p><strong><span style="color: #ff0000;">Note: There is a misprint on Silkscreen, BIN1 is printed in place of AIN1, refer the above image for correct pinouts description.</span></strong></p>
<p><strong>Note: we had Provided on board power LED, which will stay on whenever board is powered. You can disable the power LED with the jumper provided on the back, refer the image below for power LED (P-LED) Jumper</strong></p>
</div>
<div class="row-fluid build-text">
<h3>Current Limiting Pins</h3>
<p><strong>As/ Bs:</strong> The DRV8833 can perform current limiting for each motor H-bridge by connecting a resistor between As/Bs and ground to set the Motor A/ Motor B Limit.</p>
<p><strong>By default , the current limiting feature is disabled and can be enabled by modifying the jumper, refer the image below:</strong></p>
<div id="attachment_1930" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/Jumper-Description.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1930" class="wp-image-1930" src="http://learn.edwinrobotics.com/wp-content/uploads/Jumper-Description.png" alt="DRV8833 Current limiting feature" width="500" height="200" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Jumper-Description.png 1856w, https://learn.edwinrobotics.com/wp-content/uploads/Jumper-Description-300x120.png 300w, https://learn.edwinrobotics.com/wp-content/uploads/Jumper-Description-1024x410.png 1024w, https://learn.edwinrobotics.com/wp-content/uploads/Jumper-Description-1080x433.png 1080w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1930" class="wp-caption-text"><em>Current Limiting and Status LED&#8217;s Jumper Pads.</em></p></div>
<p>The Current limiting can be enabled by cutting out the solder joint between the jumper Pads for Asen and Bsen. Once the jumper pads are modified you can either solder SMD resistor (1206 Size) on board or you can use the AS/BS headers pin to make connection with through hole resistors. You can also totally disable current limiting whenever needed by soldering the two jumpers on the back.</p>
<p><strong>The current limiting rule is: LimitCurrent (amps) = 0.2 V / RSENSE</strong></p>
<div id="attachment_1994" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/Current-sense-resistors_mod.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1994" class="wp-image-1994" src="http://learn.edwinrobotics.com/wp-content/uploads/Current-sense-resistors_mod.png" alt="Current limiting resistors" width="500" height="500" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Current-sense-resistors_mod.png 550w, https://learn.edwinrobotics.com/wp-content/uploads/Current-sense-resistors_mod-150x150.png 150w, https://learn.edwinrobotics.com/wp-content/uploads/Current-sense-resistors_mod-300x300.png 300w, https://learn.edwinrobotics.com/wp-content/uploads/Current-sense-resistors_mod-184x184.png 184w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1994" class="wp-caption-text"><em>Add 1206 resistors here to modify the current supplied to the respective motors</em></p></div>
<p>&nbsp;</p>
<h2>Connection&#8217;s</h2>
<p>You can use any stepper motor or dc motor rated upto 10.8v with this board. We have used the following kit to get it tested:</p>
<div id="attachment_1929" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/FUnky-DRIVER-SET.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1929" class="wp-image-1929" src="http://learn.edwinrobotics.com/wp-content/uploads/FUnky-DRIVER-SET.png" alt="DRV8833 Motor driver kit" width="500" height="500" srcset="https://learn.edwinrobotics.com/wp-content/uploads/FUnky-DRIVER-SET.png 4300w, https://learn.edwinrobotics.com/wp-content/uploads/FUnky-DRIVER-SET-150x150.png 150w, https://learn.edwinrobotics.com/wp-content/uploads/FUnky-DRIVER-SET-300x300.png 300w, https://learn.edwinrobotics.com/wp-content/uploads/FUnky-DRIVER-SET-1024x1024.png 1024w, https://learn.edwinrobotics.com/wp-content/uploads/FUnky-DRIVER-SET-1080x1080.png 1080w, https://learn.edwinrobotics.com/wp-content/uploads/FUnky-DRIVER-SET-184x184.png 184w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1929" class="wp-caption-text"><em>Robotics Kit</em></p></div>
<p>&nbsp;</p>
<div class="page-title-wrapper"> Refer the image below for the motor connections</div>
</div>
<div></div>
<div></div>
<div class="row-fluid build-text">
<div></div>
<div>
<div id="attachment_1927" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1927" class="wp-image-1927" src="http://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover.jpg" alt="DRV8833 gear motor robotics kit" width="500" height="333" srcset="https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover.jpg 6000w, https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover-1080x720.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/DRV8833_Cover-140x94.jpg 140w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1927" class="wp-caption-text"><em>Motor Connections</em></p></div>
</div>
</div>
<div class="page-content"></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div>You can power the board using phone charger (1.25~ 2.5Ampere rated) using micro usb or use the 9v battery snapper with micro usb connector as shown below:</div>
<div></div>
<div>
<div id="attachment_2013" style="width: 510px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2013" class="wp-image-2013" src="http://learn.edwinrobotics.com/wp-content/uploads/Power-Supply-1.jpg" alt="Motor Driver Power Supply" width="500" height="500" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Power-Supply-1.jpg 2800w, https://learn.edwinrobotics.com/wp-content/uploads/Power-Supply-1-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/Power-Supply-1-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/Power-Supply-1-1024x1024.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/Power-Supply-1-1080x1080.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/Power-Supply-1-184x184.jpg 184w" sizes="auto, (max-width: 500px) 100vw, 500px" /><p id="caption-attachment-2013" class="wp-caption-text"><em>Power Supply Connections</em></p></div>
</div>
<div></div>
<div>Now connect the following pins to your Arduino board:</div>
<div></div>
<div>

<table id="tablepress-21" class="tablepress tablepress-id-21">
<thead>
<tr class="row-1">
	<th class="column-1">DRV8833 Motor Driver Breakout Pins</th><th class="column-2">Arduino Pins</th>
</tr>
</thead>
<tbody class="row-hover">
<tr class="row-2">
	<td class="column-1">AIN1</td><td class="column-2">2</td>
</tr>
<tr class="row-3">
	<td class="column-1">AIN2</td><td class="column-2">3</td>
</tr>
<tr class="row-4">
	<td class="column-1">BIN1</td><td class="column-2">4</td>
</tr>
<tr class="row-5">
	<td class="column-1">BIN2</td><td class="column-2">5</td>
</tr>
</tbody>
</table>
<!-- #tablepress-21 from cache -->
</div>
<div></div>
<div>
<div id="attachment_2008" style="width: 510px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2008" class="wp-image-2008" src="http://learn.edwinrobotics.com/wp-content/uploads/Arduino-Connections.jpg" alt="Stepper Motor driver connections" width="500" height="550" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Arduino-Connections.jpg 816w, https://learn.edwinrobotics.com/wp-content/uploads/Arduino-Connections-273x300.jpg 273w" sizes="auto, (max-width: 500px) 100vw, 500px" /><p id="caption-attachment-2008" class="wp-caption-text"><em>Arduino DRV8833 Connections</em></p></div>
</div>
<div></div>
<h2>Test Codes</h2>
<div></div>
<div></div>
<div> Once the connections are done, upload the following code:</div>
<div></div>
<div></div>
<div></div>
<div>
<pre class="EnlighterJSRAW" data-enlighter-language="cpp" data-enlighter-theme="atomic">#define Ain1 5
#define Ain2 6
#define Bin1 9
#define Bin2 10

int speed = 0;

void setup() {
pinMode(Ain1, OUTPUT);  //Ain1
pinMode(Ain2, OUTPUT);  //Ain2
pinMode(Bin1, OUTPUT);  //Bin1
pinMode(Bin2, OUTPUT);  //Bin2

}

void loop() {

    digitalWrite(Ain1,HIGH);
    digitalWrite(Ain2,LOW);
    digitalWrite(Bin1,HIGH);
    digitalWrite(Bin2,LOW);
    delay(700);
    digitalWrite(Ain1,LOW);
    digitalWrite(Ain2,LOW);
    digitalWrite(Bin1,LOW);
    digitalWrite(Bin2,LOW);

    digitalWrite(Ain1,LOW);
    digitalWrite(Ain2,HIGH);
    digitalWrite(Bin1,LOW);
    digitalWrite(Bin2,HIGH);
    delay(700);
    digitalWrite(Ain1,LOW);
    digitalWrite(Ain2,LOW);
    digitalWrite(Bin1,LOW);
    digitalWrite(Bin2,LOW);
  
}</pre>
<p>&nbsp;</p>
</div>
<div></div>
<div></div>
<div></div>
<h2><a href="http://www.ti.com/lit/ds/symlink/drv8833.pdf" target="_blank" rel="noopener">Download DRV8833 Datasheet</a></h2>
<p>&nbsp;</p>
<p>References:</p>
<p><a href="https://learn.adafruit.com/adafruit-drv8833-dc-stepper-motor-driver-breakout-board/stepper-motor-usage" target="_blank" rel="noopener">Adafruit Hookup Guide</a></p>
<p><a href="https://www.pololu.com/product/2130/blog" target="_blank" rel="noopener">Polulu Blog</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://learn.edwinrobotics.com/drv8833-dcstepper-motor-driver-hookup-guide/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Getting Started with ESP-WROOM-02</title>
		<link>https://learn.edwinrobotics.com/getting-started-with-esp-wroom-02/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=getting-started-with-esp-wroom-02</link>
					<comments>https://learn.edwinrobotics.com/getting-started-with-esp-wroom-02/#comments</comments>
		
		<dc:creator><![CDATA[Abhishek Nair]]></dc:creator>
		<pubDate>Sun, 26 Mar 2017 10:13:59 +0000</pubDate>
				<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[IOT]]></category>
		<category><![CDATA[Wireless]]></category>
		<category><![CDATA[esp]]></category>
		<category><![CDATA[esp-wroom]]></category>
		<category><![CDATA[esp8266]]></category>
		<category><![CDATA[Getting started]]></category>
		<category><![CDATA[IoT]]></category>
		<category><![CDATA[wroom]]></category>
		<category><![CDATA[wroom-02]]></category>
		<guid isPermaLink="false">http://learn.edwinrobotics.com/?p=1673</guid>

					<description><![CDATA[<img width="6000" height="4000" src="https://learn.edwinrobotics.com/wp-content/uploads/DSC_0018.jpg" class="attachment- size- wp-post-image" alt="" style="float:left; margin:0 15px 15px 0;" decoding="async" loading="lazy" srcset="https://learn.edwinrobotics.com/wp-content/uploads/DSC_0018.jpg 6000w, https://learn.edwinrobotics.com/wp-content/uploads/DSC_0018-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/DSC_0018-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/DSC_0018-1080x720.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/DSC_0018-140x94.jpg 140w" sizes="auto, (max-width: 6000px) 100vw, 6000px" />Welcome to our Getting started guide on ESP-WROOM-02 board. We had already introduced this board in our previous guide Introduction to ESP8266, there we had mentioned about the ESP-WROOM-02 adapter board as well. Here in this blog, we are using ESP-WROOM-02 with Adapter board, since using the adapter board will give us the flexibility to [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="6000" height="4000" src="https://learn.edwinrobotics.com/wp-content/uploads/DSC_0018.jpg" class="attachment- size- wp-post-image" alt="" style="float:left; margin:0 15px 15px 0;" decoding="async" loading="lazy" srcset="https://learn.edwinrobotics.com/wp-content/uploads/DSC_0018.jpg 6000w, https://learn.edwinrobotics.com/wp-content/uploads/DSC_0018-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/DSC_0018-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/DSC_0018-1080x720.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/DSC_0018-140x94.jpg 140w" sizes="auto, (max-width: 6000px) 100vw, 6000px" /><p>Welcome to our Getting started guide on ESP-WROOM-02 board. We had already introduced this board in our previous guide <strong><a href="http://learn.edwinrobotics.com/introduction-to-esp8266/" target="_blank">Introduction to ESP8266</a></strong>, there we had mentioned about the ESP-WROOM-02 adapter board as well. Here in this blog, we are using ESP-WROOM-02 with Adapter board, since using the adapter board will give us the flexibility to build and test circuit on a breadboard. Let us have a look at the list of items we needed for getting started with ESP-WROOM-02.</p>
<p>&nbsp;</p>
<h3 id="step1">Hardware Needed:</h3>

<table id="tablepress-17" class="tablepress tablepress-id-17">
<tbody>
<tr class="row-1">
	<td class="column-1"><div style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/esp8266/649-wifi-module-esp-wroom-02-with-adapter.html"target="_blank"><img loading="lazy" decoding="async" src="http://learn.edwinrobotics.com/wp-content/uploads/DSC_0023.jpg" alt="ESP8266 Wroom" width="150" height="50" class="alignnone size-full wp-image-1655" /></a><p class="wp-caption-text"></p><b><em> ESP-WROOM-02 Board</em></b></p></div></td><td class="column-2"><div id="attachment_1609" style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/prototyping/40-breadboard.html"target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1609" src="http://learn.edwinrobotics.com/wp-content/uploads/breadboard.jpg" alt="Breadboard" width="150" height="50" class="size-full wp-image-1609" /></a><p id="caption-attachment-1609" class="wp-caption-text"></p><b><em> Breadboard</em></b></p></div></td><td class="column-3"><div style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/voltage-regulator/108-3v-voltage-regulator.html"target="_blank"><img loading="lazy" decoding="async" src="http://learn.edwinrobotics.com/wp-content/uploads/165-2.jpg" alt="LD33v 3.3v voltage regulator" width="150" height="50" class="alignnone size-full wp-image-1681" /></a><p class="wp-caption-text"></p><b><em>3.3V Voltage Regulator</em></b></p></div></td><td class="column-4"><div style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/fixed-value/8-1k-resistor-pack-of-10.html"target="_blank"><img loading="lazy" decoding="async" src="http://learn.edwinrobotics.com/wp-content/uploads/1k_0.25W.jpg" alt="1k resistor" width="150" height="50" class="alignnone size-full wp-image-1371" /></a><p class="wp-caption-text"></p><b><em>1K Resistors</em></b></p></div></td>
</tr>
<tr class="row-2">
	<td class="column-1"><div style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/electrolytic/430-100uf63v-electrolytic-capacitor.html"target="_blank"><img loading="lazy" decoding="async" src="http://learn.edwinrobotics.com/wp-content/uploads/DSC_0385.jpg" alt="100uf capacitor" width="150" height="50" class="alignnone size-full wp-image-1683" /></a><p class="wp-caption-text"></p><b><em>100uf Electrolytic Capacitor</em></b></p></div></td><td class="column-2"><div style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/switches/427-momentory-push-button-switch-7mm-pack-of-5.html"target="_blank"><img loading="lazy" decoding="async" src="http://learn.edwinrobotics.com/wp-content/uploads/81DTyucRlLL._SX355_.jpg" alt="tactile switch" width="150" height="50" class="alignnone size-full wp-image-1678" /></a><p class="wp-caption-text"></p><b><em>7mm Tactile Switch</em></b></p></div></td><td class="column-3"><div style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/power-supply/163-5v-3a-micro-usb-acdc-power-adapter-uk-plug-charger-supply.html"target="_blank"><img loading="lazy" decoding="async" src="http://learn.edwinrobotics.com/wp-content/uploads/DSC_0033.jpg" alt="" width="150" height="50" class="alignnone size-full wp-image-1046" /></a><p class="wp-caption-text"></p><b><em>5V Power Adapter</em></b></p></div></td><td class="column-4"><div style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/fixed-value/229-10k-resistorpack-of-10.html"target="_blank"><img loading="lazy" decoding="async" src="http://learn.edwinrobotics.com/wp-content/uploads/10k_0.25W.jpg" alt="10k resistor" width="150" height="50" class="alignnone size-full wp-image-1685" /></a><p class="wp-caption-text"></p><b><em>10k Resistor</em></b></p></div></td>
</tr>
<tr class="row-3">
	<td class="column-1"><div style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/single-colored/16-5mm-colored-led-pack-of-5.html"target="_blank"><img loading="lazy" decoding="async" src="http://learn.edwinrobotics.com/wp-content/uploads/solu-5-colors-50pcs-5mm-led-diodes-diffused-red-green-blue-yellow-white-mix-kits-50pcs-5mm-f5-led-light-white-yellow-red_14925927-1.jpeg" alt="led" width="150" height="50" class="alignnone size-full wp-image-1684" /></a><p class="wp-caption-text"></p><b><em>5mm LED</em></b></p></div></td><td class="column-2"><div style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/cables-and-adapters/214-monoprice-usb-20-a-male-to-mini-b-5pin-male-cable.html"target="_blank"><img loading="lazy" decoding="async" src="http://learn.edwinrobotics.com/wp-content/uploads/0_5990_0_720x600.jpg" alt="usb mini cable" width="150" height="150" class="alignnone size-full wp-image-1679" /></a><p class="wp-caption-text"></p><b><em>Mini USB Cable</em></b></p></div></td><td class="column-3"><div style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/programmerconverter/158-sparkfun-ftdi-basic-breakout-33v.html"target="_blank"><img loading="lazy" decoding="async" src="http://learn.edwinrobotics.com/wp-content/uploads/09873-02a.jpg" alt="FTDI USB to Serial Converter" width="150" height="50" class="alignnone size-full wp-image-1682" /></a><p class="wp-caption-text"></p><b><em>USB to Serial Converter</em></b></p></div></td><td class="column-4"><div style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/prototyping/17-male-male-jumper-wires.html"target="_blank"><img loading="lazy" decoding="async" src="http://learn.edwinrobotics.com/wp-content/uploads/12795-00.jpg" alt="Male Male Jumper Wires" width="150" height="50" class="alignnone size-full wp-image-1620" /></a><p class="wp-caption-text"></p><b><em>Jumper Wires</em></b></p></div></td>
</tr>
<tr class="row-4">
	<td class="column-1"><div style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/electrolytic/12-3uf63v-electrolytic-capacitor.html"target="_blank"><img loading="lazy" decoding="async" src="http://learn.edwinrobotics.com/wp-content/uploads/3.3uF-1.jpg" alt="3.3uf capacitor" width="150" height="50" class="alignnone size-full wp-image-1677" /></a><p class="wp-caption-text"></p><b><em>3.3uf Electrolytic Capacitor</em></b></p></div></td><td class="column-2"><div style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/power-supply/301-sparkfun-breadboard-power-supply-stick-5v33v.html"target="_blank"><img loading="lazy" decoding="async" src="http://learn.edwinrobotics.com/wp-content/uploads/13032-01.jpg" alt="Breadboard power supply" width="150" height="100" class="alignnone size-full wp-image-1711" srcset="https://learn.edwinrobotics.com/wp-content/uploads/13032-01-207x136.jpg 207w, https://learn.edwinrobotics.com/wp-content/uploads/13032-01-140x94.jpg 140w, https://learn.edwinrobotics.com/wp-content/uploads/13032-01-430x283.jpg 430w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a><p class="wp-caption-text"></p><b><em>Breadboard Power Supply</em></b></p></div></td><td class="column-3"><div style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/breakout-boards/555-sparkfun-microb-usb-breakout.html"target="_blank"><img loading="lazy" decoding="async" src="http://learn.edwinrobotics.com/wp-content/uploads/12035-01.jpg" alt="Micro USB Pin Breakout Board" width="150" height="100" class="alignnone size-full wp-image-1710" srcset="https://learn.edwinrobotics.com/wp-content/uploads/12035-01-207x136.jpg 207w, https://learn.edwinrobotics.com/wp-content/uploads/12035-01-140x94.jpg 140w, https://learn.edwinrobotics.com/wp-content/uploads/12035-01-430x283.jpg 430w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a><p class="wp-caption-text"></p><b><em>Micro USB Pin Breakout Board</em></b></p></div></td><td class="column-4"><div style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/ceramic/14-1uf-ceramic-capacitorpack-of-5.html"target="_blank"><img loading="lazy" decoding="async" src="http://learn.edwinrobotics.com/wp-content/uploads/117-2.jpg" alt="0.1uf ceramic capacitor" width="150" height="50" class="alignnone size-full wp-image-1680" /></a><p class="wp-caption-text"></p><b><em>0.1uf Ceramic Capacitor</em></b></p></div></td>
</tr>
</tbody>
</table>
<!-- #tablepress-17 from cache -->
<p>You do not need all the above mentioned hardware, some of them are optional, which we had mentioned in details in various sections below.</p>
<p>&nbsp;</p>
<h3></h3>
<h3></h3>
<h3>ESP-WROOM-02 Pinouts:</h3>
<p>It is always important to understand the board which you are working with, is capable of what all stuffs, for this we had added a graphical pinouts and description below:</p>
<div id="attachment_1724" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/ESP_WROOM-02-Graphical-description.png" target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1724" class="wp-image-1724" src="http://learn.edwinrobotics.com/wp-content/uploads/ESP_WROOM-02-Graphical-description.png" alt="ESP8266 Wroom pin graphical description" width="500" height="353" srcset="https://learn.edwinrobotics.com/wp-content/uploads/ESP_WROOM-02-Graphical-description.png 1600w, https://learn.edwinrobotics.com/wp-content/uploads/ESP_WROOM-02-Graphical-description-300x212.png 300w, https://learn.edwinrobotics.com/wp-content/uploads/ESP_WROOM-02-Graphical-description-1024x723.png 1024w, https://learn.edwinrobotics.com/wp-content/uploads/ESP_WROOM-02-Graphical-description-1080x763.png 1080w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1724" class="wp-caption-text">ESP-Wroom-02 Graphical Description</p></div>
<p>&nbsp;</p>
<h3>Circuit Schematics:</h3>
<p>The ESP-WROOM-02 boards needs few external components to get it working, we had a schematics for ESP-WROOM-02 board below:</p>
<div id="attachment_1714" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-02-schematics.png" target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1714" class="wp-image-1714" src="http://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-02-schematics.png" alt="ESP8266 Wroom Schematics" width="500" height="174" srcset="https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-02-schematics.png 1286w, https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-02-schematics-300x105.png 300w, https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-02-schematics-1024x357.png 1024w, https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-02-schematics-1080x376.png 1080w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1714" class="wp-caption-text"><em>Circuit Schematics</em></p></div>
<p>Now, if you notice in the schematics, we had added pullup resistors on most of the communication lines, if you are not using those pins, you can ignore those resistors. But the resistors on following lines are must to get it working, i.e GPIO0, reset and enable.</p>
<p><strong>Note: The power Supply schematics is not included in the above circuit.</strong></p>
<p>The power supply to the circuit must be 3.3v and you can use any option to power the circuit, like using breadboard power supply(listed in the <a href="#step1">hardware needed section</a>) and 9v battery or you can power the board directly from USB to serial converter, make sure that converter must be 3.3v logic ones and it is capable enough to supply minimum of 500mA. We tried to power the system from Sparkfun basic 3.3v FTDI converter but we had faced issue several times, if you are looking to power from converter only, we will recommend you to use the Sparkfun beefy FTDI board. We had used 5v Power Adapter and a 3.3V voltage regulator setup on breadboard to power the system, We had added the 3.3V voltage regulator Schematics below:</p>
<div id="attachment_1719" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/LD33v-Regulator.jpg" target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1719" class="wp-image-1719" src="http://learn.edwinrobotics.com/wp-content/uploads/LD33v-Regulator.jpg" alt="3.3v Voltage Regulator Circuit" width="500" height="160" srcset="https://learn.edwinrobotics.com/wp-content/uploads/LD33v-Regulator.jpg 1352w, https://learn.edwinrobotics.com/wp-content/uploads/LD33v-Regulator-300x96.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/LD33v-Regulator-1024x328.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/LD33v-Regulator-1080x346.jpg 1080w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1719" class="wp-caption-text"><em>3.3V Voltage Regulator Schematics</em></p></div>
<p>The voltage Regulator Part is really Simple, if you seen the schematics, you can notice that, we used 4 capacitor in the circuit, Cout capacitor can be replaced with 3.3uF Capacitor or some other higher value than 10uF if you have. We supplied Vin from the 5v USB power Adapter (Refer the <a href="#step1">hardware needed section</a>), we used the Micro USB Breakout Board (Refer the <a href="#step1">hardware needed section</a>) to breakout the power lines from USB adapter, you can use your phone chargers as well,if you have these breakout board with you.</p>
<p>Make sure you use the proper pins of the voltage regulator while assembling your circuit. Refer the LD33V pinouts below:</p>
<div id="attachment_1720" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/LD33v-Pinouts.jpg" target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1720" class="wp-image-1720" src="http://learn.edwinrobotics.com/wp-content/uploads/LD33v-Pinouts.jpg" alt="ld33v pins pinouts" width="500" height="183" srcset="https://learn.edwinrobotics.com/wp-content/uploads/LD33v-Pinouts.jpg 606w, https://learn.edwinrobotics.com/wp-content/uploads/LD33v-Pinouts-300x110.jpg 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1720" class="wp-caption-text">LD33V Pinouts</p></div>
<p>&nbsp;</p>
<p>Now, its time to assemble all this circuit into a breadboard, make sure you follow the connections, as shown, otherwise, your circuit might not work.</p>
<p>&nbsp;</p>
<h3></h3>
<h3>Assemble the Circuit on a Breadboard:</h3>
<p>The first thing in the breadboarding is always begin with Power supply, if you are using breadboard Power Supply module (Refer the <a href="#step1">hardware needed section</a>)  then you do not have to worry much, all you need is battery with DC Jack Male Connector or you might have power adapter with DC Male Jack on it, use it and you are ready to go. Refer the below diagram for using a breadboard power supply.</p>
<div id="attachment_1742" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/Breadboard-power-supply-stick.jpg" target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1742" class="wp-image-1742" src="http://learn.edwinrobotics.com/wp-content/uploads/Breadboard-power-supply-stick.jpg" alt="Breadboard Power Supply" width="500" height="831" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Breadboard-power-supply-stick.jpg 586w, https://learn.edwinrobotics.com/wp-content/uploads/Breadboard-power-supply-stick-180x300.jpg 180w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1742" class="wp-caption-text"><em>Breadboard Power Supply</em></p></div>
<p>But we are using Voltage regulator to build our own power supply and which we can use to fed power from standard micro USB power adapter/ Mobile Charger. Refer the Power Supply section below for better idea on this.</p>
<div id="attachment_1739" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/Power-Supply-Breadboard.jpg" target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1739" class="wp-image-1739" src="http://learn.edwinrobotics.com/wp-content/uploads/Power-Supply-Breadboard.jpg" alt="3.3V Breadbord Power Supply" width="500" height="500" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Power-Supply-Breadboard.jpg 978w, https://learn.edwinrobotics.com/wp-content/uploads/Power-Supply-Breadboard-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/Power-Supply-Breadboard-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/Power-Supply-Breadboard-184x184.jpg 184w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1739" class="wp-caption-text"><em>3.3V Breadbord Power Supply</em></p></div>
<p><strong>Note: If you are using some other voltage regulator than what we mentioned, then make sure that you cross check the pinouts and connect accordingly. Refer the <a href="#step1">hardware needed section</a> for the USB Breakout Board which you can use.</strong></p>
<p>Once the power supply is done, now we will assemble the circuit for ESP-WROOM-02 Board as shown in the schematics above.</p>
<div id="attachment_1752" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD.jpg" target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1752" class="wp-image-1752" src="http://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD.jpg" alt="ESP8266 Wroom arduino" width="500" height="330" srcset="https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD.jpg 1300w, https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD-300x198.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD-1024x677.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD-1080x714.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD-207x136.jpg 207w, https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD-430x283.jpg 430w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1752" class="wp-caption-text"><em>ESP-WROOM-02 Breadboard Arrangement</em></p></div>
<p>Now you are all done with connections, now its time to upload the code, now for this you need a USB to Serial Converter to establish a Serial communication between the WROOM board and the computer. We used the sparkfun basic ftdi board to made it work, you can use any 3.3V logic converter to do the serial communication, just make sure to make the proper connection with this WROOM board. For this we had added a simple graphical representation, where you need to make the connections, refer the image below:</p>
<div id="attachment_1759" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD_w-FTDI.png" target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1759" class="wp-image-1759" src="http://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD_w-FTDI.png" alt="ESP8266 WROOM Serial Communication" width="500" height="330" srcset="https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD_w-FTDI.png 1300w, https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD_w-FTDI-300x198.png 300w, https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD_w-FTDI-1024x677.png 1024w, https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD_w-FTDI-1080x714.png 1080w, https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD_w-FTDI-207x136.png 207w, https://learn.edwinrobotics.com/wp-content/uploads/ESP-WROOM-BREADBOARD_w-FTDI-430x283.png 430w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1759" class="wp-caption-text"><em>ESP-WROOM-02 Serial Communication</em></p></div>
<p>As you can see that it is clearly labeled which connection will go where into this breadboard, all you need to do is connect jumper wires to your Serial Converter and connect it exactly at the same position, i.e RX,TX and GND , these three lines are required. There is no need to cross connect the RX TX line, since it is already been take care of while labeling, just connect straight away the converter TX pin to WROOM pin 11 and Converter RX pin to WROOM pin 12 and common ground is must between the circuits. Lets begin with programming the WROOM board.</p>
<p>&nbsp;</p>
<h3>Uploading first Program</h3>
<p>&nbsp;</p>
<h5></h5>
<h5><strong>Step 1: Put the WROOM Board in Program Download Mode:</strong></h5>
<p>Since you are ready with hardware, its time to put the WROOM board into UART Download mode,to do so, all you need to do is:</p>
<blockquote>
<ol>
<li>Press both the RESET button and PROGRAM Button together.</li>
<li>Leave the RESET button alone and keep Pressing the PROGRAM button for 1 more second.</li>
<li>Leave the PROGRAM Button, now you are in UART Download mode.</li>
</ol>
</blockquote>
<p>So every time, when you need to upload the code, you have to do this before uploading, this is because the &#8220;auto Program&#8221; is not implemented in the circuit we built. To do so you need to add some transistors and you need to make some more connections from the Serial Converter board, this feature is not covered in this tutorial. Refer the Reset and Program Switch in the above image.</p>
<h5><strong>Step 2: Set proper serial port and board in the Arduino</strong></h5>
<p>Once the board is in download mode. You need to Open the Arduino and install the ESP8266 Core for the Arduino, if you have this in Arduino, you can ignore this. If you don&#8217;t have any ESP8266 board present in you Arduino. You need to do the following :</p>
<blockquote><p>http://arduino.esp8266.com/stable/package_esp8266com_index.json</p></blockquote>
<p>Add the above mentioned line to Arduino: File -&gt; Preferences -&gt; Additional Board Managers URL</p>
<p>If there is an entry already, add the line by inserting a comma. If you need more instruction visit this <a href="https://github.com/esp8266/Arduino" target="_blank">github page.</a></p>
<p>Restart the Arduino after above step and open the boards manager from tools -&gt; boards option and install the ESP8266 Core to the boards, after installation ,restart the Arduino again and you will see a set of ESP8266 boards as follows:</p>
<div id="attachment_1756" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/Arduino-Boards.png" target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1756" class="wp-image-1756" src="http://learn.edwinrobotics.com/wp-content/uploads/Arduino-Boards.png" alt="ESP8266 Boards Arduino" width="500" height="692" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Arduino-Boards.png 650w, https://learn.edwinrobotics.com/wp-content/uploads/Arduino-Boards-217x300.png 217w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1756" class="wp-caption-text"><em>ESP8266 Boards</em></p></div>
<p>Now if you see we had selected the board option as <strong>ThaiEasyElec&#8217;s ESPino ,</strong> we tried out other boards as well and we did not had any issue with other boards as well. The common setting for most of the board is to set the frequency to 80Mhz, you can overclock the board if needed. Flash Size if available set to 2M, else leave it to defualt option. The WROOM board comes with 2MB SPI Flash with four supported SPI modes: Standard SPI, DIO (Dual I/O), DOUT (Dual Output), QIO (Quad I/O) and QOUT (Quad Output).</p>
<p>Refer the latest <a href="http://www.espressif.com/sites/default/files/documentation/0c-esp-wroom-02_datasheet_en.pdf" target="_blank">WROOM Board Datasheet here</a></p>
<p>Once the Clock and Flash is set, select the proper serial port and you are ready to upload the code.</p>
<h5><strong>Step 3: Upload the first program</strong></h5>
<p>Since you are done with everything, lets begin uploading the first code. Refer the image below:</p>
<div id="attachment_1757" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/Example-Program.png" target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1757" class="wp-image-1757" src="http://learn.edwinrobotics.com/wp-content/uploads/Example-Program.png" alt="ESP8266 Wroom Led blink" width="500" height="750" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Example-Program.png 600w, https://learn.edwinrobotics.com/wp-content/uploads/Example-Program-200x300.png 200w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1757" class="wp-caption-text"><em>Example Program</em></p></div>
<p>&nbsp;</p>
<p>Upload the following code from File -&gt; Examples -&gt; ESP8266 -&gt; Blink</p>
<pre class="EnlighterJSRAW" data-enlighter-language="cpp">/*
 ESP8266 Blink by Simon Peter
 Blink the blue LED on the ESP-01 module
 This example code is in the public domain
 
 The blue LED on the ESP-01 module is connected to GPIO1 
 (which is also the TXD pin; so we cannot use Serial.print() at the same time)
 
 Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
*/

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);     // Initialize the LED_BUILTIN pin as an output
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, LOW);   // Turn the LED on (Note that LOW is the voltage level
                                    // but actually the LED is on; this is because 
                                    // it is acive low on the ESP-01)
  delay(1000);                      // Wait for a second
  digitalWrite(LED_BUILTIN, HIGH);  // Turn the LED off by making the voltage HIGH
  delay(2000);                      // Wait for two seconds (to demonstrate the active low LED)
}</pre>
<p><strong>Note: Make Sure the converter is connected and board is in program Download Mode.</strong></p>
<p>&nbsp;</p>
<p>Once uploaded you can see that the LED connected in the GPIO Pin 16 will start blinking. The LED_BUILTIN is defined different to other boards but for <strong>ThaiEasyElec&#8217;s ESPino </strong>board, the LED_BUILTIN is set to GPIO 16, if you still feel doubtful we will recommend you to initialize pin numbers manually with pinMode(Pin_number, INPUT/OUTPUT);</p>
<p><strong>Note: If you are not able to get any blinking, try the serial window debugging and if you are getting any WDT(Watchdog Timer) related issues, try changing the power supply, since the WROOM board needs a stable power supply.</strong></p>
<p>Hope you enjoyed this getting started tutorial, now its your turn to build some cool IoT Projects with this cheap and tiny little board. Do let us know, what you build with this little beast. We are happy to help if you found yourself in some sort of trouble.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://learn.edwinrobotics.com/getting-started-with-esp-wroom-02/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Introduction to ESP8266</title>
		<link>https://learn.edwinrobotics.com/introduction-to-esp8266/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=introduction-to-esp8266</link>
					<comments>https://learn.edwinrobotics.com/introduction-to-esp8266/#respond</comments>
		
		<dc:creator><![CDATA[Abhishek Nair]]></dc:creator>
		<pubDate>Wed, 22 Mar 2017 12:48:44 +0000</pubDate>
				<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[IOT]]></category>
		<category><![CDATA[Wireless]]></category>
		<guid isPermaLink="false">http://learn.edwinrobotics.com/?p=1633</guid>

					<description><![CDATA[<img width="3000" height="2000" src="https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-boards-Cover.jpg" class="attachment- size- wp-post-image" alt="" style="float:left; margin:0 15px 15px 0;" decoding="async" loading="lazy" srcset="https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-boards-Cover.jpg 3000w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-boards-Cover-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-boards-Cover-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-boards-Cover-1080x720.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-boards-Cover-140x94.jpg 140w" sizes="auto, (max-width: 3000px) 100vw, 3000px" />This quick guide will give you idea about ESP8266 and some boards based on it. The ESP8266 (presently ESP8266EX), it is a chip with which manufacturers are making wirelessly networkable micro-controller modules. More specifically, ESP8266 is a system-on-a-chip (SoC) with capabilities for 2.4 GHz Wi-Fi (802.11 b/g/n), general-purpose input/output, Inter-Integrated Circuit (I²C), analog-to-digital conversion (10-bit [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="3000" height="2000" src="https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-boards-Cover.jpg" class="attachment- size- wp-post-image" alt="" style="float:left; margin:0 15px 15px 0;" decoding="async" loading="lazy" srcset="https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-boards-Cover.jpg 3000w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-boards-Cover-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-boards-Cover-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-boards-Cover-1080x720.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-boards-Cover-140x94.jpg 140w" sizes="auto, (max-width: 3000px) 100vw, 3000px" /><p>This quick guide will give you idea about ESP8266 and some boards based on it. The <strong><a href="http://espressif.com/en/products/esp8266/" target="_blank">ESP8266</a></strong> (presently ESP8266EX), it is a chip with which manufacturers are making wirelessly networkable micro-controller modules. More specifically, ESP8266 is a system-on-a-chip (SoC) with capabilities for 2.4 GHz Wi-Fi (802.11 b/g/n), general-purpose input/output, Inter-Integrated Circuit (I²C), analog-to-digital conversion (10-bit ADC), Serial Peripheral Interface (SPI), I²S interfaces with DMA (sharing pins with GPIO), UART and pulse-width modulation (PWM). It employs a 32-bit RISC CPU based on the Tensilica Xtensa LX106 running at 80 MHz (or overclocked to 160 MHz). It has a 64 KB boot ROM, 64 KB instruction RAM and 96 KB data RAM. External flash memory can be accessed through SPI.</p>
<p>The ESP8266 is an amazing chip for all your home automation &amp; Internet of Things projects. This chip costs less and has WiFi connectivity and is compatible with the Arduino IDE.Various vendors have consequently created modules containing the ESP8266 chip at their cores. Some of these modules have specific identifiers, like &#8220;ESP-01&#8221; through &#8220;ESP-13&#8221;. ESP8266-based modules have demonstrated themselves as a capable, low-cost, networkable foundation for facilitating end-point IoT developments. Espressif&#8217;s official module is presently the ESP-WROOM-02. The AI-Thinker modules are labeled ESP-01 through ESP-13. NodeMCU boards extend upon the AI-Thinker modules. Olimex, Adafruit, Sparkfun, WeMos, ESPert (ESPresso) all make various modules as well. See this <strong><a href="http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family" target="_blank">ESP8266 article</a></strong> for more information about popular ESP8266 modules. There are many choices available in the market, and it is easy to get lost between all of them. we do have a bunch of them in our store, <strong><a href="https://shop.edwinrobotics.com/41-esp8266" target="_blank">check out our ESP8266 boards collection</a>.</strong></p>
<p>First, We would like to show you the basic ESP8266 module, i.e ESP-01</p>
<h3><a href="https://shop.edwinrobotics.com/esp8266/425-wifi-module-esp8266.html" target="_blank">ESP-01 Module</a></h3>
<div id="attachment_1639" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/2.jpg" target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1639" class="wp-image-1639" src="http://learn.edwinrobotics.com/wp-content/uploads/2.jpg" alt="ESP-01" width="500" height="375" srcset="https://learn.edwinrobotics.com/wp-content/uploads/2.jpg 700w, https://learn.edwinrobotics.com/wp-content/uploads/2-300x225.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/2-510x382.jpg 510w, https://learn.edwinrobotics.com/wp-content/uploads/2-640x480.jpg 640w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1639" class="wp-caption-text"><em>ESP-01</em></p></div>
<p>This is the first module that came out on the market. It is the cheapest and nearly the smallest module available. It is perfectly usable with the Arduino IDE for example.However, it comes with serious disadvantages. First, you can’t plug it into a breadboard without an adapter or you need to use jumper wires. Then, you don’t have access to all the input/output pins of the ESP8266 chip, which is a problem if you have complex projects that you want to build. However, for simple projects, this is a good module to start with.</p>
<p>Have a look at the pinouts:</p>
<p>&nbsp;</p>
<h2 id="tablepress-15-name" class="tablepress-table-name tablepress-table-name-id-15">ESP-01 Pinouts</h2>

<table id="tablepress-15" class="tablepress tablepress-id-15" aria-labelledby="tablepress-15-name">
<tbody class="row-hover">
<tr class="row-1">
	<td class="column-1"><p align="center">1</p></td><td class="column-2"><p align="center">GND</p></td>
</tr>
<tr class="row-2">
	<td class="column-1"><p align="center">2</p></td><td class="column-2"><p align="center">GPIO1/U0TXD/SPI_CS1</p></td>
</tr>
<tr class="row-3">
	<td class="column-1"><p align="center">3</p></td><td class="column-2"><p align="center">GPIO2/U1TXD</p></td>
</tr>
<tr class="row-4">
	<td class="column-1"><p align="center">4</p></td><td class="column-2"><p align="center">CHIP_EN/CH_PD</p></td>
</tr>
<tr class="row-5">
	<td class="column-1"><p align="center">5</p></td><td class="column-2"><p align="center">GPIO0/SPI_CS2</p></td>
</tr>
<tr class="row-6">
	<td class="column-1"><p align="center">6</p></td><td class="column-2"><p align="center">RST</p></td>
</tr>
<tr class="row-7">
	<td class="column-1"><p align="center">7</p></td><td class="column-2"><p align="center">GPIO3/U0RXD</p></td>
</tr>
<tr class="row-8">
	<td class="column-1"><p align="center">8</p></td><td class="column-2"><p align="center">VCC(3.3V)</p></td>
</tr>
</tbody>
</table>
<!-- #tablepress-15 from cache -->
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a href="https://shop.edwinrobotics.com/esp8266/161-esp-wroom-02-wifi-80211-module.html" target="_blank">ESP-WROOM-02 Module</a></h3>
<p>ESP-WROOM-02 is a low-power 32-bit MCU Wi-Fi module, based on the ESP8266 chip. TCP/IP network stacks, 10-bit ADC, and HSPI/UART/PWM/I2C/I2S interfaces are all embedded in this module.It uses a 2 MB SPI flash connected to HSPI, working as the SDIO/SPI slave with the SPI speed of up to 8 Mbps. This module can be easily integrated into space-limited devices, due to its small size of only 18mm x 20mm x 3mm.</p>
<div id="attachment_1637" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/white.jpg" target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1637" class="wp-image-1637" src="http://learn.edwinrobotics.com/wp-content/uploads/white.jpg" alt="ESP8266 Wroom" width="500" height="500" srcset="https://learn.edwinrobotics.com/wp-content/uploads/white.jpg 1400w, https://learn.edwinrobotics.com/wp-content/uploads/white-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/white-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/white-1024x1024.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/white-1080x1080.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/white-184x184.jpg 184w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1637" class="wp-caption-text"><em>ESP-WROOM-02</em></p></div>
<p>&nbsp;</p>
<p>This official WROOM board is perfect option if you are planning to build something using ESP8266 Core. This module has most of the things built in, you just needs few external components to get it working. The Board comes in SMD package, thus saving the space on the mother board. Due to its tiny size its perfect for IoT applications. Following pins are accessible on the WROOM board:</p>
<p>&nbsp;</p>
<h2 id="tablepress-16-name" class="tablepress-table-name tablepress-table-name-id-16">ESP-WROOM-02 Pinouts</h2>

<table id="tablepress-16" class="tablepress tablepress-id-16" aria-labelledby="tablepress-16-name">
<thead>
<tr class="row-1">
	<th class="column-1"><p align="center"><b>Pin Number</b></p></th><th class="column-2"><p align="center"><b>Pin Name</b></p></th><th class="column-3"><p align="center"><b>Pin Functions</b></p></th>
</tr>
</thead>
<tbody class="row-hover">
<tr class="row-2">
	<td class="column-1"><p align="center">1</p></td><td class="column-2"><p align="center">3V3</p></td><td class="column-3"><p align="center">3.3V power supply (VDD)</p></td>
</tr>
<tr class="row-3">
	<td class="column-1"><p align="center">2</p></td><td class="column-2"><p align="center">EN</p></td><td class="column-3"><p align="center">Chip enable pin. Active high</p></td>
</tr>
<tr class="row-4">
	<td class="column-1"><p align="center">3</p></td><td class="column-2"><p align="center">IO14</p></td><td class="column-3"><p align="center">GPIO14; HSPI_CLK</p></td>
</tr>
<tr class="row-5">
	<td class="column-1"><p align="center">4</p></td><td class="column-2"><p align="center"> IO12</p></td><td class="column-3"><p align="center">GPIO12; HSPI_MISO</p></td>
</tr>
<tr class="row-6">
	<td class="column-1"><p align="center">5</p></td><td class="column-2"><p align="center">IO13</p></td><td class="column-3"><p align="center">GPIO13; HSPI_MOSI; UART0_CTS</p></td>
</tr>
<tr class="row-7">
	<td class="column-1"><p align="center">6</p></td><td class="column-2"><p align="center">IO15</p></td><td class="column-3"><p align="center">GPIO15; MTDO; HSPICS; UART0_RTS</p></td>
</tr>
<tr class="row-8">
	<td class="column-1"><p align="center">7</p></td><td class="column-2"><p align="center"> IO2</p></td><td class="column-3"><p align="center">GPIO2; UART1_TXD</p></td>
</tr>
<tr class="row-9">
	<td class="column-1"><p align="center">8</p></td><td class="column-2"><p align="center">IO0</p></td><td class="column-3"><p align="center">GPIO0</p></td>
</tr>
<tr class="row-10">
	<td class="column-1"><p align="center">9</p></td><td class="column-2"><p align="center">GND</p></td><td class="column-3"><p align="center">GND</p></td>
</tr>
<tr class="row-11">
	<td class="column-1"><p align="center">10</p></td><td class="column-2"><p align="center"> IO4</p></td><td class="column-3"><p align="center">GPIO4</p></td>
</tr>
<tr class="row-12">
	<td class="column-1"><p align="center">11</p></td><td class="column-2"><p align="center">RXD</p></td><td class="column-3"><p align="center">UART0_RXD; GPIO3</p></td>
</tr>
<tr class="row-13">
	<td class="column-1"><p align="center">12</p></td><td class="column-2"><p align="center">TXD</p></td><td class="column-3"><p align="center">UART0_TXD; GPIO1</p></td>
</tr>
<tr class="row-14">
	<td class="column-1"><p align="center">13</p></td><td class="column-2"><p align="center">GND</p></td><td class="column-3"><p align="center">GND</p></td>
</tr>
<tr class="row-15">
	<td class="column-1"><p align="center">14</p></td><td class="column-2"><p align="center">IO5</p></td><td class="column-3"><p align="center">GPIO5</p></td>
</tr>
<tr class="row-16">
	<td class="column-1"><p align="center">15</p></td><td class="column-2"><p align="center"> RST</p></td><td class="column-3"><p align="center">Reset the module</p></td>
</tr>
<tr class="row-17">
	<td class="column-1"><p align="center">16</p></td><td class="column-2"><p align="center">TOUT</p></td><td class="column-3"><p align="center">It can be used to test the power-supply voltage of VDD3P3 (Pin3 and<br />
Pin4) and the input power voltage of TOUT (Pin 6). However, these two<br />
functions cannot be used simultaneously. </p></td>
</tr>
<tr class="row-18">
	<td class="column-1"><p align="center">17</p></td><td class="column-2"><p align="center"> IO16</p></td><td class="column-3"><p align="center">GPIO16; can be used to wake up the chipset from deep sleep mode.</p></td>
</tr>
<tr class="row-19">
	<td class="column-1"><p align="center">18</p></td><td class="column-2"><p align="center">GND</p></td><td class="column-3"><p align="center">GND</p></td>
</tr>
</tbody>
</table>
<!-- #tablepress-16 from cache -->
<p>But it is very difficult to start using ESP-WROOM-02 PCB without any soldering, thus we are offering a presoldered ESP-WROOM-02 Adapter board in out store.Have a look at the adapter board below:</p>
<p>&nbsp;</p>
<h3><a href="https://shop.edwinrobotics.com/esp8266/649-wifi-module-esp-wroom-02-with-adapter.html" target="_blank">ESP-WROOM-02 with Adapter Baord</a></h3>
<p>&nbsp;</p>
<div id="attachment_1655" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/DSC_0023.jpg" target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1655" class="wp-image-1655" src="http://learn.edwinrobotics.com/wp-content/uploads/DSC_0023.jpg" alt="ESP8266: ESP-WROOM-02 Adapter board" width="500" height="500" srcset="https://learn.edwinrobotics.com/wp-content/uploads/DSC_0023.jpg 900w, https://learn.edwinrobotics.com/wp-content/uploads/DSC_0023-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/DSC_0023-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/DSC_0023-184x184.jpg 184w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-1655" class="wp-caption-text"><em>ESP-WROOM-02 Board with Adapter</em></p></div>
<p>&nbsp;</p>
<p>This board is perfect to use with breadboard, you do not need any soldering, it will sit easily on the breadboard. This board will also give you the option to solder the board easily to proto boards, without any complication. The adapter board dimensions will be 25.5mm x 26mm.</p>
<p>We do have different types of ESP8266 boards from different manufacturers which uses ESP8266 as it core. The difference in these boards is that every manufacturer will add their own peripherals and their own standard pinouts, even some boards comes with onboard USB to Serial Converter, so it will be very easy to program those board. Have a look at the <strong><a href="https://shop.edwinrobotics.com/41-esp8266" target="_blank">ESP8266 Boards</a></strong> we having with us.Below we had added the <strong>Summary table for ESP8266 modules</strong>, to get better idea and see the difference between them:</p>
<table class="inline" style="height: 657px;" width="1078">
<thead>
<tr class="row0">
<th class="col0" style="text-align: center;">Board ID</th>
<th class="col1" style="text-align: center;">pins</th>
<th class="col2" style="text-align: center;">pitch</th>
<th class="col3" style="text-align: center;">form factor</th>
<th class="col4" style="text-align: center;">LEDs</th>
<th class="col5" style="text-align: center;">Antenna</th>
<th class="col6" style="text-align: center;">Ant.Socket</th>
<th class="col7" style="text-align: center;">Shielded</th>
<th class="col8" style="text-align: center;">dimensions mm</th>
<th class="col9" style="text-align: center;">Flash Size (KB &amp; Mb)</th>
</tr>
</thead>
<tbody>
<tr class="row1">
<td class="col0" style="text-align: center;">ESP-01</td>
<td class="col1" style="text-align: center;">8</td>
<td class="col2" style="text-align: center;">.1“</td>
<td class="col3" style="text-align: center;">2×4 DIL</td>
<td class="col4" style="text-align: center;">Yes</td>
<td class="col5" style="text-align: center;">Etched-on PCB</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">No</td>
<td class="col8" style="text-align: center;">14.3 x 24.8</td>
<td class="col9" style="text-align: center;">512KB &#8211; 4Mb</td>
</tr>
<tr class="row2">
<td class="col0" style="text-align: center;">ESP-02</td>
<td class="col1" style="text-align: center;">8</td>
<td class="col2" style="text-align: center;">.1”</td>
<td class="col3" style="text-align: center;">2×4 notch</td>
<td class="col4" style="text-align: center;">No?</td>
<td class="col5" style="text-align: center;">None</td>
<td class="col6" style="text-align: center;">Yes</td>
<td class="col7" style="text-align: center;">No</td>
<td class="col8" style="text-align: center;">14.2 x 14.2</td>
<td class="col9" style="text-align: center;">512KB &#8211; 4Mb</td>
</tr>
<tr class="row3">
<td class="col0" style="text-align: center;">ESP-03</td>
<td class="col1" style="text-align: center;">14</td>
<td class="col2" style="text-align: center;">2mm</td>
<td class="col3" style="text-align: center;">2×7 notch</td>
<td class="col4" style="text-align: center;">No</td>
<td class="col5" style="text-align: center;">Ceramic</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">No</td>
<td class="col8" style="text-align: center;">17.3 x 12.1</td>
<td class="col9" style="text-align: center;">512KB &#8211; 4Mb</td>
</tr>
<tr class="row4">
<td class="col0" style="text-align: center;">ESP-04</td>
<td class="col1" style="text-align: center;">14</td>
<td class="col2" style="text-align: center;">2mm</td>
<td class="col3" style="text-align: center;">2×4 notch</td>
<td class="col4" style="text-align: center;">No</td>
<td class="col5" style="text-align: center;">None</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">No</td>
<td class="col8" style="text-align: center;">14.7 x 12.1</td>
<td class="col9" style="text-align: center;">512KB &#8211; 4Mb</td>
</tr>
<tr class="row5">
<td class="col0" style="text-align: center;">ESP-05</td>
<td class="col1" style="text-align: center;">5</td>
<td class="col2" style="text-align: center;">.1“</td>
<td class="col3" style="text-align: center;">1×5 SIL</td>
<td class="col4" style="text-align: center;">No</td>
<td class="col5" style="text-align: center;">None</td>
<td class="col6" style="text-align: center;">Yes</td>
<td class="col7" style="text-align: center;">No</td>
<td class="col8" style="text-align: center;">14.2 x 14.2</td>
<td class="col9" style="text-align: center;">512KB &#8211; 4Mb</td>
</tr>
<tr class="row6">
<td class="col0" style="text-align: center;">ESP-06</td>
<td class="col1" style="text-align: center;">12+GND</td>
<td class="col2" style="text-align: center;">misc</td>
<td class="col3" style="text-align: center;">4×3 dice</td>
<td class="col4" style="text-align: center;">No</td>
<td class="col5" style="text-align: center;">None</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">Yes</td>
<td class="col8" style="text-align: center;">16.3 x 13.1</td>
<td class="col9" style="text-align: center;">512KB &#8211; 4Mb</td>
</tr>
<tr class="row7">
<td class="col0" style="text-align: center;">ESP-07</td>
<td class="col1" style="text-align: center;">16</td>
<td class="col2" style="text-align: center;">2mm</td>
<td class="col3" style="text-align: center;">2×8 pinhole</td>
<td class="col4" style="text-align: center;">Yes</td>
<td class="col5" style="text-align: center;">Ceramic</td>
<td class="col6" style="text-align: center;">Yes</td>
<td class="col7" style="text-align: center;">Yes</td>
<td class="col8" style="text-align: center;">21.2 x 16.0</td>
<td class="col9" style="text-align: center;">1024KB &#8211; 8Mb</td>
</tr>
<tr class="row8">
<td class="col0" style="text-align: center;">ESP-07S</td>
<td class="col1" style="text-align: center;">16</td>
<td class="col2" style="text-align: center;">2mm</td>
<td class="col3" style="text-align: center;">2×8 pinhole</td>
<td class="col4" style="text-align: center;">No</td>
<td class="col5" style="text-align: center;">None</td>
<td class="col6" style="text-align: center;">Yes</td>
<td class="col7" style="text-align: center;">Yes</td>
<td class="col8" style="text-align: center;">17.0 x 16.0</td>
<td class="col9" style="text-align: center;">1024KB &#8211; 8Mb</td>
</tr>
<tr class="row9">
<td class="col0" style="text-align: center;">ESP-08</td>
<td class="col1" style="text-align: center;">14</td>
<td class="col2" style="text-align: center;">2mm</td>
<td class="col3" style="text-align: center;">2×7 notch</td>
<td class="col4" style="text-align: center;">No</td>
<td class="col5" style="text-align: center;">None</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">Yes</td>
<td class="col8" style="text-align: center;">17.0 x 16.0</td>
<td class="col9" style="text-align: center;"></td>
</tr>
<tr class="row10">
<td class="col0" style="text-align: center;">ESP-08 New</td>
<td class="col1" style="text-align: center;">16</td>
<td class="col2" style="text-align: center;">2mm</td>
<td class="col3" style="text-align: center;">2×8 notch</td>
<td class="col4" style="text-align: center;">No</td>
<td class="col5" style="text-align: center;">None</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">Yes</td>
<td class="col8" style="text-align: center;">18.0 x 16.0</td>
<td class="col9" style="text-align: center;"></td>
</tr>
<tr class="row11">
<td class="col0" style="text-align: center;">ESP-09</td>
<td class="col1" style="text-align: center;">12+GND</td>
<td class="col2" style="text-align: center;">misc</td>
<td class="col3" style="text-align: center;">4×3 dice</td>
<td class="col4" style="text-align: center;">No</td>
<td class="col5" style="text-align: center;">None</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">No</td>
<td class="col8" style="text-align: center;">10.0 x 10.0</td>
<td class="col9"></td>
</tr>
<tr class="row12">
<td class="col0" style="text-align: center;">ESP-10</td>
<td class="col1" style="text-align: center;">5</td>
<td class="col2" style="text-align: center;">2mm</td>
<td class="col3" style="text-align: center;">1×5 notch</td>
<td class="col4" style="text-align: center;">No</td>
<td class="col5" style="text-align: center;">None</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">No</td>
<td class="col8" style="text-align: center;">14.2 x 10.0</td>
<td class="col9" style="text-align: center;">512KB &#8211; 4Mb</td>
</tr>
<tr class="row13">
<td class="col0" style="text-align: center;">ESP-11</td>
<td class="col1" style="text-align: center;">8</td>
<td class="col2" style="text-align: center;">1.27mm</td>
<td class="col3" style="text-align: center;">1×8 pinhole</td>
<td class="col4" style="text-align: center;">No</td>
<td class="col5" style="text-align: center;">Ceramic</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">No</td>
<td class="col8" style="text-align: center;">17.3 x 12.1</td>
<td class="col9" style="text-align: center;">512KB &#8211; 4Mb</td>
</tr>
<tr class="row14">
<td class="col0" style="text-align: center;">ESP-12</td>
<td class="col1" style="text-align: center;">16</td>
<td class="col2" style="text-align: center;">2mm</td>
<td class="col3" style="text-align: center;">2×8 notch</td>
<td class="col4" style="text-align: center;">Yes</td>
<td class="col5 rightalign" style="text-align: center;">Etched-on PCB</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">Yes</td>
<td class="col8" style="text-align: center;">24.0 x 16.0</td>
<td class="col9" style="text-align: center;">4096KB &#8211; 16Mb</td>
</tr>
<tr class="row15">
<td class="col0" style="text-align: center;">ESP-12-F</td>
<td class="col1" style="text-align: center;">22</td>
<td class="col2" style="text-align: center;">2mm</td>
<td class="col3" style="text-align: center;">2×8 notch</td>
<td class="col4" style="text-align: center;">Yes</td>
<td class="col5 rightalign" style="text-align: center;">Etched-on PCB</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">Yes</td>
<td class="col8" style="text-align: center;">24.0 x 16.0</td>
<td class="col9" style="text-align: center;">4096KB &#8211; 16Mb</td>
</tr>
<tr class="row16">
<td class="col0" style="text-align: center;">ESP-12-E</td>
<td class="col1" style="text-align: center;">22</td>
<td class="col2" style="text-align: center;">2mm</td>
<td class="col3" style="text-align: center;">2×8 notch</td>
<td class="col4" style="text-align: center;">Yes</td>
<td class="col5 rightalign" style="text-align: center;">Etched-on PCB</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">Yes</td>
<td class="col8" style="text-align: center;">24.0 x 16.0</td>
<td class="col9" style="text-align: center;">4096KB &#8211; 16Mb</td>
</tr>
<tr class="row17">
<td class="col0" style="text-align: center;">ESP-12S</td>
<td class="col1" style="text-align: center;">16</td>
<td class="col2" style="text-align: center;">2mm</td>
<td class="col3" style="text-align: center;">2×8 notch</td>
<td class="col4" style="text-align: center;">Yes</td>
<td class="col5 rightalign" style="text-align: center;">Etched-on PCB</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">Yes</td>
<td class="col8" style="text-align: center;">24.0 x 16.0</td>
<td class="col9" style="text-align: center;">4096KB &#8211; 16Mb</td>
</tr>
<tr class="row18">
<td class="col0" style="text-align: center;">ESP-13</td>
<td class="col1" style="text-align: center;">18</td>
<td class="col2" style="text-align: center;">1.5mm</td>
<td class="col3" style="text-align: center;">2×9</td>
<td class="col4" style="text-align: center;"></td>
<td class="col5 rightalign" style="text-align: center;">Etched-on PCB</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">Yes</td>
<td class="col8" style="text-align: center;">20.0 x 19.9</td>
<td class="col9" style="text-align: center;">4096KB &#8211; 16Mb</td>
</tr>
<tr class="row19">
<td class="col0" style="text-align: center;">ESP-14</td>
<td class="col1" style="text-align: center;">22</td>
<td class="col2" style="text-align: center;">2mm</td>
<td class="col3" style="text-align: center;">2×8 + 6</td>
<td class="col4" style="text-align: center;">1</td>
<td class="col5 rightalign" style="text-align: center;">Etched-on PCB</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">Yes</td>
<td class="col8 centeralign" style="text-align: center;">24.3 x 16.2</td>
<td class="col9" style="text-align: center;"></td>
</tr>
<tr class="row20">
<td class="col0" style="text-align: center;">WROOM-02</td>
<td class="col1" style="text-align: center;">18</td>
<td class="col2" style="text-align: center;">1.5mm</td>
<td class="col3" style="text-align: center;">2×9</td>
<td class="col4" style="text-align: center;">No</td>
<td class="col5" style="text-align: center;">Etched on PCB</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">Yes</td>
<td class="col8" style="text-align: center;">20.0 x 18.0</td>
<td class="col9"></td>
</tr>
<tr class="row21">
<td class="col0" style="text-align: center;">WT8266-S1</td>
<td class="col1" style="text-align: center;">18</td>
<td class="col2" style="text-align: center;">1.5mm</td>
<td class="col3" style="text-align: center;">3×6</td>
<td class="col4" style="text-align: center;">1</td>
<td class="col5" style="text-align: center;">Etched on PCB</td>
<td class="col6" style="text-align: center;">No</td>
<td class="col7" style="text-align: center;">Yes</td>
<td class="col8" style="text-align: center;">15.0 x 18.6</td>
<td class="col9" style="text-align: center;"></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Hope things are more clear to you now, before we finish with this blog, have a look at variety of <strong><a href="http://learn.edwinrobotics.com/category/esp8266/" target="_blank">projects and tutorials based on the ESP8266 boards</a></strong> we had added in our blog.</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://learn.edwinrobotics.com/introduction-to-esp8266/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>230v/110v AC Mains Detection Module Hookup Guide</title>
		<link>https://learn.edwinrobotics.com/230v110v-ac-mains-detection-using-arduino-raspberry-pi-and-esp8266-thing/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=230v110v-ac-mains-detection-using-arduino-raspberry-pi-and-esp8266-thing</link>
					<comments>https://learn.edwinrobotics.com/230v110v-ac-mains-detection-using-arduino-raspberry-pi-and-esp8266-thing/#comments</comments>
		
		<dc:creator><![CDATA[Abhishek Nair]]></dc:creator>
		<pubDate>Mon, 29 Aug 2016 14:43:22 +0000</pubDate>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Home Appliance]]></category>
		<category><![CDATA[IOT]]></category>
		<category><![CDATA[Particle Photon]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[Wireless]]></category>
		<guid isPermaLink="false">http://learn.edwinrobotics.com/?p=692</guid>

					<description><![CDATA[<img width="6000" height="4000" src="https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2.jpg" class="attachment- size- wp-post-image" alt="AC Line detector using optocoupler" style="float:left; margin:0 15px 15px 0;" decoding="async" loading="lazy" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2.jpg 6000w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-1080x720.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-140x94.jpg 140w" sizes="auto, (max-width: 6000px) 100vw, 6000px" />Want to check if you left your lights ON remotely, need to detect the zero crossing point for your dimming circuit or do you just need to interface a 230V signal to your Arduino? The AC Mains Detector board simplifies interfacing high voltage signals by giving a digital output when an AC voltage is detected. [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="6000" height="4000" src="https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2.jpg" class="attachment- size- wp-post-image" alt="AC Line detector using optocoupler" style="float:left; margin:0 15px 15px 0;" decoding="async" loading="lazy" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2.jpg 6000w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-1080x720.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-140x94.jpg 140w" sizes="auto, (max-width: 6000px) 100vw, 6000px" /><p>Want to check if you left your lights ON remotely, need to detect the zero crossing point for your dimming circuit or do you just need to interface a 230V signal to your Arduino? The AC Mains Detector board simplifies interfacing high voltage signals by giving a digital output when an AC voltage is detected. By disabling the on board capacitor, zero crossing detection is possible as well.</p>
<div id="attachment_2054" style="width: 510px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/sensors/960-ac-line-detection-module.html" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2054" class="wp-image-2054" src="http://learn.edwinrobotics.com/wp-content/uploads/Iso.jpg" alt="AC line detection using optocoupler, diode and rectifer" width="500" height="500" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Iso.jpg 1500w, https://learn.edwinrobotics.com/wp-content/uploads/Iso-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/Iso-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/Iso-1024x1024.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/Iso-1080x1080.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/Iso-184x184.jpg 184w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-2054" class="wp-caption-text"><em>AC Line detection Module</em></p></div>
<p>You can buy this item from the following links:</p>
<p><strong>Within GCC</strong>: <a href="https://shop.edwinrobotics.com/sensors/960-ac-mains-zero-crossing-detection-module.html" target="_blank" rel="noopener">Edwin Robotics</a></p>
<p><strong>International Order</strong>: <a href="https://www.tindie.com/products/edwinrobotics/ac-mains-zero-crossing-detector/" target="_blank" rel="noopener">Tindie</a></p>
<p><a href="https://www.tindie.com/stores/edwinrobotics/?ref=offsite_badges&amp;utm_source=sellers_edwinrobotics&amp;utm_medium=badges&amp;utm_campaign=badge_medium"><img loading="lazy" decoding="async" src="https://d2ss6ovg47m0r5.cloudfront.net/badges/tindie-mediums.png" alt="I sell on Tindie" width="150" height="78" /></a></p>
<p>Let us have a look at the guide contents, refer to the list below:</p>
<ul>
<li>
<h4><a href="#Step1">Components</a></h4>
</li>
<li>
<h4><a href="#Step8">Board Pinouts</a></h4>
</li>
<li>
<h4><a href="#Step2">Circuit Schematics </a></h4>
</li>
<li>
<h4><a href="#Step4">Interfacing with Arduino</a></h4>
</li>
<li>
<h4><a href="#Step7">Zero Crossing detection using Arduino</a></h4>
</li>
</ul>
<p>&nbsp;</p>
<h1 id="Step1"><strong>Components</strong></h1>

<table id="tablepress-24" class="tablepress tablepress-id-24">
<tbody>
<tr class="row-1">
	<td class="column-1"><div id="attachment_2055" style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/sensors/960-ac-line-detection-module.html"target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2055" src="http://learn.edwinrobotics.com/wp-content/uploads/AC-Line-Detector_Side-150x150.jpg" alt="AC LINE MONITOR LOGIC-OUT MODULE" width="150" height="150" class="size-thumbnail wp-image-2055" srcset="https://learn.edwinrobotics.com/wp-content/uploads/AC-Line-Detector_Side-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/AC-Line-Detector_Side-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/AC-Line-Detector_Side-1024x1024.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/AC-Line-Detector_Side-1080x1080.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/AC-Line-Detector_Side-184x184.jpg 184w, https://learn.edwinrobotics.com/wp-content/uploads/AC-Line-Detector_Side.jpg 1300w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a><p id="caption-attachment-2055" class="wp-caption-text">AC Line detection Module</p></div></td><td class="column-2"><div id="attachment_241" style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/boards/75-arduino-uno-r3.html"target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-241" src="http://learn.edwinrobotics.com/wp-content/uploads/2016/05/UNO-150x150.jpg" alt="Arduino UNO Microcontroller board" width="150" height="150" class="size-thumbnail wp-image-241" srcset="https://learn.edwinrobotics.com/wp-content/uploads/2016/05/UNO-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/2016/05/UNO-184x184.jpg 184w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a><p id="caption-attachment-241" class="wp-caption-text">Arduino UNO</p></div></td><td class="column-3"><div id="attachment_1571" style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/prototyping/19-male-female-jumper-wires-pack-of-10.html"target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1571" src="http://learn.edwinrobotics.com/wp-content/uploads/179-2-150x150.jpg" alt="Arduino Jumper wires" width="150" height="150" class="size-thumbnail wp-image-1571" srcset="https://learn.edwinrobotics.com/wp-content/uploads/179-2-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/179-2-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/179-2-184x184.jpg 184w, https://learn.edwinrobotics.com/wp-content/uploads/179-2.jpg 600w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a><p id="caption-attachment-1571" class="wp-caption-text">Male-Female Jumper wires</p></div></td>
</tr>
</tbody>
</table>
<!-- #tablepress-24 from cache -->
<p>&nbsp;</p>
<h1 id="Step8"><strong>Board Pinouts</strong></h1>

<table id="tablepress-25" class="tablepress tablepress-id-25">
<tbody>
<tr class="row-1">
	<td class="column-1"><div id="attachment_2066" style="width: 310px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2066" src="http://learn.edwinrobotics.com/wp-content/uploads/PCB-TOP-Pins-300x300.jpg" alt="AC Detection Board for industrial application" width="300" height="300" class="size-medium wp-image-2066" srcset="https://learn.edwinrobotics.com/wp-content/uploads/PCB-TOP-Pins-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/PCB-TOP-Pins-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/PCB-TOP-Pins-184x184.jpg 184w, https://learn.edwinrobotics.com/wp-content/uploads/PCB-TOP-Pins.jpg 1000w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p id="caption-attachment-2066" class="wp-caption-text">Top Side</p></div></td><td class="column-2"><div id="attachment_2092" style="width: 310px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/Bottom-jumper.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2092" src="http://learn.edwinrobotics.com/wp-content/uploads/Bottom-jumper-300x300.jpg" alt="AC mains zero crossing detection" width="300" height="300" class="size-medium wp-image-2092" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Bottom-jumper-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/Bottom-jumper-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/Bottom-jumper-184x184.jpg 184w, https://learn.edwinrobotics.com/wp-content/uploads/Bottom-jumper.jpg 1000w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-2092" class="wp-caption-text">Bottom Side</p></div></td>
</tr>
</tbody>
</table>
<!-- #tablepress-25 from cache -->
<ul>
<li><strong>AC-IN &#8211; </strong>Connect the AC line that needs to be detected here.</li>
<li><strong>&#8211;</strong> (negative sign) &#8211; Connect to ground of microcontroller</li>
<li><strong>+</strong> (positive sign) &#8211; Connect to VCC of microcontroller <strong>in case external pull-up is required</strong></li>
<li><strong>S</strong> &#8211; Connect to a digital/interrupt pin of microcontroller</li>
</ul>
<p><strong>Note: Working with AC voltages is DANGEROUS, care must be taken to prevent any short circuits or mistakes in connection. And as always, you are doing this project at your own risk and Edwin Robotics or the Author cannot be held liable for any damages.</strong></p>
<p>&nbsp;</p>
<h1 id="Step2"><strong>Circuit Schematics</strong></h1>
<p>The circuit consists of two main parts, first is the Bridge Rectifier (DB107) which converts the AC signal to DC and the second is the Optocoupler (LTV816), which provides isolation between High voltage(HV) side and Low Voltage (LV) Side.<a href="http://learn.edwinrobotics.com/wp-content/uploads/Schematics_LTV816_updated.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-2115" src="http://learn.edwinrobotics.com/wp-content/uploads/Schematics_LTV816_updated.png" alt="AC line Detection Schematics and Circuit" width="1121" height="275" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Schematics_LTV816_updated.png 1121w, https://learn.edwinrobotics.com/wp-content/uploads/Schematics_LTV816_updated-300x74.png 300w, https://learn.edwinrobotics.com/wp-content/uploads/Schematics_LTV816_updated-1024x251.png 1024w, https://learn.edwinrobotics.com/wp-content/uploads/Schematics_LTV816_updated-1080x265.png 1080w" sizes="auto, (max-width: 1121px) 100vw, 1121px" /></a></p>
<p>&nbsp;</p>
<p>A pull-up resistor is provided for use with microcontrollers (e.g. ESP8266) that do not have an internal pullup resistor.</p>
<p>&nbsp;</p>
<h1 id="Step4"><strong>Interfacing with Arduino</strong></h1>
<p>The hardware connections are pretty straightforward. On the low voltage side the + (positive symbol) goes to VCC of microcontroller, &#8211; (negative symbol) goes to GND and S goes any digital/interrupt pin. On the high voltage side, the AC lines are connected.</p>
<div id="attachment_2078" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2078" class="wp-image-2078" src="http://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino.jpg" alt="AC Line detection using arduino" width="500" height="500" srcset="https://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino.jpg 1300w, https://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino-1024x1024.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino-1080x1080.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino-184x184.jpg 184w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-2078" class="wp-caption-text"><em>Arduino Connections</em></p></div>
<p>In this example, Pin 2 on the arduino is used in this example as it can be used as an interrupt pin as well.</p>
<p>Sample Code:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="c" data-enlighter-theme="atomic">#define Signal_Pin 2  // Modify this pin as per your connection

void setup() {
  pinMode(Signal_Pin , INPUT_PULLUP);
  Serial.begin(9600);
}

void loop() {
  if ( digitalRead(Signal_Pin) == 0 )
    Serial.println (" AC Mains 230v Detected ");
}
</pre>
<p>&nbsp;</p>
<p><strong>Note: Do not touch the PCB once powered, you can get electrocuted. Keep it away from reach of humans/Animals. Make sure that there are no shorted wires, when connecting the 230v AC mains supply.</strong></p>
<p>&nbsp;</p>
<h1 id="Step7"><strong>Zero Crossing Detection using Arduino</strong></h1>
<p>By default zero crossing detection is disabled by the use of a 2.2uF capacitor, in order to use the board for zero crossing detection the capacitor needs to be bypassed by cutting the trace shown below. It can be resoldered at any time later to disable zero crossing:</p>
<div id="attachment_2072" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/zero-Crossing-PCB.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2072" class="wp-image-2072" src="http://learn.edwinrobotics.com/wp-content/uploads/zero-Crossing-PCB.jpg" alt="Zero crossing detection using AC line detector module" width="500" height="500" srcset="https://learn.edwinrobotics.com/wp-content/uploads/zero-Crossing-PCB.jpg 1000w, https://learn.edwinrobotics.com/wp-content/uploads/zero-Crossing-PCB-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/zero-Crossing-PCB-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/zero-Crossing-PCB-184x184.jpg 184w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-2072" class="wp-caption-text"><em>Modify the jumper</em></p></div>
<p>The Arduino connection will be same as before, upload the following code and view the output on Serial Monitor at 9600 baud rate:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="cpp" data-enlighter-theme="atomic">#define Signal_Pin 2 //Use Arduino Pin 2 or pin 3, both supports hardware interrupt
int counter=0;

void setup()
{
  pinMode(Signal_Pin , INPUT_PULLUP);
  Serial.begin(9600);
  attachInterrupt(0, zero_crosss_int, RISING);  // Choose the zero cross interrupt # from the table above
}

void zero_crosss_int()  // function to be fired at the zero crossing to dim the light
{
  counter++;
}

void loop()
{
  Serial.println(counter);
}
</pre>
<p>&nbsp;</p>
<p>You can see that the counter value increases with every cycle of AC line and the moment you turn off the AC line, the counter Stops as well.</p>
<p>&nbsp;</p>
<h1><strong>References:</strong></h1>
<ul>
<li><a href="http://www.rectron.com/data_sheets/db101-107.pdf" target="_blank" rel="noopener">DB107 Rectifier Datasheet</a></li>
<li><a href="http://datasheet.octopart.com/LTV-816S-Lite-On-datasheet-26684805.pdf" target="_blank" rel="noopener">LTV-816 Datasheet</a></li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://learn.edwinrobotics.com/230v110v-ac-mains-detection-using-arduino-raspberry-pi-and-esp8266-thing/feed/</wfw:commentRss>
			<slash:comments>54</slash:comments>
		
		
			</item>
		<item>
		<title>eSocket</title>
		<link>https://learn.edwinrobotics.com/esocket/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=esocket</link>
					<comments>https://learn.edwinrobotics.com/esocket/#respond</comments>
		
		<dc:creator><![CDATA[Abhishek Nair]]></dc:creator>
		<pubDate>Thu, 26 May 2016 12:10:52 +0000</pubDate>
				<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[Power Appliances]]></category>
		<category><![CDATA[Relay]]></category>
		<guid isPermaLink="false">http://learn.edwinrobotics.com/?p=438</guid>

					<description><![CDATA[<img width="6000" height="4000" src="https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-cover.jpg" class="attachment- size- wp-post-image" alt="ESP8266 Wifi Board" style="float:left; margin:0 15px 15px 0;" decoding="async" loading="lazy" srcset="https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-cover.jpg 6000w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-cover-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-cover-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-cover-140x94.jpg 140w" sizes="auto, (max-width: 6000px) 100vw, 6000px" />&#160; Now a days we have seen lots of devices are available in the market which can be controlled over the internet either using web browser or using mobile application. This project is all about controlling the Power socket over internet using web browser. We had used ESP8266 Thing in this Project, since it will give [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="6000" height="4000" src="https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-cover.jpg" class="attachment- size- wp-post-image" alt="ESP8266 Wifi Board" style="float:left; margin:0 15px 15px 0;" decoding="async" loading="lazy" srcset="https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-cover.jpg 6000w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-cover-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-cover-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266-cover-140x94.jpg 140w" sizes="auto, (max-width: 6000px) 100vw, 6000px" /><p>&nbsp;</p>
<p>Now a days we have seen lots of devices are available in the market which can be controlled over the internet either using web browser or using mobile application. This project is all about controlling the Power socket over internet using web browser. We had used ESP8266 Thing in this Project, since it will give you the flexibility to make a flexible product with internet connectivity using the wifi. Particle photon is another option to be used in this project and it will give great advantage over ESP8266 Thing that, you can flash the code over the internet without bothering about where the product is. Now we will show you how to build your own eSocket.</p>
<p>&nbsp;</p>
<ul>
<li><a href="#Step1">Parts Needed</a></li>
<li><a href="#Step2">ESP8266 Thing </a></li>
<li><a href="#Step3">Circuit Integration</a></li>
<li><a href="#Step4">Source Code</a></li>
</ul>
<p>&nbsp;</p>
<h1 id="Step1" style="text-align: left;"><strong>Parts Needed</strong></h1>
<ul>
<li><a href="#Step2">ESP8266 Thing</a></li>
<li>FTDI Basic USB to Serial Converter</li>
<li><a href="http://shop.edwinrobotics.com/miscellaneous-components/50-5v-relay.html" target="_blank">Relay</a></li>
<li><a href="#ULN2803">ULN2803</a></li>
<li>Power Supply 5v</li>
<li>Power Supply 12v</li>
</ul>
<p>&nbsp;</p>
<h1 id="Step2"><strong>ESP8266 Thing</strong></h1>
<p>&nbsp;</p>
<p>The ESP8266 is a low-cost Wi-Fi chip with full TCP/IP stack and Microcontroller capability produced by Shanghai-based Chinese manufacturer, Espressif. There are many third party modules With ESP8266 available in the market and you can decide which one suits best for your application, we are using the Sprakfun ESP8266 Thing in this tutorial.</p>
<p><a href="https://cdn.sparkfun.com//assets/parts/1/0/4/0/0/13231-04.jpg" target="_blank"><img loading="lazy" decoding="async" class="alignnone" src="https://cdn.sparkfun.com//assets/parts/1/0/4/0/0/13231-04.jpg" width="600" height="600" /></a></p>
<p>The SparkFun ESP8266 Thing is a breakout and development board for the ESP8266 WiFi SoC – a leading platform for Internet of Things (IoT) or WiFi-related projects. These are some features of the board:</p>
<p>&nbsp;</p>
<h2>ESP8266 Thing Features:</h2>
<h2></h2>
<ul>
<li>All module pins broken out</li>
<li>On-board LiPo charger/power supply</li>
<li>802.11 b/g/n</li>
<li>Wi-Fi Direct (P2P), soft-AP</li>
<li>Integrated TCP/IP protocol stack</li>
<li>Integrated TR switch, balun, LNA, power amplifier and matching network</li>
<li>Integrated PLLs, regulators, DCXO and power management units</li>
<li>Integrated low power 32-bit CPU could be used as application processor</li>
<li>+19.5dBm output power in 802.11b mode</li>
<li>Arduino IDE integration</li>
<li>Breadboard Compatible Breakout Headers position</li>
<li>Power On-Off Switch</li>
<li>Status LED</li>
<li>Operating Voltage: 3.3v</li>
</ul>
<p>&nbsp;</p>
<p>Refer the Graphical Datasheet for hardware description</p>
<p><a href="http://learn.edwinrobotics.com/wp-content/uploads/ESP8266ThingV1-page-001.jpg" target="_blank"><img loading="lazy" decoding="async" class="alignnone wp-image-313 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/ESP8266ThingV1-page-001.jpg" alt="ESP8266ThingV1-page-001" width="3300" height="2550" srcset="https://learn.edwinrobotics.com/wp-content/uploads/ESP8266ThingV1-page-001.jpg 3300w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266ThingV1-page-001-300x232.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266ThingV1-page-001-1024x791.jpg 1024w" sizes="auto, (max-width: 3300px) 100vw, 3300px" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>Programming the Thing:</h2>
<p>The ESP8266 has a built-in serial bootloader, which allows for easy programming and re-programming. You don’t need a specialized, expensive programmer – just a simple, USB-to-Serial converter.</p>
<p>We use a 3.3V FTDI Basic to program the Thing, but other serial converters with 3.3V I/O levels should work. The converter does need a DTR line in addition to the RX and TX pins.The FTDI Basic’s 6-pin header matches up exactly to the Thing’s 6-pin serial port header. To set up for programming, simply connect the FTDI directly to this port – take care to match up the DTR and GND pins!</p>
<p style="padding-left: 150px;"><a href="http://learn.edwinrobotics.com/wp-content/uploads/s.jpg" target="_blank"><img loading="lazy" decoding="async" class="alignnone wp-image-318 size-medium" src="http://learn.edwinrobotics.com/wp-content/uploads/s-300x300.jpg" alt="s" width="300" height="300" srcset="https://learn.edwinrobotics.com/wp-content/uploads/s-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/s-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/s-184x184.jpg 184w, https://learn.edwinrobotics.com/wp-content/uploads/s.jpg 600w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p><b>Note:</b> While programming the Thing, it&#8217;s best to power it off USB. We&#8217;ve noticed programming is more likely to fail if the Thing is only powered via the battery.</p>
<p>&nbsp;</p>
<p>Going further we need to interface relay with ESP8266 Thing, since we need to control the power socket, the relay we used in this project is of Industrial grade 10A, 250vAC rated and Coil Supply with 12v DC control voltage, you can use any other relay as per your convenience. Our ESP8266 Thing runs on 3.3v control logic, thus we are not able to straight away control the relay from ESP8266 IO Pins, we used ULN2803 Darlington array IC as relay driver, this IC is easily available in the market and can be used to control 8 relays at a time, since we need to interface just one relay to control the socket, we used only one channel of the IC.</p>
<p>&nbsp;</p>
<h1 style="text-align: left;"><strong>Relay</strong></h1>
<p>&nbsp;</p>
<h3><strong>Specifications:</strong></h3>
<ul>
<li>DPDT</li>
<li>Mini Middle Electromagnetic Relay</li>
<li>8Pins 2NO+2NC</li>
<li>Current:10A</li>
<li>contacts:silver plated gold</li>
<li>LED color:green</li>
<li>Terminal form:socket type</li>
<li>LED voltage: AC220/240V</li>
<li>12V DC voltage Controlled</li>
<li>Secondary Side: 10A/240vAC, 10A/28vDC</li>
</ul>
<p>The relay base module is separate part and needs to be purchased separately, its is rated for 15A, 250v AC, all the pin marking are made on the base itself thus connection is really simple, just refer the schematic shown on the relay body itself.</p>
<p>&nbsp;</p>
<p><a href="http://learn.edwinrobotics.com/wp-content/uploads/LY2N-J-font-b-LY2NJ-b-font-220-240VAC-10A-DPDT-2NO-2NC-8-Pins-New.jpg" target="_blank"><img loading="lazy" decoding="async" class="alignnone wp-image-477 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/LY2N-J-font-b-LY2NJ-b-font-220-240VAC-10A-DPDT-2NO-2NC-8-Pins-New.jpg" alt="LY2N-J-font-b-LY2NJ-b-font-220-240VAC-10A-DPDT-2NO-2NC-8-Pins-New" width="1000" height="1000" srcset="https://learn.edwinrobotics.com/wp-content/uploads/LY2N-J-font-b-LY2NJ-b-font-220-240VAC-10A-DPDT-2NO-2NC-8-Pins-New.jpg 1000w, https://learn.edwinrobotics.com/wp-content/uploads/LY2N-J-font-b-LY2NJ-b-font-220-240VAC-10A-DPDT-2NO-2NC-8-Pins-New-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/LY2N-J-font-b-LY2NJ-b-font-220-240VAC-10A-DPDT-2NO-2NC-8-Pins-New-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/LY2N-J-font-b-LY2NJ-b-font-220-240VAC-10A-DPDT-2NO-2NC-8-Pins-New-184x184.jpg 184w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></a></p>
<p>&nbsp;</p>
<h1 id="ULN2803" style="text-align: left;"><strong>ULN2803</strong></h1>
<p>&nbsp;</p>
<p>The ULN2803A device is a high-voltage, high-curren Darlington transistor array. The device consists of eight NPN Darlington pairs that feature high-voltage outputs with common-cathode clamp diodes for switching inductive loads. The collector-current rating of each Darlington pair is 500 mA. The Darlington pairs may be connected in parallel for higher current Types of Logic capability.</p>
<p><strong>Features:</strong></p>
<ul>
<li>500-mA-Rated Collector Current (Single Output).</li>
<li>High-Voltage Outputs: 50 V</li>
<li>Output Clamp Diodes</li>
<li>Inputs Compatible with Various types of Logic</li>
<li>Relay-Driver Applications</li>
<li>Compatible with ULN2800A Series</li>
</ul>
<p>&nbsp;</p>
<h2><strong>Simplified Schematics:</strong></h2>
<p style="padding-left: 90px;"><a href="http://learn.edwinrobotics.com/wp-content/uploads/ULN2803-Schematics.png" target="_blank"><img loading="lazy" decoding="async" class="alignnone wp-image-469 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/ULN2803-Schematics.png" alt="ULN2803 Schematics" width="444" height="600" srcset="https://learn.edwinrobotics.com/wp-content/uploads/ULN2803-Schematics.png 444w, https://learn.edwinrobotics.com/wp-content/uploads/ULN2803-Schematics-222x300.png 222w" sizes="auto, (max-width: 444px) 100vw, 444px" /></a></p>
<h2><strong>Pin Diagram:</strong></h2>
<p><a href="http://learn.edwinrobotics.com/wp-content/uploads/ULN2803-Pins.png" target="_blank"><img loading="lazy" decoding="async" class="alignnone wp-image-470 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/ULN2803-Pins.png" alt="ULN2803 Pins" width="1379" height="709" srcset="https://learn.edwinrobotics.com/wp-content/uploads/ULN2803-Pins.png 1379w, https://learn.edwinrobotics.com/wp-content/uploads/ULN2803-Pins-300x154.png 300w, https://learn.edwinrobotics.com/wp-content/uploads/ULN2803-Pins-1024x526.png 1024w" sizes="auto, (max-width: 1379px) 100vw, 1379px" /></a></p>
<p>Connections with ULN2803 are really simple, the channel mentioned with 1B , 2B, &#8230;, 8B all are inputs and you can pass on your logic control voltage from microcontroller to these pins, its 3.3v/5v Compatible. The corresponding inverted out will be present on the other side i.e 1C,2C,&#8230;,8C.</p>
<p>Connect the <strong>GND</strong> pin with GND from power supply and <strong>COM</strong> pin with 12v Supply Input, When a logic one is fed to 1B , you are able to get the ground from 1C, we used the channel 8, thus we connected 8B with ESP8266 pin 12 and and 8C to relay coil ground Pin, we already provided relay coil +ve pin with 12v supply. Refer the schematics in the next section to get a clear idea of the circuit connection.</p>
<p><a href="http://www.ti.com/lit/ds/symlink/uln2803a.pdf" target="_blank">Click here</a> to See the Datasheet.</p>
<p>&nbsp;</p>
<h1 id="Step3" style="text-align: left;"><strong>Circuit Integration</strong></h1>
<p>&nbsp;</p>
<p>The complete circuit integration won&#8217;t take much time, you can use  <a href="http://shop.edwinrobotics.com/prototyping/40-breadboard.html" target="_blank">breadboard </a> to integrate the circuit to save your time, we used the protoboards to make breakout boards for the ULN2803 IC and ESP8266 Thing. we used fritzing to make breadboard design for you, just refer the circuit diagram to build your own circuit.</p>
<p>The 12v and 5v power supply is something you can get from adapter around you, power socket or power extension box is something you need to buy. you must buy a big box to fit in maximum circuit Inside it, Precaution must be taken when you assemble this high power circuits.</p>
<p>&nbsp;</p>
<h2>Schematics:</h2>
<p><a href="http://learn.edwinrobotics.com/wp-content/uploads/eSocket.jpg" target="_blank"><img loading="lazy" decoding="async" class="alignnone wp-image-464 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/eSocket.jpg" alt="eSocket" width="935" height="1191" srcset="https://learn.edwinrobotics.com/wp-content/uploads/eSocket.jpg 935w, https://learn.edwinrobotics.com/wp-content/uploads/eSocket-236x300.jpg 236w, https://learn.edwinrobotics.com/wp-content/uploads/eSocket-804x1024.jpg 804w" sizes="auto, (max-width: 935px) 100vw, 935px" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://learn.edwinrobotics.com/wp-content/uploads/eSocket.png" target="_blank"><img loading="lazy" decoding="async" class="alignnone wp-image-455 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/eSocket.png" alt="eSocket" width="5232" height="3744" srcset="https://learn.edwinrobotics.com/wp-content/uploads/eSocket.png 5232w, https://learn.edwinrobotics.com/wp-content/uploads/eSocket-300x215.png 300w, https://learn.edwinrobotics.com/wp-content/uploads/eSocket-1024x733.png 1024w" sizes="auto, (max-width: 5232px) 100vw, 5232px" /></a></p>
<p>&nbsp;</p>
<p>If you check the above image, you won&#8217;t find 5v power supply, its because we fitted it in inside the power socket, the two green wires coming out of the power socket is 5v and GND. The rest you are able to figure out just by referring the schematic shown. We had added working video of the prototype to show you how the things work, use the source code we provided to build your own device.</p>
<p>&nbsp;</p>
<div style="width: 640px;" class="wp-video"><!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->
<video class="wp-video-shortcode" id="video-438-1" width="640" height="352" preload="metadata" controls="controls"><source type="video/mp4" src="http://learn.edwinrobotics.com/wp-content/uploads/eSocket-Video.mp4?_=1" /><a href="http://learn.edwinrobotics.com/wp-content/uploads/eSocket-Video.mp4">http://learn.edwinrobotics.com/wp-content/uploads/eSocket-Video.mp4</a></video></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h1 id="Step4" style="text-align: left;"><strong>Source Code</strong></h1>
<blockquote><p><span style="color: #33cccc;">//ON Device                        Control command:   http://192.168.1.167/led?params=1                </span><br />
<span style="color: #33cccc;">//OFF Device                      Control command:   http://192.168.1.167/led?params=2            </span></p>
<p>#include &lt;ESP8266WiFi.h&gt;<br />
#include &lt;aREST.h&gt;</p>
<p>#define PIN1 13<br />
#define PIN2 12</p>
<p>aREST rest = aREST();</p>
<p><span style="color: #33cccc;">// WiFi parameters</span><br />
const char* ssid = &#8220;xxxx&#8221;;<br />
const char* password = &#8220;xxxxxxxx&#8221;;</p>
<p><span style="color: #33cccc;">// The port to listen for incoming TCP connections</span><br />
#define LISTEN_PORT 80</p>
<p><span style="color: #33cccc;">// Create an instance of the server</span><br />
WiFiServer server(LISTEN_PORT);</p>
<p><span style="color: #33cccc;">// Declare functions to be exposed to the API</span><br />
int ledControl(String command);<br />
void setup(void){<br />
Serial.begin(57600);<br />
pinMode(PIN1,OUTPUT);<br />
pinMode(PIN2,OUTPUT);</p>
<p><span style="color: #33cccc;">// Function to be exposed</span><br />
rest.function(&#8220;led&#8221;,ledControl);</p>
<p><span style="color: #33cccc;">// Give name and ID to device</span><br />
rest.set_id(&#8220;1&#8221;);<br />
rest.set_name(&#8220;esp8266&#8221;);</p>
<p><span style="color: #33cccc;">// Connect to WiFi</span><br />
WiFi.begin(ssid, password);<br />
while (WiFi.status() != WL_CONNECTED) {<br />
delay(500);<br />
}</p>
<p><span style="color: #33cccc;">// Start the server</span><br />
server.begin();<br />
Serial.println(WiFi.localIP());<br />
}<br />
void loop() {<br />
<span style="color: #33cccc;">// Handle REST calls</span><br />
WiFiClient client = server.available();<br />
if (!client) {<br />
return;<br />
}</p>
<p>while(!client.available()){<br />
delay(1);<br />
}<br />
rest.handle(client);<br />
}<br />
int ledControl(String command) {<br />
int state = command.toInt();</p>
<p>if(state==1){<br />
digitalWrite( PIN1, 1);<br />
digitalWrite( PIN2, 1);<br />
}</p>
<p>else<br />
if(state==2){<br />
digitalWrite( PIN1, 0);<br />
digitalWrite( PIN2, 0);<br />
}</p>
<p>return 1;<br />
}</p></blockquote>
<p>&nbsp;</p>
<p>Make sure that you had replaced the Wifi SSID and password credentials in the code with your own network one.</p>
<p>Once you upload the code to you device, you are able to get your local IP address from the serial terminal, open the arduino serial terminal at 57600 baud rate, when you are able to see the IP address just copy it and open your browser either from computer or mobile, whichever connected to same network, use the following two commands in the address bar to control the socket:</p>
<p><span style="color: #33cccc;">//ON Device                        Control command:   http://192.168.1.167/led?params=1                </span><br />
<span style="color: #33cccc;">//OFF Device                      Control command:   http://192.168.1.167/led?params=2      </span></p>
<p>Replace the IP address with you own IP address in the command shown above. Whenever a successful communication is established between ESP8266 and Web, you will get response from the ESP8266 at web end, you are able to see this in the video we added.</p>
<p>We had used the arest in this project, which made our task looks simple, using the arest command line we are able to pass on multiple parameters(all at once) to ESP8266 as string or vise versa.</p>
<p>Download the <a href="https://github.com/marcoschwartz/aREST/archive/master.zip" target="_blank">arest library</a> to run the above code. you need to unzip and copy the library to the arduino library folder.</p>
<p>If you are a web developer the things will be more easier for you, just use the mentioned commands in your web page to link it to the web User Interface. In the next part we will come with more advanced options for the same project so that things will be more easier for you.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h1>Source:</h1>
<p><a href="https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide" target="_blank">ESP8266 Thing<br />
</a><a href="http://fritzing.org/home/" target="_blank">Frtizing</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://learn.edwinrobotics.com/esocket/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		<enclosure url="http://learn.edwinrobotics.com/wp-content/uploads/eSocket-Video.mp4" length="5666545" type="video/mp4" />

			</item>
		<item>
		<title>Micro OLED Hookup guide for ESP8266 and Particle Photon</title>
		<link>https://learn.edwinrobotics.com/micro-oled-hookup-guide-for-esp8266-and-particle-photon/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=micro-oled-hookup-guide-for-esp8266-and-particle-photon</link>
					<comments>https://learn.edwinrobotics.com/micro-oled-hookup-guide-for-esp8266-and-particle-photon/#comments</comments>
		
		<dc:creator><![CDATA[Abhishek Nair]]></dc:creator>
		<pubDate>Sun, 22 May 2016 14:18:12 +0000</pubDate>
				<category><![CDATA[Display]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[OLED]]></category>
		<category><![CDATA[Particle Photon]]></category>
		<guid isPermaLink="false">http://learn.edwinrobotics.com/?p=284</guid>

					<description><![CDATA[<img width="6000" height="4000" src="https://learn.edwinrobotics.com/wp-content/uploads/OLED_cover.jpg" class="attachment- size- wp-post-image" alt="" style="float:left; margin:0 15px 15px 0;" decoding="async" loading="lazy" srcset="https://learn.edwinrobotics.com/wp-content/uploads/OLED_cover.jpg 6000w, https://learn.edwinrobotics.com/wp-content/uploads/OLED_cover-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/OLED_cover-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/OLED_cover-140x94.jpg 140w" sizes="auto, (max-width: 6000px) 100vw, 6000px" />&#160; &#160; Introduction to Micro OLED Display &#160; An organic light-emitting diode (OLED) is a light-emitting diode (LED) in which the emissive electroluminescent layer is a film of organic compound that emits light in response to an electric current. This layer of organic semiconductor is situated between two electrodes typically and at least one of [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="6000" height="4000" src="https://learn.edwinrobotics.com/wp-content/uploads/OLED_cover.jpg" class="attachment- size- wp-post-image" alt="" style="float:left; margin:0 15px 15px 0;" decoding="async" loading="lazy" srcset="https://learn.edwinrobotics.com/wp-content/uploads/OLED_cover.jpg 6000w, https://learn.edwinrobotics.com/wp-content/uploads/OLED_cover-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/OLED_cover-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/OLED_cover-140x94.jpg 140w" sizes="auto, (max-width: 6000px) 100vw, 6000px" /><h1 style="text-align: left; padding-left: 210px;"><a href="http://learn.edwinrobotics.com/wp-content/uploads/OLED.png" target="_blank" rel="noopener noreferrer"><img loading="lazy" decoding="async" class="alignnone wp-image-321 size-medium" src="http://learn.edwinrobotics.com/wp-content/uploads/OLED-184x300.png" alt="OLED" width="184" height="300" srcset="https://learn.edwinrobotics.com/wp-content/uploads/OLED-184x300.png 184w, https://learn.edwinrobotics.com/wp-content/uploads/OLED-627x1024.png 627w, https://learn.edwinrobotics.com/wp-content/uploads/OLED.png 911w" sizes="auto, (max-width: 184px) 100vw, 184px" /></a></h1>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h1 style="text-align: left;"><strong>Introduction to Micro OLED Display</strong></h1>
<p>&nbsp;</p>
<p>An organic light-emitting diode (OLED) is a light-emitting diode (LED) in which the emissive electroluminescent layer is a film of organic compound that emits light in response to an electric current. This layer of organic semiconductor is situated between two electrodes typically and at least one of these electrodes is transparent.</p>
<p>The Micro OLED Display used in this tutorial is a small monochrome, blue-on-black OLED. It’s 64 pixels wide and 48 pixels tall, measuring 0.66&#8243; across. It’s micro sized and sufficient enough to fit a deceivingly large amount of graphics on there. this Micro OLED is easy to control over either an SPI or I<sup>2</sup>C interface.</p>
<p>Sparkfun have the breakout board for this display, its easy and time saving to use the same breakout for any projects.This Micro OLED Breakout provides access to 16 of the OLED’s pins. This breakout board operates at 3.3V with a current of 10mA (20mA max).The Micro OLED present in this breakout is same as  Display used in the <a href="http://shop.edwinrobotics.com/displays/118-sparkfun-microview-oled-arduino-module.html" target="_blank" rel="noopener noreferrer">SparkFun MicroView &#8211; OLED Arduino Module</a>.</p>
<p>The breakout board is an open source design and you can get the design files <a href="https://github.com/sparkfun/Micro_OLED_Breakout/tree/V_1.0">here</a></p>
<p>&nbsp;</p>
<p><strong>Display board Features:</strong></p>
<ul>
<li>Operating Voltage: 3.3V</li>
<li>Screen Size: 64&#215;48 pixels (0.66&#8243; Across)</li>
<li>Monochrome Blue-on-Black</li>
<li>SPI or I<sup>2</sup>C Interface</li>
</ul>
<p>&nbsp;</p>
<p><strong>OLED Pin Reference:</strong></p>
<blockquote>
<h5 style="text-align: left;"></h5>
<table class="pin_table" style="height: 447px;" width="538">
<tbody>
<tr>
<th>Pin Label</th>
<th>SPI Function</th>
<th>I<sup>2</sup>C Function</th>
<th>Notes</th>
</tr>
<tr>
<td style="text-align: center;">GND</td>
<td style="text-align: center;">Ground</td>
<td style="text-align: center;">Ground</td>
<td style="text-align: center;">0V</td>
</tr>
<tr>
<td style="text-align: center;">3V3 (VDD)</td>
<td style="text-align: center;">Power</td>
<td style="text-align: center;">Power</td>
<td style="text-align: center;">Should be a regulated 3.3V supply.</td>
</tr>
<tr>
<td style="text-align: center;">D1 (SDI)</td>
<td style="text-align: center;">MOSI</td>
<td style="text-align: center;">SDA</td>
<td style="text-align: center;">Serial data in</td>
</tr>
<tr>
<td style="text-align: center;">D0 (SCK)</td>
<td style="text-align: center;">SCK</td>
<td style="text-align: center;">SCL</td>
<td style="text-align: center;">SPI and I<sup>2</sup>C clock</td>
</tr>
<tr>
<td style="text-align: center;">D2 (SDO)</td>
<td style="text-align: center;">MISO</td>
<td style="text-align: center;">—</td>
<td style="text-align: center;">Can be unused in SPI mode. No function for I<sup>2</sup>C.</td>
</tr>
<tr>
<td style="text-align: center;">D/C</td>
<td style="text-align: center;">Data/Command</td>
<td style="text-align: center;">I<sup>2</sup>C address selection</td>
<td style="text-align: center;">Digital pin to signal if incoming byte is a command or screen data.</td>
</tr>
<tr>
<td style="text-align: center;">RST</td>
<td style="text-align: center;">Reset</td>
<td style="text-align: center;">Reset</td>
<td style="text-align: center;">Active-low screen reset.</td>
</tr>
<tr>
<td style="text-align: center;">CS</td>
<td style="text-align: center;">CS</td>
<td style="text-align: center;">—</td>
<td style="text-align: center;">SPI chip select (active-low)</td>
</tr>
</tbody>
</table>
</blockquote>
<p><span style="line-height: 1.5;">Sparkfun has provided detailed hookup guide on their blog to setup the OLED breakout board.Follow the links below to see the detailed Instructions.</span></p>
<ul>
<li><a href="https://learn.sparkfun.com/tutorials/micro-oled-breakout-hookup-guide#breakout-board-overview" target="_blank" rel="noopener noreferrer">Breakout Board Overview</a></li>
<li><a href="https://learn.sparkfun.com/tutorials/micro-oled-breakout-hookup-guide#hardware-assembly" target="_blank" rel="noopener noreferrer">Hardware Assembly</a></li>
<li><a href="https://learn.sparkfun.com/tutorials/micro-oled-breakout-hookup-guide#hardware-hookup" target="_blank" rel="noopener noreferrer">Hardware Hookup</a></li>
<li><a href="https://learn.sparkfun.com/tutorials/micro-oled-breakout-hookup-guide#arduino-library-download-install-and-test" target="_blank" rel="noopener noreferrer">Arduino Library Download, Install, and Test</a></li>
<li><a href="https://learn.sparkfun.com/tutorials/micro-oled-breakout-hookup-guide#using-the-arduino-library" target="_blank" rel="noopener noreferrer">Using the Arduino Library</a></li>
</ul>
<p>When we tested the board with Sparkfun library we faced some issue with displaying text, thus we made changes to library and sorted out the issue. The library is available to download from GitHub, <a href="https://github.com/EdwinRobotics/ER_Micro_OLED_Arduino_Library/archive/GSlibrary.zip" target="_blank" rel="noopener noreferrer">Click here</a> to download the library.</p>
<p>When you use this Library, make sure you either replace the Sparkfun library or remove and make a backup of the Sparkfun library from the Arduino.</p>
<p>The hookup guide to setup the Micro OLED display with different boards can be found below:</p>
<ul>
<li><a href="#Step1">Micro OLED Breakout Hookup with ESP8266 </a></li>
<li><span style="color: #333333;"><a href="#Step2">Micro OLED Breakout Hookup with Particle Photon</a></span></li>
</ul>
<h1 style="text-align: justify;"></h1>
<h1 id="Step1" style="text-align: justify;"><strong>Micro OLED Breakout Hookup with ESP8266</strong></h1>
<p>&nbsp;</p>
<p>The ESP8266 is a low-cost Wi-Fi chip with full TCP/IP stack and Microcontroller capability produced by Shanghai-based Chinese manufacturer, Espressif. There are many third party modules With ESP8266 available in the market and you can decide which one suits best for your application, we are using the Sprakfun ESP8266 Thing in this tutorial.</p>
<p><a href="https://cdn.sparkfun.com//assets/parts/1/0/4/0/0/13231-04.jpg" target="_blank" rel="noopener noreferrer"><img loading="lazy" decoding="async" class="alignnone" src="https://cdn.sparkfun.com//assets/parts/1/0/4/0/0/13231-04.jpg" width="600" height="600" /></a></p>
<p>The SparkFun ESP8266 Thing is a breakout and development board for the ESP8266 WiFi SoC – a leading platform for Internet of Things (IoT) or WiFi-related projects. These are some features of the board:</p>
<p>&nbsp;</p>
<h2>ESP8266 Thing Features:</h2>
<h2></h2>
<ul>
<li>All module pins broken out</li>
<li>On-board LiPo charger/power supply</li>
<li>802.11 b/g/n</li>
<li>Wi-Fi Direct (P2P), soft-AP</li>
<li>Integrated TCP/IP protocol stack</li>
<li>Integrated TR switch, balun, LNA, power amplifier and matching network</li>
<li>Integrated PLLs, regulators, DCXO and power management units</li>
<li>Integrated low power 32-bit CPU could be used as application processor</li>
<li>+19.5dBm output power in 802.11b mode</li>
<li>Arduino IDE integration</li>
<li>Breadboard Compatible Breakout Headers position</li>
<li>Power On-Off Switch</li>
<li>Status LED</li>
<li>Operating Voltage: 3.3v</li>
</ul>
<p>Refer the Graphical Datasheet for hardware description</p>
<p><a href="http://learn.edwinrobotics.com/wp-content/uploads/ESP8266ThingV1-page-001.jpg" target="_blank" rel="noopener noreferrer"><img loading="lazy" decoding="async" class="alignnone wp-image-313 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/ESP8266ThingV1-page-001.jpg" alt="ESP8266ThingV1-page-001" width="3300" height="2550" srcset="https://learn.edwinrobotics.com/wp-content/uploads/ESP8266ThingV1-page-001.jpg 3300w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266ThingV1-page-001-300x232.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/ESP8266ThingV1-page-001-1024x791.jpg 1024w" sizes="auto, (max-width: 3300px) 100vw, 3300px" /></a></p>
<p>&nbsp;</p>
<h2>Programming the Thing:</h2>
<p>The ESP8266 has a built-in serial bootloader, which allows for easy programming and re-programming. You don’t need a specialized, expensive programmer – just a simple, USB-to-Serial converter.</p>
<p>We use a 3.3V FTDI Basic to program the Thing, but other serial converters with 3.3V I/O levels should work. The converter does need a DTR line in addition to the RX and TX pins.The FTDI Basic’s 6-pin header matches up exactly to the Thing’s 6-pin serial port header. To set up for programming, simply connect the FTDI directly to this port – take care to match up the DTR and GND pins!</p>
<p style="padding-left: 150px;"><a href="http://learn.edwinrobotics.com/wp-content/uploads/s.jpg" target="_blank" rel="noopener noreferrer"><img loading="lazy" decoding="async" class="alignnone wp-image-318 size-medium" src="http://learn.edwinrobotics.com/wp-content/uploads/s-300x300.jpg" alt="s" width="300" height="300" srcset="https://learn.edwinrobotics.com/wp-content/uploads/s-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/s-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/s-184x184.jpg 184w, https://learn.edwinrobotics.com/wp-content/uploads/s.jpg 600w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p><b>Note:</b> While programming the Thing, it&#8217;s best to power it off USB. We&#8217;ve noticed programming is more likely to fail if the Thing is only powered via the battery.</p>
<p>Now we will see how to connect the ESP8266 Thing with Micro OLED Breakout in I<sup>2</sup>C Mode:</p>
<ul>
<li>Setup the jumpers in the Hardware</li>
</ul>
<blockquote><p><strong>Setting Jumpers for I<span style="font-size: 13.3333px; line-height: 20px;">2</span>C Mode:</strong></p>
<ul>
<li><strong>Short D1/D2</strong> – This will combine the data output line and data input line into one.</li>
<li><strong>Set BS1 to 1</strong> – The BS1 jumpers comes defaulted to 0, which does half the job of setting it to SPI. To set the display to I<span style="font-size: 13.3333px; line-height: 20px;">2</span>C, you’ll need to flip that jumper to 1. Also make sure the BS2 jumper remains set to 0.</li>
<li><strong>Set D/C</strong> – In I<span style="font-size: 13.3333px; line-height: 20px;">2</span>C mode, the D/C pin configures the display’s 7-bit address. You can set it to either 0 or 1, just keep that value in mind when you get to the code part of this tutorial.</li>
</ul>
</blockquote>
<p>Once you’re done setting jumpers, the back of the board should look a little something like this:</p>
<p><a href="https://cdn.sparkfun.com/assets/learn_tutorials/3/0/8/Micro_LED_Tutorial-06.jpg" target="_blank" rel="noopener noreferrer"><img loading="lazy" decoding="async" class="alignnone" src="https://cdn.sparkfun.com/assets/learn_tutorials/3/0/8/Micro_LED_Tutorial-06.jpg" width="1000" height="1000" /></a></p>
<p><a href="http://learn.edwinrobotics.com/wp-content/uploads/ESp-OLED.png" target="_blank" rel="noopener noreferrer"><img loading="lazy" decoding="async" class="alignnone wp-image-328 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/ESp-OLED.png" alt="ESp-OLED" width="1134" height="1134" srcset="https://learn.edwinrobotics.com/wp-content/uploads/ESp-OLED.png 1134w, https://learn.edwinrobotics.com/wp-content/uploads/ESp-OLED-150x150.png 150w, https://learn.edwinrobotics.com/wp-content/uploads/ESp-OLED-300x300.png 300w, https://learn.edwinrobotics.com/wp-content/uploads/ESp-OLED-1024x1024.png 1024w, https://learn.edwinrobotics.com/wp-content/uploads/ESp-OLED-184x184.png 184w" sizes="auto, (max-width: 1134px) 100vw, 1134px" /></a></p>
<p>Follow the above shown connections for I2C interface between OLED and ESP8266 Thing. Any Digital pin can be connected to RST(Reset) Pin of OLED, we used Pin number 5 from the ESP8266 Thing.</p>
<p>&nbsp;</p>
<p><strong>Note: </strong>Pin 5 on the ESP8266 Thing is connected to onboard LED, we tampered the tracks to LED to disable it.</p>
<p>Try out the following code on the ESP8266 Things and check whether your board is working fine or not, We used the modified library (The <a href="https://github.com/EdwinRobotics/ER_Micro_OLED_Arduino_Library/archive/GSlibrary.zip" target="_blank" rel="noopener noreferrer">link</a> to download the library is mentioned above), make sure you must use the same to made it work.</p>
<blockquote><p>#include &lt;Wire.h&gt; <span style="color: #00ccff;">//Include Wire if you&#8217;re using I2C</span><br />
<span style="color: #00ccff;">//#include &lt;SPI.h&gt; // Include SPI if you&#8217;re using SPI</span><br />
#include &lt;ER_MicroOLED.h&gt; <span style="color: #00ccff;">// Include the ER_MicroOLED library</span><br />
#define PIN_RESET 5 <span style="color: #00ccff;">// Connect RST to pin 9 (req. for SPI and I2C)</span><br />
<span style="color: #00ccff;">//#define PIN_DC 8 // Connect DC to pin 8 (required for SPI)</span><br />
<span style="color: #00ccff;">//#define PIN_CS 10 // Connect CS to pin 10 (required for SPI)</span><br />
#define DC_JUMPER 1<br />
<span style="color: #00ccff;">// Also connect pin 13 to SCK and pin 11 to MOSI</span><br />
<span style="color: #00ccff;"> // Declare a MicroOLED object. The parameters include:</span><br />
<span style="color: #00ccff;"> // 1 &#8211; Reset pin: Any digital pin</span><br />
<span style="color: #00ccff;"> // 2 &#8211; D/C pin: Any digital pin (SPI mode only)</span><br />
<span style="color: #00ccff;"> // 3 &#8211; CS pin: Any digital pin (SPI mode only, 10 recommended)</span><br />
<span style="color: #00ccff;"> //MicroOLED oled(PIN_RESET, PIN_DC, PIN_CS);</span><br />
MicroOLED oled(PIN_RESET, DC_JUMPER); <span style="color: #00ccff;">// Example I2C declaration</span></p>
<p>void setup()<br />
{<br />
oled.begin();</p>
<p><span style="color: #00ccff;">// clear(ALL) will clear out the OLED&#8217;s graphic memory.</span><br />
<span style="color: #00ccff;"> // clear(PAGE) will clear the Arduino&#8217;s display buffer.</span><br />
oled.clear(ALL); <span style="color: #00ccff;">// Clear the display&#8217;s memory (gets rid of artifacts)</span><br />
<span style="color: #00ccff;">// To actually draw anything on the display, you must call the</span><br />
<span style="color: #00ccff;"> // display() function.</span><br />
oled.display();<br />
delay(2000);</p>
<p>oled.clear(PAGE);<br />
oled.clear(ALL);<br />
oled.setCursor(0,0);<br />
oled.setTextColor(WHITE);<br />
oled.setTextSize(0);</p>
<p>oled.println(&#8220;hello !!!!&#8221;);<br />
oled.display();<br />
}</p>
<p>void loop()<br />
{<br />
<span style="color: #00ccff;">//oled.line(x0, y0, x1, y1); // Draw a line from (x0,y0) to (x1,y1);</span><br />
oled.line(5, 15, 57, 15); <span style="color: #00ccff;">// Draw a line from (x0,y0) to (x1,y1);</span></p>
<p><span style="color: #00ccff;">//oled.rect(x0, y0, width, height); // Draw a rectange from (7,5) to (31,18)</span><br />
oled.rect(5, 20, 52, 20); <span style="color: #00ccff;">// Draw a rectange from (7,5) to (31,18)</span></p>
<p>oled.line(5, 45, 57, 45); <span style="color: #00ccff;">// Draw a line from (x0,y0) to (x1,y1);</span></p>
<p><span style="color: #00ccff;">//oled.rectFill(7, 5, 35, 5); // Fill a rectangle from (7, 5) to (42, 10)</span><br />
oled.rectFill(10, 25, 42, 10); <span style="color: #00ccff;">// Fill a rectangle from (7, 5) to (42, 10)</span></p>
<p><span style="color: #00ccff;">//oled.circleFill(42, 20, 7); // Fill a circle, 7 radius, centered at (42, 20)</span></p>
<p>oled.display(); // Draw to the screen<br />
}</p></blockquote>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h1 id="Step2" style="text-align: justify;"><strong>Micro OLED Hookup with Particle Photon</strong></h1>
<p>&nbsp;</p>
<p>The <a href="http://shop.edwinrobotics.com/particle/77-particle-photon.html" target="_blank" rel="noopener noreferrer">Photon</a> is a development kit for creating Wi-Fi connected products. It&#8217;s based on Broadcom&#8217;s WICED architecture, and combines a powerful STM32 ARM Cortex M3 microcontroller and a Broadcom Wi-Fi chip (the same one that&#8217;s in Nest Protect, LIFX, and Amazon Dash).</p>
<p style="padding-left: 150px;"><a href="http://learn.edwinrobotics.com/wp-content/uploads/temp.png" target="_blank" rel="noopener noreferrer"><img loading="lazy" decoding="async" class="alignnone wp-image-340 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/temp.png" alt="photon" width="293" height="521" srcset="https://learn.edwinrobotics.com/wp-content/uploads/temp.png 293w, https://learn.edwinrobotics.com/wp-content/uploads/temp-169x300.png 169w" sizes="auto, (max-width: 293px) 100vw, 293px" /></a></p>
<h2>Photon Features:</h2>
<ul class="fancy-list">
<li>Fits in a standard breadboard (with headers)</li>
<li>Surface mountable for machine assembly (without headers)</li>
<li>Backwards compatible with the Spark Core</li>
<li>Broadcom BCM43362 Wi-Fi chip</li>
<li>STM32F205 120Mhz ARM Cortex M3</li>
<li>1MB flash, 128KB RAM</li>
<li>802.11b/g/n</li>
<li>FCC/CE/IC certified</li>
<li>Open source hardware</li>
<li>On-board RGB status LED (ext. drive provided)</li>
<li>18 Mixed-signal GPIO and advanced peripherals</li>
<li>Real-time operating system (FreeRTOS)</li>
<li>Soft AP setup</li>
</ul>
<p>&nbsp;</p>
<table style="height: 281px;" width="586">
<thead>
<tr>
<th style="text-align: center;">Peripheral Type</th>
<th style="text-align: center;">Qty</th>
<th style="text-align: center;">Input(I) / Output(O)</th>
<th style="text-align: center;">FT<sup>[1]</sup> / 3V3<sup>[2]</sup></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">Digital</td>
<td style="text-align: center;">18</td>
<td style="text-align: center;">I/O</td>
<td style="text-align: center;">FT/3V3</td>
</tr>
<tr>
<td style="text-align: center;">Analog (ADC)</td>
<td style="text-align: center;">8</td>
<td style="text-align: center;">I</td>
<td style="text-align: center;">3V3</td>
</tr>
<tr>
<td style="text-align: center;">Analog (DAC)</td>
<td style="text-align: center;">2</td>
<td style="text-align: center;">O</td>
<td style="text-align: center;">3V3</td>
</tr>
<tr>
<td style="text-align: center;">SPI</td>
<td style="text-align: center;">2</td>
<td style="text-align: center;">I/O</td>
<td style="text-align: center;">3V3</td>
</tr>
<tr>
<td style="text-align: center;">I2S</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">I/O</td>
<td style="text-align: center;">3V3</td>
</tr>
<tr>
<td style="text-align: center;">I2C</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">I/O</td>
<td style="text-align: center;">FT</td>
</tr>
<tr>
<td style="text-align: center;">CAN</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">I/O</td>
<td style="text-align: center;">FT</td>
</tr>
<tr>
<td style="text-align: center;">USB</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">I/O</td>
<td style="text-align: center;">3V3</td>
</tr>
<tr>
<td style="text-align: center;">PWM</td>
<td style="text-align: center;">9<sup>[3]</sup></td>
<td style="text-align: center;">O</td>
<td style="text-align: center;">3V3</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Notes:</strong></p>
<p><sup>[1]</sup> FT = 5.0V tolerant pins. All pins except A3 and DAC are 5V tolerant (when not in analog mode). If used as a 5V input the pull-up/pull-down resistor must be disabled.</p>
<p><sup>[2]</sup> 3V3 = 3.3V max pins.</p>
<p><sup>[3]</sup> PWM is available on D0, D1, D2, D3, A4, A5, WKP, RX, TX with a caveat: PWM timer peripheral is duplicated on two pins (A5/D2) and (A4/D3) for 7 total independent PWM outputs. For example: PWM may be used on A5 while D2 is used as a GPIO, or D2 as a PWM while A5 is used as an analog input. However A5 and D2 cannot be used as independently controlled PWM outputs at the same time.</p>
<p>&nbsp;</p>
<h2>Photon Graphical Pin Description:</h2>
<p>&nbsp;</p>
<p><a href="https://docs.particle.io/assets/images/photon_pin_markings_1400.png" target="_blank" rel="noopener noreferrer"><img loading="lazy" decoding="async" class="alignnone" src="https://docs.particle.io/assets/images/photon_pin_markings_1400.png" width="1400" height="1513" /></a></p>
<p><a href="https://docs.particle.io/datasheets/photon-datasheet/" target="_blank" rel="noopener noreferrer">Click here</a> to see the Complete Datasheet for <a href="http://shop.edwinrobotics.com/particle/77-particle-photon.html" target="_blank" rel="noopener noreferrer">Particle Photon</a>.</p>
<p>To hookup the OLED with Photon in I2C mode is pretty much same as what we seen with ESP8266 Thing except this point that both the SDA and SCL lines must be pulled high always. Refer the connection diagram for better idea.</p>
<p><a href="http://learn.edwinrobotics.com/wp-content/uploads/photon-oled.png" target="_blank" rel="noopener noreferrer"><img loading="lazy" decoding="async" class="alignnone wp-image-349 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/photon-oled.png" alt="photon-oled" width="861" height="629" srcset="https://learn.edwinrobotics.com/wp-content/uploads/photon-oled.png 861w, https://learn.edwinrobotics.com/wp-content/uploads/photon-oled-300x219.png 300w" sizes="auto, (max-width: 861px) 100vw, 861px" /></a></p>
<p>Pullup is the thing you need to take care of, we used 10kΩ Resistor for pullup and connected it to 3v3 supply line as shown in the figure.</p>
<p>&nbsp;</p>
<h2><strong>Programme the Particle Photon:</strong></h2>
<p>Photon can be programmed in three ways:</p>
<ul>
<li>Particle Build(Online)</li>
<li>Particle Dev(Half Online, Half Offline)</li>
<li>ARM GCC and the DFU Bootloader (Offline)</li>
</ul>
<p>We recommend you to start with Particle Build(Online), the Particle Build IDE is an always-online, browser-based portal where your Photon code can be edited, saved, and shared. This cloud-based IDE handles code compilation and flashes the built binaries to your Photon over-the-air. You don’t even need your Photon next to you to update its program!</p>
<p>To load the Build IDE head over to <a href="https://build.particle.io/" target="_blank" rel="noopener noreferrer">build.particle.io</a>.</p>
<p>Sparkfun has provided more detailed Instructions for the beginners to understand the IDE better, <a href="https://learn.sparkfun.com/tutorials/photon-development-guide/particle-build-online" target="_blank" rel="noopener noreferrer">Click here</a> to see the Particle Build(Online) guide.</p>
<p>Similarly they provided instruction to understand <a href="https://learn.sparkfun.com/tutorials/photon-development-guide/particle-dev-half-online-half-offline" target="_blank" rel="noopener noreferrer">Particle Dev(Half Online, Half Offline) guide</a> and <a href="https://learn.sparkfun.com/tutorials/photon-development-guide/arm-gcc-and-the-dfu-bootloader-offline" target="_blank" rel="noopener noreferrer">ARM GCC and the DFU Bootloader (Offline) guide</a>.</p>
<p>&nbsp;</p>
<p>To run the OLED program in the Particle Build(online), follow these steps:</p>
<ul>
<li>Add your device to the Particle Build.
<ul>
<li>Download Particle Mobile App to your Handset- <a href="https://itunes.apple.com/us/app/particle-build-photon-electron/id991459054?ls=1&amp;mt=8" target="_blank" rel="noopener noreferrer">iPhone</a> | <a href="https://play.google.com/store/apps/details?id=io.particle.android.app" target="_blank" rel="noopener noreferrer">Android</a></li>
<li>Open the app on your phone. Log in or sign up for an account with Particle if you don&#8217;t have one.</li>
<li>Use this <a href="https://docs.particle.io/guide/getting-started/start/photon/#step-2-connect-with-your-smartphone" target="_blank" rel="noopener noreferrer">Particle First time setup guide</a></li>
</ul>
</li>
<li>Open the online terminal <a href="https://build.particle.io/" target="_blank" rel="noopener noreferrer">build.particle.io</a> and login in to your account</li>
<li>Check under devices tab that whether your devices is listed or not, if not try to add it using mobile app.</li>
<li>Goto &#8221; <strong>code tab</strong>  -&gt; <strong>Create New App </strong>&#8220;</li>
<li>Add micro OLED library to current App.</li>
<li>To add Librbary, goto: &#8221; <strong>Libraries Tab</strong> -&gt; <strong>Community Library Search Box</strong> -&gt; type <strong>OLED </strong>&#8220;</li>
<li>There you will see <strong>SPARKFUNMICROOLED </strong>Library, Click &#8221; <strong>Include in App </strong>&#8221; option.</li>
<li>Save the App using save option.</li>
<li>Use the following code to begin with</li>
</ul>
<blockquote><p><span style="color: #33cccc;">/******************************************************************************</span><br />
<span style="color: #33cccc;"> Micro-OLED-Shield-Example.ino</span><br />
<span style="color: #33cccc;"> SparkFun Micro OLED Library Hello World Example</span><br />
<span style="color: #33cccc;"> Jim Lindblom @ SparkFun Electronics</span><br />
<span style="color: #33cccc;"> Original Creation Date: June 22, 2015</span></p>
<p><span style="color: #33cccc;">This sketch prints a friendly, recognizable logo on the OLED Shield, then</span><br />
<span style="color: #33cccc;"> goes on to demo the Micro OLED library&#8217;s functionality drawing pixels,</span><br />
<span style="color: #33cccc;"> lines, shapes, and text.</span></p>
<p><span style="color: #33cccc;">Hardware Connections:</span><br />
<span style="color: #33cccc;"> This sketch was written specifically for the Photon Micro OLED Shield,</span><br />
<span style="color: #33cccc;"> which does all the wiring for you. If you have a Micro OLED breakout,</span><br />
<span style="color: #33cccc;"> use the following hardware setup:</span></p>
<p><span style="color: #33cccc;">MicroOLED &#8212;&#8212;&#8212;&#8212;- Photon</span><br />
<span style="color: #33cccc;"> GND &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- GND</span><br />
<span style="color: #33cccc;"> VDD &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- 3.3V (VCC)</span><br />
<span style="color: #33cccc;"> D1/MOSI &#8212;&#8212;&#8212;&#8212;&#8212;&#8211; A5 (don&#8217;t change)</span><br />
<span style="color: #33cccc;"> D0/SCK &#8212;&#8212;&#8212;&#8212;&#8212;&#8212; A3 (don&#8217;t change)</span><br />
<span style="color: #33cccc;"> D2</span><br />
<span style="color: #33cccc;"> D/C &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- D6 (can be any digital pin)</span><br />
<span style="color: #33cccc;"> RST &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- D7 (can be any digital pin)</span><br />
<span style="color: #33cccc;"> CS &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- A2 (can be any digital pin)</span></p>
<p><span style="color: #33cccc;">Development environment specifics:</span><br />
<span style="color: #33cccc;"> IDE: Particle Build</span><br />
<span style="color: #33cccc;"> Hardware Platform: Particle Photon</span><br />
<span style="color: #33cccc;"> SparkFun Photon Micro OLED Shield</span></p>
<p><span style="color: #33cccc;">This code is beerware; if you see me (or any other SparkFun</span><br />
<span style="color: #33cccc;"> employee) at the local, and you&#8217;ve found our code helpful,</span><br />
<span style="color: #33cccc;"> please buy us a round!</span></p>
<p><span style="color: #33cccc;">Distributed as-is; no warranty is given.</span><br />
<span style="color: #33cccc;"> *******************************************************************************/</span><br />
#include &#8220;SparkFunMicroOLED/SparkFunMicroOLED.h&#8221; <span style="color: #33cccc;">// Include MicroOLED library</span><br />
#include &#8220;math.h&#8221;</p>
<p><span style="color: #33cccc;">//////////////////////////////////</span><br />
<span style="color: #33cccc;"> // MicroOLED Object Declaration //</span><br />
<span style="color: #33cccc;"> //////////////////////////////////</span><br />
<span style="color: #33cccc;"> // Declare a MicroOLED object. If no parameters are supplied, default pins are</span><br />
<span style="color: #33cccc;"> // used, which will work for the Photon Micro OLED Shield (RST=D7, DC=D6, CS=A2)</span><br />
<span style="color: #33cccc;"> //MicroOLED oled;</span><br />
MicroOLED oled(MODE_I2C, D6); <span style="color: #33cccc;">// Example I2C declaration RST=D7, DC=LOW (0)</span></p>
<p><span style="color: #33cccc;">//SYSTEM_MODE(MANUAL);</span></p>
<p>void setup()<br />
{<br />
Serial.begin(9600);<br />
oled.begin(); <span style="color: #33cccc;">// Initialize the OLED</span><br />
oled.clear(ALL); <span style="color: #33cccc;">// Clear the display&#8217;s internal memory</span><br />
oled.display(); <span style="color: #33cccc;">// Display what&#8217;s in the buffer (splashscreen)</span><br />
delay(1000);<span style="color: #33cccc;"> // Delay 1000 ms</span><br />
randomSeed(analogRead(A0) + analogRead(A1));<br />
}</p>
<p>void loop()<br />
{<br />
pixelExample();<span style="color: #33cccc;"> // Run the pixel example function</span><br />
lineExample(); <span style="color: #33cccc;">// Then the line example function</span><br />
shapeExample(); <span style="color: #33cccc;">// Then the shape example</span><br />
textExamples(); <span style="color: #33cccc;">// Finally the text example</span><br />
<span style="color: #33cccc;"> }</span></p>
<p>void pixelExample()<br />
{<br />
printTitle(&#8220;Pixels&#8221;, 1);</p>
<p>for (int i=0; i&lt;512; i++)<br />
{<br />
oled.pixel(random(oled.getLCDWidth()), random(oled.getLCDHeight()));<br />
oled.display();<br />
}<br />
}</p>
<p>void lineExample()<br />
{<br />
int middleX = oled.getLCDWidth() / 2;<br />
int middleY = oled.getLCDHeight() / 2;<br />
int xEnd, yEnd;<br />
int lineWidth = min(middleX, middleY);</p>
<p>printTitle(&#8220;Lines!&#8221;, 1);</p>
<p>for (int i=0; i&lt;3; i++)<br />
{<br />
for (int deg=0; deg&lt;360; deg+=15)<br />
{<br />
xEnd = lineWidth * cos(deg * M_PI / 180.0);<br />
yEnd = lineWidth * sin(deg * M_PI / 180.0);</p>
<p>oled.line(middleX, middleY, middleX + xEnd, middleY + yEnd);<br />
oled.display();<br />
delay(10);<br />
}<br />
for (int deg=0; deg&lt;360; deg+=15)<br />
{<br />
xEnd = lineWidth * cos(deg * M_PI / 180.0);<br />
yEnd = lineWidth * sin(deg * M_PI / 180.0);</p>
<p>oled.line(middleX, middleY, middleX + xEnd, middleY + yEnd, BLACK, NORM);<br />
oled.display();<br />
delay(10);<br />
}<br />
}<br />
}</p>
<p>void shapeExample()<br />
{<br />
printTitle(&#8220;Shapes!&#8221;, 0);</p>
<p><span style="color: #33cccc;">// Silly pong demo. It takes a lot of work to fake pong&#8230;</span><br />
int paddleW = 3; <span style="color: #33cccc;">// Paddle width</span><br />
int paddleH = 15; <span style="color: #33cccc;">// Paddle height</span><br />
<span style="color: #33cccc;">// Paddle 0 (left) position coordinates</span><br />
int paddle0_Y = (oled.getLCDHeight() / 2) &#8211; (paddleH / 2);<br />
int paddle0_X = 2;<br />
<span style="color: #33cccc;">// Paddle 1 (right) position coordinates</span><br />
int paddle1_Y = (oled.getLCDHeight() / 2) &#8211; (paddleH / 2);<br />
int paddle1_X = oled.getLCDWidth() &#8211; 3 &#8211; paddleW;<br />
int ball_rad = 2; <span style="color: #33cccc;">// Ball radius</span><br />
<span style="color: #33cccc;">// Ball position coordinates</span><br />
int ball_X = paddle0_X + paddleW + ball_rad;<br />
int ball_Y = random(1 + ball_rad, oled.getLCDHeight() &#8211; ball_rad);<span style="color: #33cccc;">//paddle0_Y + ball_rad;</span><br />
int ballVelocityX = 1; <span style="color: #33cccc;">// Ball left/right velocity</span><br />
int ballVelocityY = 1; <span style="color: #33cccc;">// Ball up/down velocity</span><br />
int paddle0Velocity = -1; <span style="color: #33cccc;">// Paddle 0 velocity</span><br />
int paddle1Velocity = 1; <span style="color: #33cccc;">// Paddle 1 velocity</span></p>
<p>//while(ball_X &gt;= paddle0_X + paddleW &#8211; 1)<br />
while ((ball_X &#8211; ball_rad &gt; 1) &amp;&amp;<br />
(ball_X + ball_rad &lt; oled.getLCDWidth() &#8211; 2))<br />
{<br />
<span style="color: #33cccc;">// Increment ball&#8217;s position</span><br />
ball_X+=ballVelocityX;<br />
ball_Y+=ballVelocityY;<br />
<span style="color: #33cccc;">// Check if the ball is colliding with the left paddle</span><br />
if (ball_X &#8211; ball_rad &lt; paddle0_X + paddleW)<br />
{<br />
<span style="color: #33cccc;">// Check if ball is within paddle&#8217;s height</span><br />
if ((ball_Y &gt; paddle0_Y) &amp;&amp; (ball_Y &lt; paddle0_Y + paddleH))<br />
{<br />
ball_X++; <span style="color: #33cccc;">// Move ball over one to the right</span><br />
ballVelocityX = -ballVelocityX; <span style="color: #33cccc;">// Change velocity</span><br />
}<br />
}<br />
<span style="color: #33cccc;">// Check if the ball hit the right paddle</span><br />
if (ball_X + ball_rad &gt; paddle1_X)<br />
{<br />
<span style="color: #33cccc;">// Check if ball is within paddle&#8217;s height</span><br />
if ((ball_Y &gt; paddle1_Y) &amp;&amp; (ball_Y &lt; paddle1_Y + paddleH))<br />
{<br />
ball_X&#8211;; <span style="color: #33cccc;">// Move ball over one to the left</span><br />
ballVelocityX = -ballVelocityX; <span style="color: #33cccc;">// change velocity</span><br />
}<br />
}<br />
<span style="color: #33cccc;">// Check if the ball hit the top or bottom</span><br />
if ((ball_Y &lt;= ball_rad) || (ball_Y &gt;= (oled.getLCDHeight() &#8211; ball_rad &#8211; 1)))<br />
{<br />
<span style="color: #33cccc;">// Change up/down velocity direction</span><br />
ballVelocityY = -ballVelocityY;<br />
}<br />
<span style="color: #33cccc;">// Move the paddles up and down</span><br />
paddle0_Y += paddle0Velocity;<br />
paddle1_Y += paddle1Velocity;<br />
<span style="color: #33cccc;">// Change paddle 0&#8217;s direction if it hit top/bottom</span><br />
if ((paddle0_Y &lt;= 1) || (paddle0_Y &gt; oled.getLCDHeight() &#8211; 2 &#8211; paddleH))<br />
{<br />
paddle0Velocity = -paddle0Velocity;<br />
}<br />
<span style="color: #33cccc;">// Change paddle 1&#8217;s direction if it hit top/bottom</span><br />
if ((paddle1_Y &lt;= 1) || (paddle1_Y &gt; oled.getLCDHeight() &#8211; 2 &#8211; paddleH))<br />
{<br />
paddle1Velocity = -paddle1Velocity;<br />
}</p>
<p>/<span style="color: #33cccc;">/ Draw the Pong Field</span><br />
<span style="color: #33cccc;"> oled.clear(PAGE); // Clear the page</span><br />
<span style="color: #33cccc;"> // Draw an outline of the screen:</span><br />
oled.rect(0, 0, oled.getLCDWidth() &#8211; 1, oled.getLCDHeight());<br />
<span style="color: #33cccc;">// Draw the center line</span><br />
oled.rectFill(oled.getLCDWidth()/2 &#8211; 1, 0, 2, oled.getLCDHeight());<br />
<span style="color: #33cccc;">// Draw the Paddles:</span><br />
oled.rectFill(paddle0_X, paddle0_Y, paddleW, paddleH);<br />
oled.rectFill(paddle1_X, paddle1_Y, paddleW, paddleH);<br />
<span style="color: #33cccc;">// Draw the ball:</span><br />
oled.circle(ball_X, ball_Y, ball_rad);<br />
<span style="color: #33cccc;">// Actually draw everything on the screen:</span><br />
oled.display();<br />
delay(25); <span style="color: #33cccc;">// Delay for visibility</span><br />
<span style="color: #33cccc;"> }</span><br />
delay(1000);<br />
}</p>
<p>void textExamples()<br />
{<br />
printTitle(&#8220;Text!&#8221;, 1);</p>
<p><span style="color: #33cccc;">// Demonstrate font 0. 5&#215;8 font</span><br />
oled.clear(PAGE);<span style="color: #33cccc;"> // Clear the screen</span><br />
oled.setFontType(0); <span style="color: #33cccc;">// Set font to type 0</span><br />
oled.setCursor(0, 0); <span style="color: #33cccc;">// Set cursor to top-left</span><br />
<span style="color: #33cccc;">// There are 255 possible characters in the font 0 type.</span><br />
<span style="color: #33cccc;"> // Lets run through all of them and print them out!</span><br />
for (int i=0; i&lt;=255; i++)<br />
{<br />
<span style="color: #33cccc;">// You can write byte values and they&#8217;ll be mapped to</span><br />
<span style="color: #33cccc;"> // their ASCII equivalent character.</span><br />
oled.write(i); <span style="color: #33cccc;">// Write a byte out as a character</span><br />
oled.display(); <span style="color: #33cccc;">// Draw on the screen</span><br />
delay(10); <span style="color: #33cccc;">// Wait 10ms</span><br />
<span style="color: #33cccc;">// We can only display 60 font 0 characters at a time.</span><br />
<span style="color: #33cccc;"> // Every 60 characters, pause for a moment. Then clear</span><br />
<span style="color: #33cccc;"> // the page and start over.</span><br />
if ((i%60 == 0) &amp;&amp; (i != 0))<br />
{<br />
delay(500); <span style="color: #33cccc;">// Delay 500 ms</span><br />
oled.clear(PAGE); <span style="color: #33cccc;">// Clear the page</span><br />
oled.setCursor(0, 0); <span style="color: #33cccc;">// Set cursor to top-left</span><br />
}<br />
}<br />
delay(500); <span style="color: #33cccc;">// Wait 500ms before next example</span></p>
<p><span style="color: #33cccc;">// Demonstrate font 1. 8&#215;16. Let&#8217;s use the print function</span><br />
<span style="color: #33cccc;"> // to display every character defined in this font.</span><br />
oled.setFontType(1); // Set font to type 1<br />
oled.clear(PAGE); <span style="color: #33cccc;">// Clear the page</span><br />
oled.setCursor(0, 0); <span style="color: #33cccc;">// Set cursor to top-left</span><br />
<span style="color: #33cccc;">// Print can be used to print a string to the screen:</span><br />
oled.print(&#8221; !\&#8221;#$%&amp;'()*+,-./01234&#8243;);<br />
oled.display(); <span style="color: #33cccc;">// Refresh the display</span><br />
delay(1000); <span style="color: #33cccc;">// Delay a second and repeat</span><br />
oled.clear(PAGE);<br />
oled.setCursor(0, 0);<br />
oled.print(&#8220;56789:;&lt;=&gt;?@ABCDEFGHI&#8221;);<br />
oled.display();<br />
delay(1000);<br />
oled.clear(PAGE);<br />
oled.setCursor(0, 0);<br />
oled.print(&#8220;JKLMNOPQRSTUVWXYZ[\\]^&#8221;);<br />
oled.display();<br />
delay(1000);<br />
oled.clear(PAGE);<br />
oled.setCursor(0, 0);<br />
oled.print(&#8220;_`abcdefghijklmnopqrs&#8221;);<br />
oled.display();<br />
delay(1000);<br />
oled.clear(PAGE);<br />
oled.setCursor(0, 0);<br />
oled.print(&#8220;tuvwxyz{|}~&#8221;);<br />
oled.display();<br />
delay(1000);</p>
<p><span style="color: #33cccc;">// Demonstrate font 2. 10&#215;16. Only numbers and &#8216;.&#8217; are defined.</span><br />
<span style="color: #33cccc;"> // This font looks like 7-segment displays.</span><br />
<span style="color: #33cccc;"> // Lets use this big-ish font to display readings from the</span><br />
<span style="color: #33cccc;"> // analog pins.</span><br />
for (int i=0; i&lt;25; i++)<br />
{<br />
oled.clear(PAGE); <span style="color: #33cccc;">// Clear the display</span><br />
oled.setCursor(0, 0); <span style="color: #33cccc;">// Set cursor to top-left</span><br />
oled.setFontType(0); <span style="color: #33cccc;">// Smallest font</span><br />
oled.print(&#8220;A0:&#8221;); <span style="color: #33cccc;">// Print &#8220;A0&#8221;</span><br />
oled.setFontType(2);<span style="color: #33cccc;"> // 7-segment font</span><br />
oled.print(analogRead(A0)); <span style="color: #33cccc;">// Print a0 reading</span><br />
oled.setCursor(0, 16); <span style="color: #33cccc;">// Set cursor to top-middle-left</span><br />
oled.setFontType(0); <span style="color: #33cccc;">// Repeat</span><br />
oled.print(&#8220;A1:&#8221;);<br />
oled.setFontType(2);<br />
oled.print(analogRead(A1));<br />
oled.setCursor(0, 32);<br />
oled.setFontType(0);<br />
oled.print(&#8220;A7:&#8221;);<br />
oled.setFontType(2);<br />
oled.print(analogRead(A7));<br />
oled.display();<br />
delay(100);<br />
}</p>
<p><span style="color: #33cccc;">// Demonstrate font 3. 12&#215;48. Stopwatch demo.</span><br />
oled.setFontType(3); <span style="color: #33cccc;">// Use the biggest font</span><br />
int ms = 0;<br />
int s = 0;<br />
while (s &lt;= 50)<br />
{<br />
oled.clear(PAGE); <span style="color: #33cccc;">// Clear the display</span><br />
oled.setCursor(0, 0); <span style="color: #33cccc;">// Set cursor to top-left</span><br />
if (s &lt; 10)<br />
oled.print(&#8220;00&#8221;);<span style="color: #33cccc;"> // Print &#8220;00&#8221; if s is 1 digit</span><br />
else if (s &lt; 100)<br />
oled.print(&#8220;0&#8221;); <span style="color: #33cccc;">// Print &#8220;0&#8221; if s is 2 digits</span><br />
oled.print(s); <span style="color: #33cccc;">// Print s&#8217;s value</span><br />
<span style="color: #33cccc;"> oled.print(&#8220;:&#8221;); // Print &#8220;:&#8221;</span><br />
oled.print(ms);<span style="color: #33cccc;"> // Print ms value</span><br />
oled.display(); <span style="color: #33cccc;">// Draw on the screen</span><br />
ms++; // Increment ms<br />
if (ms &gt;= 10) <span style="color: #33cccc;">// If ms is &gt;= 10</span><br />
{<br />
ms = 0; <span style="color: #33cccc;">// Set ms back to 0</span><br />
s++; <span style="color: #33cccc;">// and increment s</span><br />
}<br />
delay(1);<br />
}<br />
}</p>
<p><span style="color: #33cccc;">// Center and print a small title</span><br />
<span style="color: #33cccc;"> // This function is quick and dirty. Only works for titles one</span><br />
<span style="color: #33cccc;"> // line long.</span><br />
void printTitle(String title, int font)<br />
{<br />
int middleX = oled.getLCDWidth() / 2;<br />
int middleY = oled.getLCDHeight() / 2;</p>
<p>oled.clear(PAGE);<br />
oled.setFontType(font);<br />
<span style="color: #33cccc;">// Try to set the cursor in the middle of the screen</span><br />
oled.setCursor(middleX &#8211; (oled.getFontWidth() * (title.length()/2)),<br />
middleY &#8211; (oled.getFontWidth() / 2));<br />
<span style="color: #33cccc;">// Print the title:</span><br />
oled.print(title);<br />
oled.display();<br />
delay(1500);<br />
oled.clear(PAGE);<br />
}</p></blockquote>
<p>&nbsp;</p>
<p>Care must be taken to initialize object in the code for I2C communication, use the following parameter for declartion based on your application.<br />
<span style="color: #33cccc;">//MicroOLED oled(MODE_SPI, PIN_RESET, PIN_DC, PIN_CS); // Example SPI declaration</span><br />
<span style="color: #33cccc;"> //MicroOLED oled(MODE_I2C, PIN_RESET); // Example I2C declaration</span></p>
<p>&nbsp;</p>
<p>Note: The Hookup shown here for I2C communication is tested and in working condition, to do the SPI interface of the OLED Module, you need to do the following things:</p>
<ul>
<li>Modify the Jumpers on the back of the OLED breakout for SPI Communication</li>
<li><a href="https://learn.sparkfun.com/tutorials/micro-oled-breakout-hookup-guide#breakout-board-overview" target="_blank" rel="noopener noreferrer">Visit here</a> for jumper settings</li>
<li>Refer the shown connection chart below for SPI connection.</li>
<li>Make sure to initialize these connected pins in the object declaration.</li>
</ul>
<blockquote><p>&nbsp;</p>
<table>
<tbody>
<tr>
<td width="227">
<p style="text-align: center;"><strong>OLED</strong></p>
</td>
<td style="text-align: center;" width="227"><strong>Photon</strong></td>
<td style="text-align: center;" width="147"><strong>ESP8266</strong></td>
</tr>
<tr>
<td width="227">
<p style="text-align: center;">GND</p>
</td>
<td style="text-align: center;" width="227">GND</td>
<td style="text-align: center;" width="147">GND</td>
</tr>
<tr>
<td width="227">
<p style="text-align: center;">3v3</p>
</td>
<td style="text-align: center;" width="227">3v3</td>
<td style="text-align: center;" width="147">3v3</td>
</tr>
<tr>
<td width="227">
<p style="text-align: center;">D1-MOSI</p>
</td>
<td style="text-align: center;" width="227">
<table style="height: 62px;" width="256">
<tbody>
<tr>
<td width="118">A5</td>
<td width="67">D2</td>
</tr>
</tbody>
</table>
</td>
<td style="text-align: center;" width="147">13</td>
</tr>
<tr>
<td style="text-align: center;" width="227">D0-SCK</td>
<td style="text-align: center;" width="227">
<table style="height: 57px;" width="257">
<tbody>
<tr>
<td width="118">A3</td>
<td width="67">D4</td>
</tr>
</tbody>
</table>
</td>
<td width="147">
<p style="text-align: center;">14</p>
</td>
</tr>
<tr>
<td style="text-align: center;" width="227">D2-MISO</td>
<td style="text-align: center;" width="227">
<table style="height: 58px;" width="257">
<tbody>
<tr>
<td width="118">A4</td>
<td width="67">D3</td>
</tr>
</tbody>
</table>
</td>
<td width="147">
<p style="text-align: center;">12</p>
</td>
</tr>
<tr>
<td style="text-align: center;" width="227">DC</td>
<td style="text-align: center;" width="227">
<table style="height: 64px;" width="256">
<tbody>
<tr>
<td width="118">&#8211;</td>
<td width="67">&#8211;</td>
</tr>
</tbody>
</table>
</td>
<td width="147">
<p style="text-align: center;">&#8211;</p>
</td>
</tr>
<tr>
<td style="text-align: center;" width="227">RST</td>
<td style="text-align: center;" width="227">
<table style="height: 80px;" width="313">
<tbody>
<tr>
<td width="118">Any Digital pin</td>
<td width="111">Any Digital pin</td>
</tr>
</tbody>
</table>
</td>
<td width="147">
<p style="text-align: center;">D5</p>
</td>
</tr>
<tr>
<td style="text-align: center;" width="227">CS</td>
<td style="text-align: center;" width="227">
<table style="height: 62px;" width="312">
<tbody>
<tr>
<td width="125">Any Digital Pin</td>
<td width="113">Any Digital Pin</td>
</tr>
</tbody>
</table>
</td>
<td width="147">
<p style="text-align: center;">D4/D2</p>
</td>
</tr>
</tbody>
</table>
</blockquote>
<p><strong> Note: </strong>Use any one of the SPI peripheral of the photon. MISO pins can be unused.</p>
<h2><strong>Buy: </strong></h2>
<ul>
<li><strong><a href="http://shop.edwinrobotics.com/displays/118-sparkfun-microview-oled-arduino-module.html" target="_blank" rel="noopener noreferrer">SparkFun MicroView – OLED Arduino Module</a></strong></li>
<li><strong><a href="http://shop.edwinrobotics.com/particle/77-particle-photon.html" target="_blank" rel="noopener noreferrer">Particle Photon</a></strong></li>
</ul>
<h2>Source:</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/ESP8266" target="_blank" rel="noopener noreferrer">ESp8266 Wiki</a></li>
<li><a href="https://www.particle.io/prototype" target="_blank" rel="noopener noreferrer">Particle Photon</a></li>
<li><a href="https://learn.sparkfun.com/tutorials/micro-oled-breakout-hookup-guide" target="_blank" rel="noopener noreferrer">Sparkfun Micro OLED Hookup</a></li>
<li><a href="https://docs.particle.io/guide/getting-started/start/photon/" target="_blank" rel="noopener noreferrer">Particle Photon Docs</a></li>
<li><a href="https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide">ESP8266 Thing Hookup Guide</a></li>
<li><a href="https://learn.sparkfun.com/tutorials/photon-development-guide/introduction" target="_blank" rel="noopener noreferrer">Sparkfun Photon Development Guide</a></li>
<li><a href="https://en.wikipedia.org/wiki/OLED" target="_blank" rel="noopener noreferrer">OLED Wiki</a></li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://learn.edwinrobotics.com/micro-oled-hookup-guide-for-esp8266-and-particle-photon/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Object Caching 24/556 objects using APC
Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Database Caching 55/197 queries in 0.123 seconds using APC

Served from: learn.edwinrobotics.com @ 2025-07-19 19:40:58 by W3 Total Cache
-->