Coming Soon...
Part | Description |
---|---|
Development Board | • STM32F103C8T6 • Wemos D1 Mini |
Code Editor | Arduino IDE |
Programmer Tools | ST-Link/V2 |
Serial Communication Tools | FTDI USB |
Driver | • ST-Link USB Driver • CDM FTDI USB Driver • CH340 USB Driver |
Application Support | Whatsapp Bot |
IoT Platform | • Twilio • ThingESP |
Communications Protocol | • Serial Peripheral Interface (SPI) • Hypertext Transfer Protocol (HTTP) |
IoT Architecture | 4 Layer |
Programming Language | C/C++ |
Arduino Library | • SPI (default) • ThingESP |
Sensor | • MH-RD: Raindrop Sensor (x1) • LDR: Luminous Intensity Sensor (x1) • LM35: Air Temperature Sensor (x1) |
Other Components | • Micro USB cable - USB type A (x1) • Jumper cable (1 set) • Breadboard (x1) |
-
Arduino IDE
https://bit.ly/ArduinoIDE_Installer
-
CDM FTDI USB Driver
https://bit.ly/CDM_FTDI_USB_Driver
-
ST-Link USB Driver
https://bit.ly/STLink_USB_Driver
-
STM32CubeProgrammer
https://bit.ly/STM32_Cube_Programmer_Installer
-
CH340 USB Driver
https://bit.ly/CH340_USB_Driver
Block Diagram | Infrastructure |
---|---|
Pictorial Diagram | Wiring |
---|---|
Basically, a device can be communicated with other devices either wirelessly or by cable. Communication between commonly used hardware is Serial Communication
. It can be known that there are three types of Serial Communication
, which include: UART (Universal Asynchronous Receiver-Transmitter)
, SPI (Serial Peripheral Interface)
, and I2C (Inter Integrated Circuit)
. The Serial Peripheral Interface (SPI)
is a synchronous serial communication
used by microcontrollers to communicate with one or more peripheral devices in close proximity. It can also be used for communication between two microcontrollers. SPI Serial Communication
allows a device to act as a master
or slave
. The Master
is the primary device that has full authority over the control of the Slave, while the Slave
is the secondary device that is under the authority of the Master device. SPI communication
requires 3 lines namely MOSI
, MISO
, and SCK
. MOSI (Master Output Slave Input)
means that if configured as a master
then the MOSI pin acts as an output
, but if configured as a slave
then the MOSI pin acts as an input
. MISO (Master Input Slave Output)
means that if configured as a master
then the MISO pin acts as an input
, but if configured as a slave
then the MISO pin acts as an output
. CLK (Clock)
means that if configured as a master
then the CLK pin acts as an output
, but if configured as a slave
then the CLK pin acts as an input
.
-
Open the
Arduino IDE
first, then open the project by clickingFile
->Open
:•
Master.ino
•
Slave.ino
-
Fill in the
Additional Board Manager URLs
in Arduino IDEClick
File
->Preferences
-> enter theBoards Manager Url
by copying the following link :https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json http://arduino.esp8266.com/stable/package_esp8266com_index.json
-
Board Setup
in Arduino IDEi
How to setup the
STM32F103C8T6
board• Click
Tools
->Board
->Boards Manager
-> InstallSTM32 MCU based boards
.• Then click
Tools
->Board
->STM32 boards groups
->Generic STM32F1 series
.ii
How to setup the
Wemos D1 Mini
board• Click
Tools
section ->Board
->Boards Manager
-> Installesp8266
.• Then click
Tools
->Board
->ESP8266 Boards
->Wemos D1 Mini
.
-
Change the Board Speed
in Arduino IDEi
How to change the speed of
STM32F103C8T6
boardClick
Tools
->Upload Speed
->9600
ii
How to change the speed of
Wemos D1 Mini
boardClick
Tools
->Upload Speed
->115200
-
Change Board Part Number
in Arduino IDEHow to change Board Part Number of
STM32F103C8T6
boardClick
Tools
->Board part number
->BluePill F103C8
-
Change U(S)ART Support
in Arduino IDEHow to change U(S)ART Support of
STM32F103C8T6
boardClick
Tools
->U(S)ART Support
->Enabled (generic 'Serial')
-
Change Upload Method
in Arduino IDEHow to change Upload Method of
STM32F103C8T6
boardClick
Tools
->Upload method
->STM32CubeProgrammer (SWD)
-
Install Library
in Arduino IDEDownload all the library zip files. Then paste it in the:
C:\Users\Computer_Username\Documents\Arduino\libraries
-
Port Setup
in Arduino IDEClick
Port
-> Choose according to your device port(you can see in device manager)
-
Change the
WiFi Name
,WiFi Password
, and so on according to what you are currently using. -
Before uploading the program please click:
Verify
. -
If there is no error in the program code, the next step is to use the
STM32
programming tool according to the procedure. Then click:Upload
. WhileWemos D1 Mini
can be done directly without using programming tools. -
If there is still a problem when uploading the program, then try checking the
driver
/port
/programmer tool
/others
section.
Notes:
• The JTAG or • You can see the wiring between the • To upload the program, besides using the • Based on experience, I admit that using the |
Notes:
• Serial communication on this • You can see the wiring between the • Based on experience, I admit that using |
-
Getting started with Twilio :
• Go to the following url: Click Here.
• Click
Log in
to access the service.• if you do not have an account, then click
Sign up
.
-
Fill in all the required fields.
-
Verify your
phone number
andemail
. -
Access the
WhatsApp sandbox
in theSettings
menu andsend the code
to theprovided WhatsApp number
.
-
Getting started with ThingESP :
• Go to the following url: Click Here.
• Click
Login
to access the service.• if you do not have an account, then click
Create Account
.
-
Fill in all required fields.
-
Click
Project
in the sidebar -> then selectAdd New Project
. -
After the project has been created, enter the
Twilio WhatsApp Endpoint URL
intoThingESP
to connect.
-
Download and extract this repository.
-
Make sure you have the necessary electronic components.
-
Make sure your components are designed according to the diagram.
-
Configure your device according to the settings above.
-
Please enjoy [Done].
Via Whatsapp: Weathersia Bot
Device |
---|
Whatsapp Bot | |
---|---|
You can download the component test file via the following link: Click Here
If this work is useful to you, then support this work as a form of appreciation to the author by clicking the ⭐Star
button at the top of the repository.
This application is my own work and is not the result of plagiarism from other people's research or work, except those related to third party services which include: libraries, frameworks, and so on.
MIT License - Copyright © 2024 - Devan C. M. Wijaya, S.Kom
Permission is hereby granted without charge to any person obtaining a copy of this software and the software-related documentation files to deal in them without restriction, including without limitation the right to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons receiving the Software to be furnished therewith on the following terms:
The above copyright notice and this permission notice must accompany all copies or substantial portions of the Software.
IN ANY EVENT, THE AUTHOR OR COPYRIGHT HOLDER HEREIN RETAINS FULL OWNERSHIP RIGHTS. THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, THEREFORE IF ANY DAMAGE, LOSS, OR OTHERWISE ARISES FROM THE USE OR OTHER DEALINGS IN THE SOFTWARE, THE AUTHOR OR COPYRIGHT HOLDER SHALL NOT BE LIABLE, AS THE USE OF THE SOFTWARE IS NOT COMPELLED AT ALL, SO THE RISK IS YOUR OWN.