Code for a smart chess board implemented with an Arduino