I have only said &X_Read in the code but it seems to read &Y_Read as well even though I have not told it to read for it and displays itself on X_Read for some reason...?
I wanted to transfer X and Y values of a joystick from my transmitter to my receiver and have it store an X and Y value separately but I can't do that if they combine like this for some reason. I am very confused- I feel like its the library I'm using but I don't know why exactly.
The receiver has no way of knowing what you want to read. It simply reads any data that is available
Consider putting the data in a struct in the transmitter code and sending that. After you have read the data back into a struct at the receiver end you can decide what you do with each element of the struct, if anything
As an alternative consider sending an identifier character, perhaps "X" or "Y" immediately before the X_Read or Y_Read data. Then, when received you will be able to tell what type of data it is.
Omg yes! I had been wondering about structs since a few hours ago but never figured it out. I finally decided to learn about it just now methodologically and finally worked it out! Thank you!