Introduction: STM32F103 Digital Input (using Med.h)

Picture of STM32F103 Digital Input (using Med.h)

In this tutorial, we will learn about reading digital input from GPIO Pins in STM32F103 Nucloe Board using mebd.h.

Step 1: Coding and Compiling

Creating Project

Now, open the compiler on mbed developer website. Click on "NEW" to create a new project. Set Platform to 'NUCLEO-F103RB'. From the template select 'Read the board user button state'. Enter a program name. Click 'ok'. Open 'main.cpp' if not already open.

And here is the code you will need to read that blue push button on your nucleo board and control that LED on you nucleo using this button. This code is very similar to one explained in "Getting started (using mbed) tutorial".


Compile this code by clicking on compile button. Download this onto your Nucleo Board. Or if downloaded somewhere else drag from there and drop onto Nucleo Directory in your 'This PC'/'My Computer'. This will flash this code onto your STM32 Nucleo Board.

Now, Push that blue button on your board and see what happen to LED! :)


OsamaB3 (author)2015-12-10

i cant see the code.

OsamaB3 (author)OsamaB32015-12-10

oh now i get it

About This Instructable




More by ARK4579:Getting Keil and STM32CubeMX readySTM32103: esp8266 NodeMCU ThingSpeak [using mbed.h]STM32F103: esp8266 nodeMCU Getting Started [using mbed.h]
Add instructable to: