Get Flat 5% Use code- *FLAT5* and Free delivery on orders above Rs 900 | * Single Delivery charges for Multiple Items *

Cart

Your Cart is Empty

Back To Shop

Cart

Your Cart is Empty

Back To Shop

Interfacing IR Sensor With STM32 Discovery Board

STM32 Boards have 23 interrupt sources. In this article, we will see how STM32 handles interrupts at a primitive level.

pic 5 1
Interfacing IR Sensor With STM32 Discovery Board 3

Components Required:

The following picture depicts the interfacing between the IR module and STM32 DISC Board. PA1 pin introduces interrupt as IR sensor detects an obstacle. The LED connected at PD1 indicates the interrupt status.

pic 7 1
Interfacing IR Sensor With STM32 Discovery Board 4

Pinout:

  • LED1- PD0 (Pin 0 of Port D)
  • LED2- PD1 (Pin 1 of Port D)
  • IR (5V)- 5V of STM Board
  • IR (Gnd)- GND of STM
  • IR (Dout)- PA1 (Pin 1 of Port A)

Software:

Let’s move towards code writing and deployment. I have used  for the programming of the board. The initial steps are software installing and selecting the board. After that, go to Files–>New Project–>C project and the perspective of the new project will open, as you can see in the following image.

  • Step 1: Create New Project.
  • Step 2: Write Code.
  • Step 3: Save.
  • Step 4: Build Project.
  • Step 5: Debug.

Cart

Your Cart is Empty

Back To Shop
GET DISCOUNT CODE

It will take just few seconds to claim 7% Discount

    X
    GET DISCOUNT CODE