STM32 With HC-05 Bluetooth Module Using Devices Control
STM32 With HC-05 Bluetooth Module Using Devices Control
CONTROL
Lcd connections
Stm32 BT
A9 TX
A10 RX
OUTPUTS
B5,B6,B7
Description
STM32 Blue Pill is a high-performance, breadboard friendly development board with loads
of features in a small form factor. It features a 32-bit ARM Cortex M3 processor running at
72MHz frequency with 64Kbytes of flash memory and 20 Kbytes of SRAM. It has an
extensive range of I/O and peripherals, including multi-channel Direct Memory Access,
several high resolution ADC, and three general purpose 16-bit timers plus one PWM timer. It
also has multiple communication interfaces including two I2Cs and SPIs, three UARTs, an
USB and a CAN. Further, it allows you to add additional flash by soldering an SPI Flash to
the board.
This development board is pre-flashed with an Arduino bootloader, so you can download the
sketch just like other Arduino board.
The STM32 Blue Pill can be programmed using either the Type-C USB connector (if
bootloader is flashed), the STLink USB dongle, or an external USB to 3.3V TTL adapter.
A set of 2.5mm pitch male headers is included (soldering is required).
Check out the following tutorial for detailed instructions on how to program the STM32 Blue
Pill with Arduino IDE:
Program STM32 Blue Pill (STM32F103C8T6) with Arduino IDE
Note: This board does not support microPython. Not all I/O pins are 5V tolerant - refer to the
pinout diagram for details.
Features:
STM32F103C8T6, 72 MHz ARM Cortex-M3
64K Flash, 20K SRAM.
32.768KHz crystal for RTC
3 buttons: user, boot and reset
USB type-c connector
32 digital I/O Pins (12 of which are PWM)
14 Analog Inputs
3 UART Ports
2 I2C Ports
2 SPI Ports
Serial Bluetooth Terminal for Android
Developer's Description
- Bluetooth Classic
- Raspberry Pi 3
- ...
- predefined:
* Telit Bluemod
- custom profile:
* Silabls BLE113
* ...
All features in this app are free. In-App purchase is only used for the
'Donate' option.
Looking for source code? Here you find simplified variants of this app:
https://github.com/kai-morich/SimpleBluetoothTerminal
https://github.com/kai-morich/SimpleBluetoothLeTerminal
l if
NOW
Full Specifications
WHAT'S NEW IN VERSION 1.24
GENERAL
ReleaseJune 7, 2019
Version1.24
OPERATING SYSTEMS
Operating SystemsAndroid
Description of pins
Enable - This pin is used to set the Data Mode or and AT command mode (set high).
VCC - This is connected to +5V power supply.
Ground - Connected to ground of powering system.
Tx (Transmitter) - This pin transmits the received data Serially.
Rx (Receiver) - Used for broadcasting data serially over bluetooth.
State -Used to check if the bluetooth is working properly.
Modes of Operation
The HC-05 Bluetooth Module can be used in two modes of operation: Command Mode and
Data Mode.
Command Mode
In Command Mode, you can communicate with the Bluetooth module through AT
Commands for configuring various settings and parameters of the Module like get the
firmware information, changing Baud Rate, changing module name, it can be used to set it as
master or slave.
A point about HC-05 Module is that it can be configured as Master or Slave in a
communication pair. In order to select either of the modes, you need to activate the
Command Mode and sent appropriate AT Commands.
Data Mode
Coming to the Data Mode, in this mode, the module is used for communicating with other
Bluetooth device i.e. data transfer happens in this mode.
Name: HC-05
Type: Slave
Mode: Data
Baud Rate: 9600 with 8 data bits, no parity and 1 stop bit
Motor Driver L293D:
To control two dc motors at the same time here two H-Ground motors is used which
gives permissions to DC motors. L293d has H- bridge module which allows to control every
direction of dc motors and speed. Here enables line is used to turn on and turn off the speed
of all motors and motor drivers. It has 4 output pins and 4 input pins to control the motors
independently and easily without any interruptions. Here TTL logic levels is designed to
undertake heavy loads. L293d motor driver can handle the voltages from 5volts to 35volts
easily and freely. To run the DC motors in any voltages motor driver can help to motors to
convert low voltages to high voltages without any disturbances.
Control Pins
1 IN1 These pins are input pins of Motor A. These are
used to control the rotating direction of Motor A.
When one of them is HIGH and the other is LOW,
Motor A will start rotating in a particular direction.
If both the inputs are either HIGH or LOW the
2 IN2 Motor A will stop.
3 IN3 These pins are input pins of Motor B. These are
used to control the rotating direction of Motor A.
When one of them is HIGH and the other is LOW,
4 IN4 Motor A will start rotating in a particular direction.
If both the inputs are either HIGH or LOW the
Motor A will stop.
CODE:
#define RM1 PB7
#define HL PB5
#define HS PB4
char data = 0;
void setup() {
Serial1.begin(9600);
pinMode(RM1,OUTPUT);
pinMode(RM2,OUTPUT);
pinMode(LM1,OUTPUT);
pinMode(LM2,OUTPUT);
pinMode(HL,OUTPUT);
pinMode(HS,OUTPUT);
void loop() {
if(Serial1.available()> 0)
data = Serial1.read();
if(data == 'H')
digitalWrite(HL,HIGH);
r4e9
digitalWrite(HL,LOW);
digitalWrite(HS,HIGH);
digitalWrite(HS,LOW);
}
if(data == 'F')
digitalWrite(RM1,HIGH);
digitalWrite(RM2,LOW);
digitalWrite(LM1,HIGH);
digitalWrite(LM2,LOW);
digitalWrite(RM1,LOW);
digitalWrite(RM2,HIGH);
digitalWrite(LM1,LOW);
digitalWrite(LM2,HIGH);
digitalWrite(RM1,HIGH);
digitalWrite(RM2,LOW);
digitalWrite(LM1,LOW);
digitalWrite(LM2,HIGH);
digitalWrite(RM1,LOW);
digitalWrite(RM2,HIGH);
digitalWrite(LM1,HIGH);
digitalWrite(LM2,LOW);
9digitalWrite(RM1,LOW);
digitalWrite(RM2,LOW);
digitalWrite(LM1,LOW);
digitalWrite(LM2,LOW);
delay(100);