Team 3 – Code logic

 

Team: DAX
Team members: Xinyuan Wu, Danmei Li, Weijie Zhou
Time: 20th Oct – 3rd Nov

This blog is about we try to make the code logic more clear in terms of LED modes.

 

 

 

 

This diagram indicates how these led mode triggered by the different distance of sensors.

When two sensors don’t find skater or the distance out of range, use the default led mode “noSkater”.  The different LED modes are based on the distances.

Screen Shot 2018-11-05 at 5.06.55 pm.png

This diagram indicates the range of different distance.Screen Shot 2018-11-05 at 5.17.36 pm.png

 

 

 

The flow chart below indicates how we trigger the 5 types of LED modes based on the different distance of skaters as well as the different direction.

screen-shot-2018-11-05-at-1-20-04-am.png

 light mode

We choose the half number of LED pixels in a random position, which would always turn on when the sensors haven’t detected skaters.Screen Shot 2018-11-05 at 11.40.16 pm

 

 

 

closeSkater light mode

Whole led pixels in one pillar would turn on one by one in the same direction of the skater.Screen Shot 2018-11-05 at 11.40.22 pm

 

farSkater light mode

All  Led would turn on, then turn off in the same direction of the skaterScreen Shot 2018-11-05 at 11.40.28 pm

Leave a comment