Code for my senior design project