Simulating waves, chaos and synchronization with a microcontroller