I believe this book is for middle grade and from the 1970s or before. It is about a boy who spends the summer away from home, near the ocean or on an island. The first night there, he see someone using Morse code to spell out his name. Later, he learns it is another boy who wants to be friends. (They become friends.) There is some type of mystery to be solved and a man (maybe a relative?) tries to kill the boy at the end of the book. There are caves or some kind of natural phenomenon where at the right tide, the wind/water rushes through, sounding like ghosts moaning. When the man is after him, the boy has to face his fear and enter the caves to escape.
This isn’t Over Sea, Under Stone by Susan Cooper is it?
Under Plum Lake by Lionel Davidson?
Thank you but that’s not it. It’s not fantasy. A contemporary (at the time) book about a boy solving a mystery.
Several of the elements remind me of “The Back House Ghosts” by Catherine Sefton – but the characters in that are girls, Ellen (and her big sister Bella) who help their mother run a guest house, and Violet, a guest who becomes friends with Ellen. There is signalling with lights (but not between the girls – it’s part of the mystery) and a cave sequence similar to the one in *Over Sea, Under Stone*.
Thank you but that’s not it. Definitely a boy protagonist.
Thank you, but that’s not it. It’s not a fantasy. There is a hint that there’s something paranormal going on, but those events are explained.
Could it be Mystery of the Witches’ Bridge by Barbee Oliver Carleton? It has spooky elements and the Morse code name element, but I’m not sure about the cave because I’m not done reading it.
https://www.goodreads.com/book/show/1484966.Mystery_of_the_Witches_Bridge
There are caves in The Mystery of the Witches’ Bridge. Well, more like tunnels, but they’ve been abandoned for over 100 years, so they look like caves until the boys figure it out. There’s mysterious violin music echoing through the caves too. And it’s a trusted family friend named Billy Ben who is the one who tries to kill the mc. (I can’t remember his name, but the friend is Pip and his sister is Gilly)
I finally finished reading the book, and you’re right. I really that this is the book that the asker is describing. The source of the Morse code is a boy who wants to be friends. There is a tunnel, tides, wind that creates mysterious sounds, and the guy named Billy Ben who tries to kill the main character while chasing him through the tunnel.
Maybe it’s The Mystery of the Moaning Cave, part of The Three Investigators series
http://jupiterjones.narod.ru/1/novels/10.pdf