<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Davis</title>
    <description>The latest articles on DEV Community by Davis (@davis87842333).</description>
    <link>https://dev.to/davis87842333</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F549820%2Fd125a19e-ec7f-4a8a-99d3-920e7895a9d3.jpg</url>
      <title>DEV Community: Davis</title>
      <link>https://dev.to/davis87842333</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/davis87842333"/>
    <language>en</language>
    <item>
      <title>Let's compete to light up the LED in the Fastest way!</title>
      <dc:creator>Davis</dc:creator>
      <pubDate>Wed, 30 Dec 2020 06:37:30 +0000</pubDate>
      <link>https://dev.to/davis87842333/the-easiest-way-to-light-up-the-stm32-board-from-zero-36o0</link>
      <guid>https://dev.to/davis87842333/the-easiest-way-to-light-up-the-stm32-board-from-zero-36o0</guid>
      <description>&lt;h1&gt;
  
  
  Light up the LED in 30 seconds with 3 methods.
&lt;/h1&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Install IDE&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 0. Prepare Hardware&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The hardware used in this experience is ST's development board NUCLEO-F411RE, and the development board number is MB1136. If you don’t have this board, you can use other development boards instead, and modify the LED and USART pin configuration according to the actual hardware conditions.&lt;/p&gt;

&lt;p&gt;hardware list：&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;NUCLEO-F411RE board&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ini-USB cable&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpzvaqj37fpdjktgrdoc2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpzvaqj37fpdjktgrdoc2.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1 Install&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;RT-Thread Studio is a newly emerging embedded integrated development environment. After trial, it was found that it has relatively complete development, compilation, and debugging functions, complete support for STM32 series chips, and complete support for ST-Link J-Link DAP-Link debugger. Here to share the experience of using it.&lt;/p&gt;

&lt;p&gt;The latest version of RT-Thread Studio is 2.0.0, which supports Windows 10 x64 operating system. The download link of RT-Thread Studio is&lt;/p&gt;

&lt;p&gt;&lt;a href="https://realthread-ide.rt-thread.org/Global/RT-Thread-Studio-setup-x86_64-latest.exe" rel="noopener noreferrer"&gt;https://realthread-ide.rt-thread.org/Global/RT-Thread-Studio-setup-x86_64-latest.exe&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After successful login, you can see the welcome page of the software&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxewcwupmort20sr3duk6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxewcwupmort20sr3duk6.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2 Install PlatformIO Package&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Close the welcome page, you can see the project manager and C/C++ development view, here we install some necessary resource packages to support the development of STM32 F411, the installation steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Click the SDK manager icon&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select PlatformIO 5.0.3.12 version&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click the Install Package button to execute the installation&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2zbhbo25fzbtcw7gt7rp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2zbhbo25fzbtcw7gt7rp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;2. Light up the LED with Arduino Framework&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 0 Create stm32f411re Arduino project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Click the Create Project button in the upper left corner of the IDE to create a new project. Here we choose to create General Project and choose to use the PlatformIO platform. The steps are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create General Project&lt;/li&gt;
&lt;li&gt;Select Base On PlatformIO&lt;/li&gt;
&lt;li&gt;Search f411re&lt;/li&gt;
&lt;li&gt;Select Nucleo_f411re board and Arduino framework&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsihwfxuoux4xh1zczgsk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsihwfxuoux4xh1zczgsk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5nedqhkz4p49wo66etce.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5nedqhkz4p49wo66etce.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1 Add LED Blink Code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The created nucleo_stm32f411re_arduino project is an empty project. Add the blinking code of the LED in src/main.cpp to realize the blinking of the LED.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;Arduino.h&amp;gt;
void setup() {
// write your initialization code here
    pinMode(LED_GREEN, OUTPUT);      // set LED_GREEN pin as output mode
    Serial.begin(115200);            // set Serial baudrate to 115200 bps
}

void loop() {
// write your code here
    digitalWrite(LED_GREEN, HIGH);   // turn the LED on (HIGH is the voltage level)
    delay(100);                      // wait for 100 millisecond
    digitalWrite(LED_GREEN, LOW);    // turn the LED off by making the voltage LOW
    delay(100);                      // wait for 100 millisecond
    Serial.print("hello world!\r\n");
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2 Build nucleo_stm32f411re_arduino project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After adding the LED blinking code in main.cpp and saving it, click the small hammer build icon to compile the project&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcxew6nffx19vm5qkc1ti.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcxew6nffx19vm5qkc1ti.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3 Download&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Link the Mini USB cable to the development board, click the download button on the toolbar, and then the program can be downloaded&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvpco5if675lqz2dqpr0f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvpco5if675lqz2dqpr0f.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the download is complete, you can see that the green LED starts to blink, the IDE integrates a serial port terminal, open the serial port terminal, connect to the serial port, you can see the "hello world" message&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F69u8xquj0rzcoixturi7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F69u8xquj0rzcoixturi7.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4 Debug&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;RT-Thread Studio supports online simulation. Click the debug button on the toolbar to enter the debugging interface. The debugging simulation supports single-step, suspend and other debugging operations&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffkzncyrwgemnp37bxz1s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffkzncyrwgemnp37bxz1s.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fi109biglq1yj8m2byoux.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fi109biglq1yj8m2byoux.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Light up the LED with RT-Thread&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;RT-Thread Studio IDE can create the rt-thread os project of any chip of stm32 with one click, and do the porting of the operating system, serial port driver, and common peripheral driver. The steps to create the LED blinking project are as follows&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 0 Install STM32F4 chip support package&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Click the SDK Manager icon in the toolbar, select the STM32F4 chip support package 0.1.9 version in the pop-up SDK manager, and click to install the support package&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnvgsj5mrxv9qh7hd1yjp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnvgsj5mrxv9qh7hd1yjp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1 Create nucleo_stm32f411re_rt_thread project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Click the create project icon in the upper left corner of the IDE, and select to create an RT-Thread project&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8pk68f0n1uck20h5fzqx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8pk68f0n1uck20h5fzqx.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make the following configuration in the creation wizard&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RT-Thread version: 4.0.2&lt;/li&gt;
&lt;li&gt;Chip: STM32F411RE&lt;/li&gt;
&lt;li&gt;Serial port: UART2&lt;/li&gt;
&lt;li&gt;Serial port sending pin: PA2&lt;/li&gt;
&lt;li&gt;Serial port receiving pin: PA3&lt;/li&gt;
&lt;li&gt;Debugger: ST-Link&lt;/li&gt;
&lt;li&gt;Simulation interface: SWD&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After the configuration is complete, click Finish to create the project&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fv7k1t03g1k2lb6pqxtvj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fv7k1t03g1k2lb6pqxtvj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb891hb2yu3ljw8ydojk7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb891hb2yu3ljw8ydojk7.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2 Add LED Code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The created RT-Thread project has been transplanted to the operating system, and the uart driver is connected to the system shell. At this time, the project is directly compiled, and input shell command through the serial terminal, but there is no LED Driver logic, here we can add the following code to the applications/main.c file to drive the LED&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;rtthread.h&amp;gt;
#include &amp;lt;rtdevice.h&amp;gt;
#include &amp;lt;board.h&amp;gt;

/* defined the LED0 pin: PA5 */
#define LED0_PIN    GET_PIN(A, 5)

int main(void)
{
    int count = 1;
    /* set LED0 pin mode to output */
    rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);

    while (count++)
    {
        rt_thread_mdelay(100);
        rt_pin_write(LED0_PIN, PIN_HIGH);
        rt_thread_mdelay(100);
        rt_pin_write(LED0_PIN, PIN_LOW);
        rt_thread_mdelay(100);
    }

    return RT_EOK;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3 Build nucleo_stm32f411re_rt_thread project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After replacing the above code in the applications/main.c file, click the small hammer icon in the toolbar to compile the entire project. After the compilation is successful, the following information will be output&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;elf file size&lt;/li&gt;
&lt;li&gt;flash occupancy&lt;/li&gt;
&lt;li&gt;ram occupancy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpqq231lzbhki669do67n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpqq231lzbhki669do67n.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4 Download&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Connect the Mini USB cable to the development board, click the download button on the toolbar, and then download the program. After the download is complete, you can see the LED lights blinking&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1r8u32mhlyrsi2sb5ien.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1r8u32mhlyrsi2sb5ien.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5 Debug&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;RT-Thread Studio supports online simulation. Click the debug button on the toolbar to enter the debugging interface. The debugging simulation supports single-step, suspend and other debugging operations&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fr4wxon5zsdbate593f5s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fr4wxon5zsdbate593f5s.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;4. Light up the LED with Mbed Framework&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 0 Create Mbed project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Click the Create Project button in the upper left corner of the IDE to create a new project. Here we choose to create General Project and choose to use the PlatformIO platform. The steps are as follows&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create General Project&lt;/li&gt;
&lt;li&gt;Select Base On PlatformIO&lt;/li&gt;
&lt;li&gt;Search f411re&lt;/li&gt;
&lt;li&gt;Select nucleo_f411re board and Mbed framework&lt;/li&gt;
&lt;li&gt;Figure Select Base On PlatformIO and Mbed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fapnj6b8hu5xotew1vxo8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fapnj6b8hu5xotew1vxo8.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbi4093x8d25ace995rye.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbi4093x8d25ace995rye.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1 Add LED Code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The created nucleo_stm32f411re_mbed project is an empty project. Add the blinking code of the LED in src/main.cpp to realize the blinking of the LED&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include "mbed.h"
#include "rtos.h"
DigitalOut led(PA_5);   // on-board LED

int main()
{
    while (1)
    {
        led = !led;
        ThisThread::sleep_for(100ms); // 100 millisecond
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2 Build nucleo_stm32f411re_mbed project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After adding the LED blinking code in main.cpp and saving it, click the small hammer build icon to compile the project&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fejwc97j3rup5lbr75y93.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fejwc97j3rup5lbr75y93.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3 Download&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Connect the Mini USB cable to the development board, click the download button on the toolbar, and then download the program. After the download is complete, you can see the LED lights blinking.&lt;/p&gt;

&lt;p&gt;Share your method below, and let's share.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
