Yes, you should not do anything without going first to a lawyer.
I guess they are in the right to sue you, you used a trademark. But the fact that it was for an old machine, and there was no impact at can run for your side.
I wounder if a letter explaining that it was only for fun, and no interest in making money and that the software was removed will be enough.
I think a lawyer is the best solution. But as Galahad/FLT said, don't pay nothing for now.