<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=ED_BT_Shield</id>
	<title>ED BT Shield - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=ED_BT_Shield"/>
	<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=ED_BT_Shield&amp;action=history"/>
	<updated>2026-06-10T03:11:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://w.electrodragon.com/w/index.php?title=ED_BT_Shield&amp;diff=5476&amp;oldid=prev</id>
		<title>Chao: /* Demo Code */</title>
		<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=ED_BT_Shield&amp;diff=5476&amp;oldid=prev"/>
		<updated>2013-09-09T07:55:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Demo Code&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Pin definition ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Arduino Pin !! BT Pin !! Description&lt;br /&gt;
|-&lt;br /&gt;
| D0 || RX || Arduino default RX&lt;br /&gt;
|-&lt;br /&gt;
| D1 || TX || Arduino default TX&lt;br /&gt;
|-&lt;br /&gt;
| D2 || LED || Status LED&lt;br /&gt;
|-&lt;br /&gt;
| D3 || RX1 || alternative serial communication pins&lt;br /&gt;
|-&lt;br /&gt;
| D4 || TX1 || alternative serial communication pins&lt;br /&gt;
|}&lt;br /&gt;
== Demo Code ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Arduino&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;SoftwareSerial.h&amp;gt;&lt;br /&gt;
#define RX1 3&lt;br /&gt;
#define TX1 4&lt;br /&gt;
&lt;br /&gt;
SoftwareSerial mySerial(RX1, TX1);&lt;br /&gt;
 &lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
   // define pin modes for tx, rx pins:&lt;br /&gt;
   pinMode(RX1, INPUT);&lt;br /&gt;
   pinMode(TX1, OUTPUT);&lt;br /&gt;
   mySerial.begin(9600);&lt;br /&gt;
   Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
 if (Serial.available()){&lt;br /&gt;
 &lt;br /&gt;
   mySerial.println((char)Serial.read()); // Print directly what read from Arduino &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (mySerial.available()) {&lt;br /&gt;
     Serial.print((char)mySerial.read()); // print what read from other side of BT&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Chao</name></author>
	</entry>
</feed>