The code is working. The tutorial... latter parts... needs work. But at...
... you will find an essay about an Arduino with an LED and a "doorbell" switch (momentary, connecting to ground. Input pulled up with Arudino's BRILLIANT internal pull ups).
The Arduino is connected, serial link, separate from the "programming" link to a PC. In that PC, an app running which can send messages which will turn the Arudino's LED on or off, and the app in the PC repeatedly consults the Arudino and reports, on the PCs screen, the state of the "doorbell".
Now... "what's it good for"? Not much, with LED and switch. But the work paves the way for all sorts of Fun Stuff.
A challenge you might find fun is given in the essay: Can you replace the PC described in the essay, the "master" device, and replace it with a second Arduino, doing what the PC does? "Rule" of the game: The "first" Arduino has to remain exactly as it is in the essay.
The task set in the challenge shouldn't be hard to accomplish, but I think you could have fun with it.
Something else which might amuse readers: Have a go at replacing the Delphi program I used to drive the PC side of things? A little harder than the first challenge, but maybe useful to less experienced Arduino fans?
I hope you enjoy what's in the essay.