Skip to main content
devie andriyani
Associate II
March 31, 2018
Question

How to turn on off four leds on the board of stm32f4 by sending a character using serial communication

  • March 31, 2018
  • 5 replies
  • 1696 views
Posted on April 01, 2018 at 01:27

Hi,guys! I need your help, please. How to  turn on off four leds on the board of stm32f4 by sending a character using serial communication (example : if I send 'A', blue led is on. Send 'B', orange led is on. Send 'C', red led is on, etc. Until four leds on or off. Thx for your answer before

    This topic has been closed for replies.

    5 replies

    henry.dick
    Associate II
    April 2, 2018
    Posted on April 02, 2018 at 11:40

    Very easy 4 steps:

    1. Write a piece of code to turn an led on and off.

    2. Write a piece to receive a char from the uart.

    3. Write another piece to tie them together. 

    4. Done.

    Andrew Neil
    Super User
    April 2, 2018
    Posted on April 02, 2018 at 13:12

    Beginner 'Getting Started' steps:

    https://www.avrfreaks.net/comment/1138166#comment-1138166

    See also:

    https://www.avrfreaks.net/comment/2079906#comment-2079906

    And, with a more ST focus:

    https://community.st.com/0D50X00009XkWm7SAF

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    LMI2
    Senior III
    April 2, 2018
    Posted on April 02, 2018 at 14:37

    Or use an Arduino system. STM32F4 is a cool CPU with plenty of places to tinker with, but Arduinos are much easier.