Skip to main content
Explorer
June 2, 2025
Question

I NEED to toggle PC13 led with button in stm32f103c6t6

  • June 2, 2025
  • 1 reply
  • 771 views

I'm a starter in embeded systems and my teacher told me to write a code for this stm32 and add a button to in on breadboard then it needs to toggle with it ( one push on button turn on the light r5 or pc13 and another push to same button turns off the same led ) I'm sure its a easy task to do but as a person don't knows anything about writing a code or work with embeded systems i couldn't find it anywhere i hope someone can help me with that (also i bought a udemy course too but it starts all started its good to learn but i need to do this in hurry. I've been working on it like 2 or 3 days and how fast im complete how good its going) Thanks All Of You !!!WhatsApp Görsel 2025-06-02 saat 20.01.47_70f33385.jpg

    This topic has been closed for replies.

    1 reply

    Super User
    June 2, 2025

    That's a so-called "BluePilll", so (almost) certainly contains a fake STM32.

    Your teacher would do better to get you Nucleo boards - which come complete with a button, and a built-in ST-Link.

     


    @Propiyonat wrote:

     I'm sure its a easy task to do but as a person don't knows anything about writing a code or work with embeded systems i couldn't find it anywhere


    If you're in an embedded class, and you don't understand the task, then you need to ask your teacher for help - that's what they're there for!

    The teacher won't have given an exercise that's beyond what's been taught in the class.

    There are three key parts to your task:

    1. turn an LED on/off;
    2. detect when a button is pressed;
    3. put those 2 together to make the LED light when the button is pressed.

    Have you managed to do any of them?

    Explorer
    June 2, 2025

    Dude its not really a class we have teknofest to work to do and my master to learn me to do this give me this project for me to learn so i've been resarching like decades and couldn't find it anywhere i'm not sure even he knows info about this but i need to do this so can anyone help me or not ? ( And yeah ve have this and also nucleo too because of i'm working on it i don't know anything about it and i can blow it up by some chance and nucleo boards not a cheap option to me to work on it as person who don't know anythink about it ) 

    Super User
    June 2, 2025

    you can read...?

    https://letmegooglethat.com/?q=toggle+PC13+led+with+button+in+stm32f103

    ->

    https://www.engineersgarage.com/push-button-and-led-with-stm32f103/

     

    +

    The cpu on your blue-pill looks genuine, as far as i can see it on your pic, so it should work with an st-link .