Translated from Thai to English - www.onlinedoctranslator.
com
- -------------------------------------------------- ------------------------------1
------ ------------------
--------------------------------------
-------------------------- -----
Innovative Experiment Co.,Ltd
2--- --------------------------------------------------- ---------------------------
------ -
--- - ------ ----------
It is a 32 bit microcontroller board that can be connected to the USB port to communicate data.
and upload programs. Use hardware and software from open source microcontroller
projects. That's rightArduino (www.arduino.cc)Let's adjust and update the file. A
language for many hardware-hardware creditors to allow them to program their devices.
without having to study into the details of the microcontroller.
All components of the board are shown in Fig. 1-1, as summarized below.
-Use a small microcontroller.32 Number - STM32F103CBT6 Flash memory
128KB Reprogram 10,000 times Memory 20KB RAM 20MHz clock signal
RUPU T1-1 Components of the board
- -------------------------------------------------- ------------------------------3
-Take note of the port-a-typeJST 3 Pin 11 Write down the device card, detect it and the device connected.
-There are LEDs to indicate the power status, battery warning, and USB port connection status.
-NSTDA-RESET
-mjot-por-tUSB 2
Point 1, upper body: SWDUse to download the program throughSerial Debug Wire (SWD)
Point 2 Symbol : COMUse the computer communications protocol.
-Connecting to the fire through the connection to the cable.6 to 9V NSTDA
-Use the battery. Polmer-Dai-Song Sod2 cell (7.4V with 8.4V mi-gain)
-light control circuit3.3V to supply microcontroller, OLED display
and take note of
-Jot-por-at-pot-out-tap-digital or analog9 Throat A0 to A8 (Front Pin PA0
to PA7 and PB0) Compatible with external routers
-Connected to a digital port, supports the bus system.I2C 2 Set of necks connected to the SDA and SCL connected to the band.
By using a PH4-type connector, connect the GROVE pin.
-Connect to the communication port of the UART port, connect to the port PB7 (RxD) and PB6 (TxD).
-motor circuit - direct light4 channels with LED to indicate working status yes - continue pattern
2-pin IDC connector and 2-pin terminal block to support 3 to 9V DC motors. Due
to 1.5A per channel, no fresh gain, 2A circuit from gain current.
-The main port of the microcontroller for driving a 6-channel servo motor is SERVO1.
(PB10), SERVO2 (PB3), SERVO3 (PC15), SERVO4 (PC14), SERVO5 (PA15) and SERVO6 (PB11).
-Malaphong pe-so for snorting by plugging in the port legs.PB5
-available displayOLED 1.5 new resolution 128x64 Take note, display graphs, lines and
The display area is a normal-sized font (5x7 jot) No.- 21 letters, 8 lines, contact- through the school I2C
-University of Science and Technology3 Take
1. NSTDA-OK(button-salong) against-- together with the anti-corrosion- (KNOB) which connects
to the PB1 port, causing the business to losedigital and analog signals in the same port
2. NSTDA-A(pu-mss-m) stump- frog legs Port-tPC13 and a blue LED to indicate the lock status.
3. NSTDA-B(white button) stump-frog legs port-tPB2 and green LED to indicate lock status
-resistance circuitKNOBwith a clap button to use for testing converter circuits
The analog signal is on the board.OK
4--- - ------------------------------------------------- ----------------------------
------ -
-----------------------Arduino IDE
Program development for board Here, use the C/C++ programming language using
An open-system platform called Arduino, a simple software program, the Arduino IDE that manages the whole
process with just one program, since The section for generating the C/C++ code, the standard library, the C/C+
+ compiler or compiler, the compiler, and the uploading section. The code went to write it into memory.
Program of Microcontroller - In this chapter presents the steps for installing the Arduino program to test the
basics.
2.1 Installing the Arduino IDE Software on Windows
2.1.1 Installing the Arduino IDE and USB Drivers
(1) Connect your computer to another network, then open your web browser. Web site
ArduinoThttps://www.arduino.cc from SOFTWARE According to Figure 2-1
Fig. 2-1 Arduino Web
- -------------------------------------------------- ------------------------------5
Figure 2-2 shows downloading selections for downloading the software for Arduino IDE version 1.8.x.
(2) Move the bar down to the bottom of the page.Legacy IDEselect listWindows Win 7 and Newerto
download-download the file-installation-software-Arduino IDE version 1.8.X as in Figure 2-2 for computer-old
version If it is a new computer with an operating system installedWindows 64 and using SSD hard drive,
it is recommended to install version 2.0.x or later, see Figure 2-3.
Figure 2-3 shows downloading selections for downloading the software for Arduino IDE version 2.0.x.
6--- - ------------------------------------------------- ----------------------------
Figure 2-4 shows a window explaining - accepting the rights - Figure 2-5 Page 2 Select components of the program Arduino IDE
before starting - installing the Arduino IDE program. that needs to be installed.
(3) Then a window will appear to choose Download-Load or choose to support program development.
Click on the button JUST DOWNLOAD to download-load the file-install
(4) Press the button to flash the software, the Arduino IDE will appear for you to start. Installing Program
Arduino IDE according to Figure 2-4
(5) Then a window for selecting program components to be installed appears.
According to the plan 2-5, press the button.Next
(6) The Select Folder-For Program Setup window appears, figures 2-6 appear. Click the button. Install to
start the installation ProgramArduino
(7) Then wait until the installation of the program is complete according to Figure 2-7. Click
the button.Close
Fig. 2-6 Window for selecting folder-installation program Figure 2-7 shows that the program installation of Arduino
IDE is complete.
- -------------------------------------------------- ------------------------------7
2.1.2 Installing hardware and libraries for the board
After installing the program in the Arduino IDE, it's done. Next, to make the program in the Arduino
IDE run on the board, add a request. It provides hardware solutions and publishes a library for developing
programs in C/C++ to the Arduino IDE. Another thing to upload program of Arduino IDE can upload the code
to the board.
(1) Open the program Arduino IDE, the main page of the program appears. Arduino IDE
Dangarput2-8
(2) Legmen File > Preferences… according to the schedule2-9
(3) AppearancePreferencesAppeared according to the route2-10 Perform the following
settings ๐ Click the item.Verify code after uploadto remove the check mark ๐ Click on the
listCheck for updates on startupto remove the check mark ๐ itemAdditional Boards
Manager URLs:set as
https://github.com/INEXdev/ArduinoSTM32/raw/main/package_inex_stm32_index.json
From Nanklakpu-m OK To change settings
Figure 2-8 Main page of program Arduino IDE
8--- - ------------------------------------------------- ----------------------------
Figure 2-9: Opening Preferences page of program Arduino IDE
Figure 2-10 shows the settings in the Preferences page to prepare for the setup of the board.
- -------------------------------------------------- ------------------------------9
(4) LegmenTools > Board:xxx > Boards Manager…according to the schedule2-11
(5) AppearanceBoards ManagerAppeared in a row2-12 givingINEX
will find a list of b-amon via hardware-dware-nameINEX_STM32which included
Do-o-o-o from Nanklok Pu-mInstallfor installation
(6) He-scoo-library installation process Wait until the installation is complete - then close the program.
Arduino IDE
Figure 2-11 shows menu selection. Tools>Board:xxx>Boards Manager…
Figure 2-12 shows the BoardsManager page. For the library and hardware help of INEX_STM32
10--- - ------------------------------------------------- ----------------------------
2.1.3 Install STM32 Cube Programmer
board It uses to program or enter data into the program memory of the micro.
Controller - STM32F103 with processSerial Wire DebuggerorSWDon the board The part of the SWD
circuit already connected to the USB port of the computer, so it's very possible to download the code
from the Arduino IDE. Pyeongmai-Kewanat
Software to be used in this SWD processprogramSTMicroelectronics'
STM32CubeProgrammerGet started with the software preparation at this stage.
(1) Connect the computer to another network, and then open the web browser to access it.
STMicroelectronics website, follow the link here.
https://www.st.com/en/development-tools/stm32cubprog.html
(2) Program web pageSTM32CubeProgrammershow2-13 Select icons
to enter the system because of the download-loading of the program STM32CubeProgrammer Required to be
logged in or a member of STmicroelectronics. Before you can download-use it.
(3) Kornlee registers on the website-www.st.comWy-before-and-w Give-fill your email address and password.
and thenLoginto enter the system, then skip to the step (9) All right. In case of using it for the first time, click the
button.Create AccountDong Pathee2-14
Figure 2-13 STM32CubeProgrammer web page
- -------------------------------------------------- ------------------------------11
RUPT 2-14 System Integration
Raput 2-15 Gene registration form on the website - www.st.com
12--- - ------------------------------------------------- ----------------------------
RTP 2Y-1 use
(4) will go to the registration page according to the form 2-15, fill in the form Give me a request to register.
From Nanklakpu-mRegister
(5) An email will be sent to the registrant. It may take up to one minute (maybe up to 15 minutes).
Mail response, please click the button to register.FeedbackOn the other hand--to the right of the website-to clarify the problem of
register
(6) If there is no error, the registrant will receive an email as shown in Figure 2-16. Click the button.Validate now
To confirm your registration and to open an account for the STMicroelectronics website (www.st.com).
2-17 page- web page of setting a password for registering- access information on the website- www.st.com
- -------------------------------------------------- ------------------------------13
Figure 2-18 shows access to the STMicroelectronics website. After successfully logging into the system
(7) The system will enter the registration according to the form 2-17, set the password and click the button.
SubmitFriends Completion of gene registration
(8) Once he has compiled the system, it will automatically return to the default interface. Notice that the app icon appears.
fishyHiand followed by the name of the person who made the project2-18
(9) Then go to the web page ofSTM32CubeProgrammertimehttps://www.st.com/en/
development-tools/stm32cubprog.htmlAgain, then- scroll down the page until you find the list.Get
Software plsSTM32CubePrg-W64byGet Lastto select the version-chanal-sue will start- downloading on a
file-.zip
(10) Extract the .zip file and go into the folder where the extracted file was made. Double-click the file.
SetupSTM32 CubeProgrammer_win64.exefor him- sc- re-edit the programSTM32 Cube Programmer
(11) Moo 9 Khanya-Doi Dongni
14--- - ------------------------------------------------- ----------------------------
[1] Entering the STM32CubeProgrammer
installation window, click the button.Next
[2] He-shu-na-ta-shows the request page. Click the button.Next
[3] ST Lex's License Agreement Window I
accept the terms of this license agree ment.
and thenNext
[4] Notice page of ST's Privacy Policy
and ST's Terms of Use.I have read and
understood the ST Privacy Policy and
ST Terms of Useand thenNext
- -------------------------------------------------- ------------------------------15
[5] Other appearancesPathor location for installation
Program STM32CubeProgrammer from Naklakki Pum-m
Next
[6] Khao- Soo- Na- Ta- LekComponentsin the installation
Program STM32CubeProgrammer, click the button. Next
to enter the installation program, wait until Don't forget
to finish
[7] During the installation, a window prompting to install
drivers appears. Click on all responses. When the installation
is complete, click the button.Next
16--- - ------------------------------------------------- ----------------------------
[8] When installing the program, you will see the
Configuring window.Shortcutsof the programSTM32
Cube ProgrammerDoing klapmu-Next
[9] The last step is to display the
STM32CubeProgrammer setup notification
window. Click the button.Done
2.1.4 Test upload program to board
The next step is to test the upload program to the driver. For more information, please refer to the installation.
Make sure that the hardware and libraries on the board to program the Arduino IDE are correct and ready to use.
(1) Connect the USB cable to the upper USB port of the SWD module on board diagrams 2-19 to
Connect board to computer.
(2) Supply power to board and P-DST-POWER
(3) The main window of the program Arduino IDE, select menu.Tools > Board:xxx > INEX STM32
> POP-32according to the schedule2-20
(4) Select the method of downloading the code by selecting the menu.Tools > Upload method > STM32Cube
Programmer (SWD)according to the schedule2-21
(5) Pp-code according to program 2-1 for testing the operation. From Nanklakpu-mUpload
- -------------------------------------------------- ------------------------------17
RUPT 2-19 Boarding He - to the computer to upload the program.
Route 2-20 shows selecting the board - POP-32, which can be used with the board. and
18--- --------------------------------------------------- ---------------------------
Figure 2-21 shows the selection method for uploading the program to STM32 Cube Programmer for
# include <POP32.h>
void setup()
{
oled.text(0,0,”Hello POP-32");
oled.show();
}
void loop()
{}
Program 2-1 Code-Language C/C++ for testing the display of the display request of the board.
Route 2-22 shows program upload successful when running on the board.
- -------------------------------------------------- ------------------------------19
(6) When the program is uploaded, the program status window will show the status.
Compiling - Uploading the Program and the status of uploading the program, DD 2-22, then
the board will work hard
board show requestHello POP-32T displayOLED
20--- - ------------------------------------------------- ----------------------------
2.2 Installing the Arduino IDE Software on MAC OS X
2.2.1 Installing the Arduino IDE
Makan Dongni
(1) Connect - computer - MAC to the Internet. From Nanpe-Dweb-Browser-Paiyon
website-Arduinotimehttps://www.arduino.ccThen click on the head.SOFTWAREaccording to the schedule2-23
Route 2-24 is shown, press the download file to install the software Arduino IDE for MAC OS X.
- -------------------------------------------------- ------------------------------21
Figure 2-25 shows the JUST DOWNLOAD key for downloading the software for the Arduino IDE.
(2) After that, the window will appear as shown in Figure 2-25.JUST DOWNLOADto download
File-editing will get-file-.zip
(4) Double-click the .zip file to extract the file from the application.Arduinowill be brought along
RP 2-26
(5) For the sake of the classification of the application, it is recommended that the applicationArduinogo
Sensitivity toApplicationsof computer-MAC according to the path 2-27, from here we can use the Arduino IDE.
Route 2-26 shows an Arduino
application for use.
22--- - ------------------------------------------------- ----------------------------
RUPT 2-27 Show Applications Arduino, please go to store in the Applications section.
2.2.2 Installing the hardware and libraries for the board
After installing the program in the Arduino IDE, it's done. Next, to make the program in
the Arduino IDE run on the board, add a request. It provides hardware solutions and publishes
a library for developing programs in C/C++ to the Arduino IDE. Another thing to upload
program of Arduino IDE can upload the code to the board.
Makan Dongni
(1) Open up the program Arduino IDE. In the first time, after installing the program in
In the event that the activation window appears according to Figure 2-28, click the button.Open
(2) The main interface of program Arduino IDE will appear ready to use according to Figure 2-29.
(3) While programming the Arduino IDE is active on the top menu bar, click on the menu.Arduino
> Preferences…according to the schedule2-30
Figure 2-28 shows a window to enable program
Arduino for the first time after installation.
- -------------------------------------------------- ------------------------------23
Figure 2-29 shows the main page of the program Arduino IDE.
Route 2-30 shows how to select the Preferences menu of the ARduino IDE program on MAC OS X.
24--- - ------------------------------------------------- ----------------------------
Route 2-31 Show Settings in the Preferences page to prepare for the setup of the board.
(4) AppearancePreferenceswill appear according to the chart2-31 Make-up the
following settings: ๐ Click the item.Verify code after uploadto remove the
check mark ๐ Click on the listCheck for updates on startupto remove the check
mark ๐ itemAdditional Boards Manager URLs:set as
https://github.com/INEXdev/ArduinoSTM32/raw/main/package_inex_
stm32_index.json
From Nanklakpu-mOKTo change the settings
(5) LegmenTools > Board:xxx > Boards Manager…according to the schedule2-32
(6) thicknessBoards Managerappear according to the country2-33 Give-MorP-K-K-K-Wai-Kawa-INEXwill find
List b-amon via hardware-dware-nameINEX_STM32which Total
From Nanklakpu-mInstallfor installation
- -------------------------------------------------- ------------------------------25
RUPT 2-32 Show open selection - Boards Manager…
RUPT 2-33 shows pages of BoardsManager For the library and request hardware tools of INEX_STM32
26--- - ------------------------------------------------- ----------------------------
Figure 2-34 illustrates the process of installing the library in the INEX_STM32 folder.
(7) From there, go through the installation process of the 2-34 Library. Wait until the installation process. set up complete
The next step is to test the upload program to the driver. To ensure that the installation of the
hardware, hardware and library of the board into the Arduino IDE program is correct and ready. use
(8) Connect the USB cable to connect the board to the computer in the same way as in chapter 2-19.
(9) Supply power to the board, turn on the POWER switch.
(10) While programming Arduino IDE Att-Feed, at the top menu bar, click on Menu.Tools >
Board:xxx > INEX STEM32 > POP-32according to the schedule2-35
Route 2-35 shows selecting the POP-32 board which can be used with the board. and
- -------------------------------------------------- ------------------------------27
Figure 2-36 shows the selection of the upload method for the Arduino IDE POP-32.
(11) Select the method of downloading the code by selecting the menu.Tools > Upload method > STM32Cube
Programmer (SWD)according to the schedule2-36
(12) The main table of the program Arduino IDE coded according to the program 2-1 for testing.
displaying text on the OLED display screen, then click the buttonUpload
(13) When uploading a cash program onto the board, it will work for a long time. to
display the OLED of the board show requestHello POP-32
28--- - ------------------------------------------------- ----------------------------