Skip to content

branilson/BL_TrafficLight2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BranlsonLuiz

Enhanced Traffic Light Mbed code

Finite state machine code sample for a traffic light system with pedestrian call buttom, alert and off states.

Made for ST STM32F4 Discovery board using ARM Mbed library and PlatformIO IoT Ecosystem.

Challenge for students of the discipline Microprocessed Systems II at SENAI CIMATEC university center.

Keywords: Traffic light, Finite State Machine, C/C++, Mbed, STM32F4

Finite State Machine policy

  • States: Red; Green; Yellow; Alert (Only Yellow blinking at 1Hz); Off.
  • Initial state: Red
  • Transition Red -> Green: t=10s
  • Transition - Green --> Yellow: t=20s || tBt=<3s
  • Transition - Yellow --> Red: t=4s
  • Transition - Any other state --> Alert: tBt>=3s && tBt<=10s
  • Transition - Any other state --> Off: tBt>10s
  • Transition - Off -- > Red: tBt > 10s
  • Transition - Alert --> Previous state: tBt>=3s && tBt<=10s
  • t = elapsed time; tBt = time Button pressed.

BranlsonLuiz

About

5 state traffic light demo code using ARM Mbed framework and STM32F4 discovery board.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages