Advanced ANT+ for Unity
A downloadable Unity package for Windows, Mac OS X, and Android
note: the package on Unity's asset store is made by me as well, I will put this one later on a new asset store publisher account, but meanwhile and by popular request, you can get it here.
this one is an extended version with android support and the most common devices ready to use without the need to read the ant doc or even to code anything.
if you need some help, send me an email and I'll be glad to help!
NOW works on Android !
includes ready to use prefabs for Cadence , Heart rate, speed, Power Meter, Speed & Cadence and Fitness Equipment.
The prefabs are ready to use on pc, mac and ant+ equiped phones
The android plugin can use the built-in device selection UI by setting the useAndroidUI boolean to true on the prefabs. On PC and Mac you can connect to the first device found or get a list of found sensors.
If you use multiple prefabs with autoconnect, the java plugin will queue the request and connect to the sensor one by one.
The ant+ Android plugin will let you connect to premade device profiles, you cannot create your own custom Ant devices with it or access anything the plugin is not coded for.
If you need any specific event from a device not implemented yet by the plugin, send me an email and I will add it if possile
Here are the events the android plugin forwards to Unity for each sensor for now:
All sensors :isDisconnected , StateChange , ConnectEvent
Cadence sensor: Receive_calculatedCadence
Speed & Cadence sensor: Receive_calculatedCadence, Receive_calculatedSpeed, Receive_CalculatedAccumulatedDistance
Speed sensor: Receive_calculatedSpeed, Receive_CalculatedAccumulatedDistance
Power Meter sensor: Receive_calculatedPower, Receive_calculatedCadence
Heart Rate sensor: Receive_computedHeartRate
Fitness Equipment: Receive_instantaneousHeartRate, Receive_elapsedTime, Receive_instantaneousSpeed, Receive_cumulativeDistance, Receive_trainer_instantaneousPowe, Receive_trainer_instantaneousCadence
Minimum Android version: 5.0.1
Requires Unity 5.3.2 or higher.
Read data from any ANT+ sensor in your unity application
new in patch 1.02
- USB dongle disconnect notification and auto reconnect
- multi bike speed display example
- FE-C bike trainer resistance change demo
- FAQ in readme.txt
Multi channel ready
For mac OSX, windows 32 and 64 bits
Based on the NET demo, this package includes the ANT_WrappedLib.dll built for win 32 and win 64 and a wrapper bundle for Mac OS.
A demo scene shows how to create a HR sensor to broadcast data, a bike speed display and a background search simultaneously
The FIT library is also included to encode and decode activities.
• ant-m or ant usb2 dongle or compatible phone required
• will not work on IOS
• you need to register for free on thisisant.com and become a ANT+ Adopter for devices documentation and network key for use on PC and MAC
USAGE FOR NET LIBRARY
( you can skip that part and just put the prefab on your scene)
1. Init the device
2. Subscribe to device event
AntManager.Instance.onDeviceResponse += OnDeviceResponse;
3. Open a channel with device configuration
4. Subscribe to response and data event
myChannel.onReceiveData += ReceivedAntData;
myChannel.onChannelResponse += OnChannelResponse;
Bicycle performance simulator
This package helps you to compute the speed a bicycle can move by entering the leg power in watts from the rider.
By using the air drag, rolling resistance and gravity equations, we can accuratly calculate at what speed a bicycle would move.
The 2 main methods are:
SetPower(power) , to move the bike and get the resulting speed<BR>
GetpowerforSpeed(speed), to get the needed power so the bike can reach the given speed.
One of the many applications of this simulation is to make a bike move on the screen by inputing the power from a real bike (home trainer) and get realistic results
A demo scene is using a Spline Controller to move a bike with various power input and speed.The slope will affect the speed, power input, acceleration and braking in realtime.
A 3D bike model and animated rider are also included
In order to download this Unity package you must purchase it at or above the minimum price of 50.00€ EUR. You will get access to the following files: