PC_MAC_readme.txt 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. ADVANCED ANT+ FOR UNITY
  2. *** using the ANT library on windows and macOS
  3. To Get started you need to sign up on thisisant.com and become a ANT+ Adopter for devices documentation and network key
  4. To obtain the network key:
  5. Register https://www.thisisant.com/register/
  6. Once your basic user account is activated, login and go to your MyANT+ page https://www.thisisant.com/my-ant to add ANT+ Adopter
  7. Next search "Network Keys" on thisisant.com, we want the first key on the txt
  8. The key must be set in AntManager.cs ==>replace readonly byte[] NETWORK_KEY = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
  9. For more info about ANT+ https://www.thisisant.com/developer/ant-plus/ant-plus-basics/
  10. USAGE
  11. 1. Init the device, this is you usb2 or usb-m dongle
  12. AntManager.Instance.Init();
  13. 2. Subscribe to device event
  14. AntManager.Instance.onDeviceResponse += OnDeviceResponse;
  15. 3. Open a channel with device configuration
  16. AntManager.Instance.OpenChannel(...);
  17. 4. Subscribe to response and data event
  18. myChannel.onReceiveData += ReceivedAntData;
  19. myChannel.onChannelResponse += OnChannelResponse;
  20. A detailed example is available in the antDemo.cs file
  21. Device settings are found on thisisant.com
  22. example: ANT_Device_Profile_Heart_Rate_Monitor.pdf
  23. FAQ
  24. - How do I configure a channel to connect to a HR SENSOR ?
  25. To read data from an HR sensor the correct configuration as found in ANT+_Device_Profile_-_Heart_Rate_Rev_2.00.pdf page 11 ont thisisant.com
  26. AntManager.Instance.OpenChannel(ANT_ReferenceLibrary.ChannelType.BASE_Slave_Receive_0x00, 2, 0, 120, 0, 57, 8070, false);
  27. the instantaneous HR is on data[7].
  28. -How to get data from a power Meter ?
  29. Settings found in ANT+_Device_Profile_-_Bicycle_Power_-_Rev4.2.pdf page 19
  30. powerDisplay = AntManager.Instance.OpenChannel(ANT_ReferenceLibrary.ChannelType.BASE_Slave_Receive_0x00, 2, 0, 11, 0, 57, 8182, false);
  31. then in the data event method, as described in page 31 for Instantaneous Power
  32. int power= (data[6]) | data[7] << 8;
  33. -How can I auto connect to multiple bike speed sensor ?
  34. have a look at the MultiBikeSpeedDisplayExample.cs and demo scene. We create a Bike Display class and open a new channel everytime the background scan finds a sensor of the correct type.
  35. -Why do I get RX Fail messages ?
  36. Lots of rx fails means the channel period is wrong. Otherwise it is normal to have some amount of rx fails. You can now turn the log off with mychannel.hideRXFAIL = true
  37. -What are extended info ?
  38. you will find the info related to the background search extended data in this file:
  39. https://www.thisisant.com/resources/ant-message-protocol-and-usage/
  40. Page 35 of 134