Coder Social home page Coder Social logo

traffic_light_system_rbt6's Introduction

Simple Trafficlight System - HCMUT MCU-MPU Assignment

General Information:

  • Major components: Custom board with STM32F103RBT6 MCU.
  • Supporting multiple communications protocol: I2C, SPI, UART...
  • Purpose: Implement a simple traffic light system.
  • Components' usage:
    • UART Communication to control the system from host computer.
    • LCD for displaying information.
    • Led Pannel for traffic light signal.
    • Dip switch for select board ID or change mode to test.
    • Eprom 25LC512 for saving data.

About the Project Layout:

  • Schematic_Design folder contains the design for all components.
  • Modules folder is where we implement the library for each components seperately.
  • STM32F103RBT6 folder consists of the whole project with all configurations and source code:
    • global.h & .c: all global variables and labels.
    • led_pannel.h & .c: control the leds.
    • app_i2c_lcd.h & .c: working with lcd.
    • fsm.h & .c: run the system.
    • uart_reading.h & .c: intercept uart command and execute the corresponding feature.
    • app_25LC512.h & .c: using Eprom to store and fetch data.
    • software_timer: provide a timer .

About the System's Behavior:

  • Initially, system runs in auto mode: Led Panel for trafficlight, LCD displays wait time for each lane and the state (RED, GREEN, YELLOW) of that lane, whenever one lane in YELLOW state, a buzzer will turn on every 1 sec to warn the vehicles slowing down for pedestrian crossing the road.
  • We define a set of uart command as following:
    • !R# : Come back to AUTO mode.
    • !1# : Changing wait time for green light, also known as MODE2.
    • !2# : Changing wait time for yellow light, also known as MODE3.
    • !+# : Increase wait time 1 unit.
    • !-# : Decrease wait time 1 unit.
    • !O# : Save any changes and come back to AUTO mode.
  • While in MODE2 or MODE3, traffic light will toggle to the corresponding light (ex: green light on both lane on if in MODE2) and a light at the pin PB2 will blink every 1 sec. Besides, LCD will display mode and the current wait time of that mode.

traffic_light_system_rbt6's People

Contributors

cmq2002 avatar kog2k2 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.