HM-10

PaulS:
The code you didn't post? What pins is the HM10 connected to? Your code would tell us that.

this is exactly the problem, I'm not sure how to write the code for my purpose