Construction of bidirectional electron transfer biofilms via periodic polarity reversal