This code pings the google DNS server and controls a traffic light based on connectivity