Skip to content

Commit aa5ed46

Browse files
committed
Pushing Hookup Guide for Launch
1 parent affdb8a commit aa5ed46

File tree

97 files changed

+21449
-164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+21449
-164
lines changed

.github/workflows/mkdocs.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Run mkdocs
2+
on:
3+
push:
4+
branches:
5+
- main
6+
permissions:
7+
contents: write
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Python runtime
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: 3.x
19+
20+
- name: Install Python dependencies
21+
run: pip install mkdocs-monorepo-plugin mkdocs-redirects mkdocs-with-pdf weasyprint mkdocs-git-authors-plugin mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2
22+
23+
- name: Set up build cache
24+
uses: actions/cache@v2
25+
with:
26+
key: ${{ github.ref }}
27+
path: .cache
28+
29+
- name: Install Insiders build
30+
env:
31+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
32+
run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
33+
- run: mkdocs gh-deploy --force
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
In this example, we will be using the [basic serial UART example from the SerLCD tutorial](https://learn.sparkfun.com/tutorials/avr-based-serial-enabled-lcds-hookup-guide/serial-uart-example-code---basic). However, the wires between the SparkFun RedBoard will be replaced with a pair of BlueSMiRF v2s.
2+
3+
<div style="text-align: center">
4+
<table>
5+
<tr>
6+
<td style="text-align: center; vertical-align: middle;">
7+
<a href="https://learn.sparkfun.com/tutorials/avr-based-serial-enabled-lcds-hookup-guide/serial-uart-example-code---basic">
8+
<div style="text-align: center"><img src="https://cdn.sparkfun.com/assets/learn_tutorials/7/8/9/serialbasichello.jpg" alt="AVR-Based Serial Enabled LCDs Hookup Guide" style="width:500px; height:282px; object-fit:contain;"></div>
9+
<hr />
10+
<h3 style="text-align: left">
11+
<b>AVR-Based Serial Enabled LCDs Hookup Guide | Serial UART: Example Code - Basic</b>
12+
</h3>
13+
</a>
14+
</td>
15+
</tr>
16+
</table>
17+
</div>
18+
19+
### Changing the Baud Rate
20+
21+
Before using the BlueSMiRFs with the SerLCD, we need to make sure that the baud rates match. You can either change the baud rate on both BlueSMiRFs or the baud rate of the SerLCD. To keep the original Arduino code the same, let's change the baud rate on both of the BlueSMiRFs. This will also be a good exercise to change the baud rate using the AT Commands.
22+
23+
Connect a USB-to-Serial converter to the BlueSMiRF. Depending on the BlueSMiRF that you have, you may need to solder headers. Then connect the USB cable between the converter and your computer.
24+
25+
<div style="text-align: center;">
26+
<table>
27+
<tr style="vertical-align:middle;">
28+
<td style="text-align: center; vertical-align: middle;"><a href="../assets/img/CH340_stackable_header_BlueSMiRF-v2.jpg"><img src="../assets/img/CH340_stackable_header_BlueSMiRF-v2.jpg" width="600px" height="600px" alt="USB-to-Serial Converter (CH340) to BlueSMiRF v2 Header with an Additional Stackable Header"></a></td>
29+
</tr>
30+
<tr style="vertical-align:middle;">
31+
<td style="text-align: center; vertical-align: middle;"><i>USB-to-Serial Converter (CH340) to BlueSMiRF v2 Header with an Additional Stackable Header</i>
32+
</td>
33+
</tr>
34+
</table>
35+
</div>
36+
37+
Open a serial terminal and connect to the COM port at **115200 baud**. Type <kbd>$$$</kbd> within 60 seconds of powering the BlueSMiRF to enter command mode.
38+
39+
<div style="text-align: center;">
40+
<table>
41+
<tr style="vertical-align:middle;">
42+
<td style="text-align: center; vertical-align: middle;"><a href="../assets/img/BlueSMiRF_v2_AT_Commands_1_b.JPG"><img src="../assets/img/BlueSMiRF_v2_AT_Commands_1_b.JPG" width="600px" height="600px" alt="BlueSMiRF v2 Connected to Serial Terminal and in Command Mode"></a></td>
43+
</tr>
44+
<tr style="vertical-align:middle;">
45+
<td style="text-align: center; vertical-align: middle;"><i>BlueSMiRF v2 Connected to Serial Terminal and in Command Mode</i></td>
46+
</tr>
47+
</table>
48+
</div>
49+
50+
Type <kbd>AT-SerialSpeed=9600</kbd> to change the baud rate to match the SerLCD's baud rate (which is set to 9600 baud by default). Enter <kbd>ATW</kbd> to save the settings.
51+
52+
<div style="text-align: center;">
53+
<table>
54+
<tr style="vertical-align:middle;">
55+
<td style="text-align: center; vertical-align: middle;"><a href="../assets/img/BlueSMiRF_Changing_Baud_Rate_9600.JPG"><img src="../assets/img/BlueSMiRF_Changing_Baud_Rate_9600.JPG" width="600px" height="600px" alt="Configuring the Baud Rate of the BlueSMiRF v2"></a></td>
56+
</tr>
57+
<tr style="vertical-align:middle;">
58+
<td style="text-align: center; vertical-align: middle;"><i>Configuring the Baud Rate of the BlueSMiRF v2</i></td>
59+
</tr>
60+
</table>
61+
</div>
62+
63+
Now that the first BlueSMiRF v2 is configured, repeat the same steps explained above to change the baud rate of the second BlueSMiRF v2.
64+
65+
66+
67+
### Hardware Hookup
68+
69+
Replacing the connection with the BlueSMiRFs is similar to the basic serial UART connection listed earlier in this tutorial. We'll be using it as a guide to wire everything up. Since the SerLCD is only receiving data to display, we only need to use its RX pin.
70+
71+
From the microcontroller, you will need to wire the following pins. Since the BlueSMiRF v2 includes logic level circuitry on the TX and RX pins, we can wire the SparkFun RedBoard Plus directly to the pin when the switch for the microcontroller's logic level is set to 5V. Notice that we are only wiring software serial TX pin since we are just sending characters from the microcontroller to the SerLCD. Users that want to also connect software serial RX pin can also wire the connection to the BlueSMiRF v2's TXO but it is not necessary. We will assume that we are using power supplied from a USB port or USB power supply.
72+
73+
<div style="text-align: center;">
74+
<table>
75+
<tr>
76+
<th style="text-align: center; border: solid 1px #cccccc;">SparkFun RedBoard Plus<br />(ATmega328P) Pinout
77+
</th>
78+
<th style="text-align: center; border: solid 1px #cccccc;">Transmitting BlueSMiRF v2<br />Pinout
79+
</th>
80+
</tr>
81+
<tr>
82+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#cce5ff"><font color="#000000">7</font>
83+
</td>
84+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#cce5ff"><font color="#000000">RXI</font>
85+
</td>
86+
</tr>
87+
<tr>
88+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#f2dede"><font color="#000000">5V</font>
89+
</td>
90+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#f2dede"><font color="#000000">VCC</font>
91+
</td>
92+
</tr>
93+
<tr>
94+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#DDDDDD"><font color="#000000">GND</font>
95+
</td>
96+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#DDDDDD"><font color="#000000">GND</font>
97+
</td>
98+
</tr>
99+
</table>
100+
</div>
101+
102+
On the SerLCD side, we can simply insert the BlueSMiRF v2 in the SerLCD's USB-to-serial 1x6 header. For users that are using the BlueSMiRF v2 with headers and soldered male header pins on the SerLCD, you can place them in a breadboard. A 9V power supply and barrel jack adapter was used to power both boards. The + pin from the adapter was connected to the SerLCD's RAW pin which is regulated down to 3.3V. Of course, the - pin from the adapter was also connected for reference ground.
103+
104+
<div style="text-align: center;">
105+
<table>
106+
<tr>
107+
<th style="text-align: center; border: solid 1px #cccccc;">Receiving BlueSMiRF v2<br />Pinout
108+
</th>
109+
<th style="text-align: center; border: solid 1px #cccccc;">SparkFun 16x2 SerLCD<br />RGB Backlight (Qwiic) Pinout
110+
</th>
111+
<th style="text-align: center; border: solid 1px #cccccc;">Power Supply (5V TO 9V)<br />with Barrel Jack Adapter
112+
</th>
113+
</tr>
114+
<tr>
115+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#cce5ff"><font color="#000000">TXO</font>
116+
</td>
117+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#cce5ff"><font color="#000000">RX</font>
118+
</td>
119+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#ffffff"><font color="#000000"></font>
120+
</td>
121+
</tr>
122+
<tr>
123+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#f2dede"><font color="#000000">VCC</font>
124+
</td>
125+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#f2dede"><font color="#000000">+</font>
126+
</td>
127+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#ffffff"><font color="#000000"></font>
128+
</td>
129+
</tr>
130+
<tr>
131+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#ffffff"><font color="#000000"></font>
132+
</td>
133+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#f2dede"><font color="#000000">RAW</font>
134+
</td>
135+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#f2dede"><font color="#000000">+, Center Positive Pin</font>
136+
</td>
137+
</tr>
138+
<tr>
139+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#DDDDDD"><font color="#000000">GND</font>
140+
</td>
141+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#DDDDDD"><font color="#000000">GND</font>
142+
</td>
143+
<td style="text-align: center; border: solid 1px #cccccc;" bgcolor="#DDDDDD"><font color="#000000">-, Sleeve</font>
144+
</td>
145+
</tr>
146+
</table>
147+
</div>
148+
149+
If you have not already, make sure to upload the Arduino example code from the basic serial UART example. For your convenience, the code shown below was pulled from the [OpenLCD's Serial Examples folder](https://github.com/sparkfun/OpenLCD/blob/master/firmware/Examples/Serial/Example1_Serial_Basic/Example1_Serial_Basic.ino). Select the board (in this case, the **Tools** > **Board** > **Arduino AVR Boards (arduino) > Arduino Uno**) and COM port that the board enumerated to. Then hit the upload button.
150+
151+
``` c++ linenums="1"
152+
--8<-- "https://raw.githubusercontent.com/sparkfun/OpenLCD/master/firmware/Examples/Serial/Example1_Serial_Basic/Example1_Serial_Basic.ino"
153+
```
154+
155+
With both boards powered, follow the steps to [pair and connect the two BlueSMiRFs together](/button/pairing-mode). If all is well, you should see the RedBoard Plus transmitting the same message to the SerLCD. Instead of a wired connection, a pair of BlueSMiRF's were used!
156+
157+
<div style="text-align: center;">
158+
<table>
159+
<tr style="vertical-align:middle;">
160+
<td style="text-align: center; vertical-align: middle;"><a href="../assets/img/24113-RedBoard_ATMega328P_Plus_BlueSMiRF_V2_RGB_SerLCD.jpg"><img src="../assets/img/24113-RedBoard_ATMega328P_Plus_BlueSMiRF_V2_RGB_SerLCD.jpg" width="600px" height="600px" alt="Wireless Serial LCD"></a></td>
161+
</tr>
162+
<tr style="vertical-align:middle;">
163+
<td style="text-align: center; vertical-align: middle;"><i>Wireless Serial LCD with the RedBoard Plus</i>
164+
</td>
165+
</tr>
166+
</table>
167+
</div>
168+
169+
Try adding a Qwiic-enabled device like the Human Presence and Motion Sensor - (STHS34PF80) to the RedBoard Plus and writing code to display a message notifying you when someone has passed by a door. Then place the SerLCD by your desk so that you can monitor the traffic.
25.7 KB
Loading
59 KB
Loading

0 commit comments

Comments
 (0)