0

I am c# developer writing a specification for an Android developer. The requirements is to connect to a "motor" through bluetooth. There will be a method, through Bluetooth, called "Turn X degrees". The problem is that I need to know when the motor has turned X degrees. So, the question is how this can be implemented;

  1. is Bluetooth supporting synchronous calls so the method will "return" when "turn" has been completed
  2. is there some kind of event model that can be used for this built into Bluetooth (and Android)?
  3. other recommended ways of implementation?
Andrii Omelchenko
  • 13,183
  • 12
  • 43
  • 79
serializer
  • 1,003
  • 2
  • 13
  • 27
  • Bluetooth not controls motor by itself. So, probably, some device exists "between" BT channel and motor, which transfer "Turn X degrees" to rotation of motor shaft. You should use description to this device. If it has "return" notification - You should process it. If not - only (and not good way) determine end of rotation by time interval. – Andrii Omelchenko Oct 31 '16 at 11:22
  • Yes, I understand this. Just wanted to know how communication channel works. If it is synchronous or asynchronous. – serializer Nov 01 '16 at 08:05
  • There are many [BT profiles](https://en.wikipedia.org/wiki/List_of_Bluetooth_profiles) and them works completely different. Suppose You need SPP profile which similar to UART (or RS-232) to send/receive command to motor control unit. – Andrii Omelchenko Nov 01 '16 at 08:18

0 Answers0