Best way to get sensor data from NR on Android to NR on RPi

I am currently building an astrophotography barn door tracker (haig mount) using NR as the control system. In order increase accuracy, I want to use an instance of NR installed on my android phone to provide sensor data (such as GPS co-ords, compass bearing and accelerometer) to NR running on an RPI.

My first thought was to try using BLE, however I quickly discovered that RPi doesn't make this easy.

What would be the easiest way for a beginner to set up this transfer of information from NR on Android to NR on RPi?

If both are on the same LAN, then MQTT is the easiest & best method IMO.

1 Like

As Steve implies, it depends upon the connectivity between your phone and the pi -- if they are both connected to the same network, it's simple to use [tcp, udp, http, mqtt] to send the data. It would be trickier, but you could set up telegram, sms, even email listeners on the pi.

But it sounds like you are asking about near-field communications like BLE. I'm guessing you want this to work outside, or somewhere that does not allow internet or private lan networking? In that case, I think your only options are wired (serial line connected to gpio, usb cable) or wireless (bluetooth, infrared, zigbee). Of course you could also display the location/orientation data using your phone, and enter it manually into the pi (assuming some input device with display).

But this does bring up an interesting question -- has anybody used a phone or tablet, connected by usb to a raspberry pi, as an input device? If so, I have some old devices that I could repurpose... :thinking:

If you can give us a better picture of what you want to set up, there will likely be someone who has better answers for you. Good luck!