Difference between revisions of "BLK IO"

From ElectroDragon
Jump to: navigation, search
Line 5: Line 5:
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|-
 
|-
! Pin !! MCU PIN !! CMD
+
! Pin !! MCU PIN !! CMD !! Note
 
|-
 
|-
| 1 || PB5 || 1N - 1F
+
| 1 || PB5 || 1N - 1F ||
 
|-
 
|-
| 2 || PB4 || 2N - 2F
+
| 2 || PB4 || 2N - 2F ||
 
|-
 
|-
| 3 || PC3 || 3N - 3F
+
| 3 || PC3 || 3N - 3F ||
 
|-
 
|-
| 4 || PC4 || 4N - 4F
+
| 4 || PC4 || 4N - 4F ||
 
|-
 
|-
| 5 || PC5 || 5N - 5F
+
| 5 || PC5 || 5N - 5F ||
 
|-
 
|-
| 6 || PC6 || 6N - 6F
+
| 6 || PC6 || 6N - 6F ||
 
|-
 
|-
| 7 || PC7 || 7N - 7F
+
| 7 || PC7 || 7N - 7F ||
 
|-
 
|-
| 8 || PD3 || 8N - 8F || Also connected to Bluetooth status LED pin
+
| 8 || PD3 || 8N - 8F || Also connected to Bluetooth status LED pin (1)
 
|-
 
|-
| 9 || PD2 || 9N - 9F
+
| 9 || PD2 || 9N - 9F ||
 
|-
 
|-
| 0 || PD4 || 0N - 0F
+
| 0 || PD4 || 0N - 0F ||
 
|-
 
|-
| A || PA1 || AN - AF
+
| A || PA1 || AN - AF ||
 
|-
 
|-
| B || PA2 || BN - BF
+
| B || PA2 || BN - BF ||
 
|-
 
|-
| C || PA3 || CN - CF
+
| C || PA3 || CN - CF ||
 +
|}
 +
# When Bluetooth made connection, BT status LED will keep constant high, you can not write it low, notice. But you can read the BT status via this pin.
 +
== Serial Debugging ==
 +
* Bluetooth connect to serial debugger, board TX to cable RX, board RX to cable TX:
 +
{| class="wikitable sortable"
 +
|-
 +
! Receive !! Action !! Send from !! example
 +
|-
 +
| Serial monitor || only response < || Phone CMD || "N1"
 +
|-
 +
| Serial monitor || NOT response < || Serial monitor CMD || "N1"
 +
|-
 +
| Phone || get < || MCU feedback || "you sent the message is ..."
 +
|-
 +
| Serial monitor || NOT get < || MCU feedback || "you sent the message is ..."
 
|}
 
|}
  
 
[[category: Bluetooth]]
 
[[category: Bluetooth]]

Revision as of 04:23, 11 December 2017

Control Commands

  • Pin Definition
  • All pins connect to ground pin of LED
Pin MCU PIN CMD Note
1 PB5 1N - 1F
2 PB4 2N - 2F
3 PC3 3N - 3F
4 PC4 4N - 4F
5 PC5 5N - 5F
6 PC6 6N - 6F
7 PC7 7N - 7F
8 PD3 8N - 8F Also connected to Bluetooth status LED pin (1)
9 PD2 9N - 9F
0 PD4 0N - 0F
A PA1 AN - AF
B PA2 BN - BF
C PA3 CN - CF
  1. When Bluetooth made connection, BT status LED will keep constant high, you can not write it low, notice. But you can read the BT status via this pin.

Serial Debugging

  • Bluetooth connect to serial debugger, board TX to cable RX, board RX to cable TX:
Receive Action Send from example
Serial monitor only response < Phone CMD "N1"
Serial monitor NOT response < Serial monitor CMD "N1"
Phone get < MCU feedback "you sent the message is ..."
Serial monitor NOT get < MCU feedback "you sent the message is ..."