C-3PO definitely saw Luke. But I think C-3PO suspects something is amiss, because just before Luke steps out to face the First Order:
Luke turns around to C-3PO and winks broadly at the robot. And C-3PO has a confused look (for a robot anyway) on its face.
You can't miss this scene.
Also, @Machavity says in his answer that
Luke deflected Kylo's lightsaber with his own.
But I don't remember that in the fight scene (at least on my first viewing), what I remember seeing is:
Luke emerging unscathed from all the firepower that the First Order threw at "him" and then avoiding Kylo's strikes during their face-to-face "battle". He also didn't leave any footprints on the planet's red and white salt surface while walking.
I'm wondering whether it wasn't so much a mind trick (that would have affected only living creatures), as much as it was a
Projection or hologram. Which robots can see.
Update: as pointed out in the comments below, the dice could be an anomaly. But my hunch is that:
When Luke walks into the Resistance base, he doesn't make "contact" with anyone but Leia. He talks to her, kisses her lightly on the forehead, and leaves the dice from the Falcon in her hand. After Luke disappears, when Kylo searches the base, he finds the dice, which immediately disappears from his hands, leaving Kylo either frustrated or sorrowful (it's unclear which.)
Since Leia is the only person Luke comes into physical "contact" with, my suspicion is that Leia somehow understood what Luke was doing (even though she was not a Jedi, she was strong in the Force as well), or at least suspected something like C-3P0 does.
That would also explain why Leia left the dice behind, to make sure that Kylo saw it before it disappeared.