Fix peripheral example in readme

The peripheral example was pretty broken. These changes make it so that it actually runs as described in the comments.