Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Ali Kaan Ünal
Published

How to make Knight Rider with STM32F411 on Mbed

Learn to code Knight Rider with STM32 and Circle Electronic Knight Rider kit

BeginnerProtip15 minutes446
How to make Knight Rider with STM32F411 on Mbed

Things used in this project

Hardware components

STM32 Nucleo-64 Board
STMicroelectronics STM32 Nucleo-64 Board
×1
Circle Electronic Knight Rider
×1

Software apps and online services

Mbed Studio
Arm Mbed Studio

Story

Read more

Code

Codes

C/C++
#include "mbed.h"

BusOut leds(PC_8,PC_6,PC_5,PA_12,PA_11,PB_12,PB_2,PB_1);

int ms=100;

int main(){
    while(1){
        for(int i=0; i<=7; i++){
            leds[i]=1;
            wait_ms(ms);
            leds[i]=0;
            }
             for(int i=7; i>=0; i--){
            leds[i]=1;
            wait_ms(ms);
            leds[i]=0;
            }
        }
    }

Credits

Ali Kaan Ünal
10 projects • 9 followers
Circle Electronic Maker products, DIY Electronics and kits. #makersgonnamake
Contact

Comments

Please log in or sign up to comment.