Kiwrious serial reader implementation as a unity package dependency
Update Scripting Runtime Version to .net 4.x Equivalent
from Player Settings / Other / Configuration
Import Kiwrious package
Add below dependency to Packages/manifest.json
"com.kiwrious.sdk.unity": "https://github.com/augmented-human-lab/kiwrious-unity-package.git"
Older versions of unity does not support resolving package dependency over git url. so you need to clone it manually.
Simply clone this repository inside Packages/
folder of your unity project.
- Add
Kiwrious Reader
prefab into your unity scene fromPackages/kiwrious-unity-package/Prefabs/
- Plug any kiwrious sensor and observe Serial Reader Component of the Kiwrious Reader prefab
- Supports multi sensor simultaneous reading
- Plug and play (default)
- Connect and read on demand (set
AutoStart=false
from Serial Reader Component)
- Get raw value
KiwriousSerialReader.instance.sensorRawData
All sensor values are processed as float values.
float sensorValue = KiwriousSerialReader.instance.sensorData[sensorName].values[observableName];
KiwriousSerialReader.instance.sensorData["EC"].values["conductivity"]
KiwriousSerialReader.instance.sensorData["CLIMATE"].values["humidity"]
KiwriousSerialReader.instance.sensorData["CLIMATE"].values["temperature"]
KiwriousSerialReader.instance.sensorData["LIGHT"].values["uv"]
KiwriousSerialReader.instance.sensorData["LIGHT"].values["lux"]
KiwriousSerialReader.instance.sensorData["COLOR"].values["color_h"]
KiwriousSerialReader.instance.sensorData["COLOR"].values["color_s"]
KiwriousSerialReader.instance.sensorData["COLOR"].values["color_v"]
KiwriousSerialReader.instance.sensorData["VOC"].values["voc"]
KiwriousSerialReader.instance.sensorData["THERMAL2"].values["d_temperature"]
KiwriousSerialReader.instance.sensorData["THERMAL2"].values["a_temperature"]
KiwriousSerialReader.instance.sensorData["CARDIO"].values["heart_rate"]
KiwriousSerialReader.instance.StartSerialReader();
KiwriousSerialReader.instance.StopSerialReader();
<manifest>
<application>
<activity>
<!-- add new intent filter -->
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
<!-- add new meta data -->
<meta-data
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
</activity>
</application>
</manifest>