cancel
Showing results for 
Search instead for 
Did you mean: 

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

devie andriyani
Associate II
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

5 REPLIES 5
henry.dick
Senior II
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.

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

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.

Posted on April 02, 2018 at 14:47

But Arduino does not (yet?) have telepathy - you would still have to write the code!

And the process would still be the same as

henry.****

‌ outlined.

Note that Arduino is available on STM32:

https://community.st.com/community/stm32-community/blog/2017/07/13/stm32-cores-enabled-in-arduino-ide

Posted on April 02, 2018 at 14:53

I don't use arduino. Only STM32F4 (interfacing with ADS1298)

But, thx a lot for your answers and suggestions. I'll try it

On Mon, 2 Apr 2018, 19:48 Andrew Neil, <st-microelectronics@jiveon.com>