MySQL for the Internet of Things

(Steven Felgate) #1
ChapTEr 8 ■ DEmonsTraTion of high availabiliTy TEChniquEs

Next, when you connect to the slave, you should see messages that depict whether the slave has
received the message (heartbeat) along with a counter of the elapsed time. Should the master fail, you will
also see a message stating that. Figure 8-6 shows sample output from the slave.


Don’t despair or give up if you encounter problems. Go back and check your wiring and make sure
everything is wired correctly. Once you are satisfied that isn’t a problem, compile and upload the sketches
again, making sure you are using the correct board and port for each master and slave. Uploading the slave
(or master) sketch to both boards is easy to do by accident. In this case, it may have been easier to have two
separate sketches, which you can do if you are having problems keeping the #define straight.


Figure 8-6. Sample debugging output (slave)


Figure 8-5. Sample debugging output (master)

Free download pdf