ArduSensor Plugin View on Asset Store (opens in new tab)

Package details

Latest version
1.0
Last updated
First released
Unity version
2021.3.16 or later
Package size
102 KB
Files
6
Favorites
6
Views in the past week
5

Price tracking

Last checked
Tracked since
Lowest recorded
Free on

Keywords

ArduSensor Plugin

by CYK (opens in new tab)

No ratings yet

The process can be simplified for people who need USB serial implementation to connect Arduino sensors to their Android devices.

Price Free

Get it free on Asset Store (opens in new tab)

Affiliate link · Purchases support this site

Price history

Last 6 months

USD
Price history for ArduSensor Plugin, 6 months Current Free; lowest Free; highest Free in this period. $0 Jun Jul Aug Sep Oct Nov

Asset preview

1 / 2

ArduSensor Plugin screenshot 1

ArduSensor Plugin screenshot 1

About this asset

ArduSensor Plugin is a Unity plugin that receives sensor values from an Arduino board that communicates serially with Android. This plugin is implemented using Android native code and calls are made from Unity. Applications include temperature, humidity, barometric pressure, gas resistance, altitude, CO2, TVOC and Lux values. And if there is a compatible IMU sensor, it will even detect the IMU value. The IMU is updated at 0.1 second intervals and the remaining sensors are updated at 4 second intervals.

How To Use:

Import the plugin package and build the demo scene to verify the AAR plugin is being imported correctly. If not, refer to Unity's official documentation* to properly import the plugin. All implementations are written in the UnityProject/Assets/Scripts/AarBridge.cs file. Create a Java instance to communicate with Arduino through Android's Native Methods.

From the publisher's Asset Store listing.

Technical details

  • The code for implementing USB serial communication in Android is included in the aar plugin.
    • The aar plugin contains library and Android Activity for USB serial connection.
    • It opens the port and retrieves the vendor ID and device ID of the sensor connected to the Arduino.
    • It receives sensor data measured from the device.
    • It implements a method for transmitting the measured sensor data to Unity.
  • In Unity, the measured values from the Arduino sensor are displayed.
    • Corresponding C# scripts are implemented for the methods in the aar plugin. Android Java Object and Android Java Instance have been used.
    • The implementation of the UI connected to this C# script is also included. It can be customized by assigning to button events

The asset uses some elements of [usb-serial-for-android.aar], under the MIT License. Please see the Third-Party Notices.txt file in the package for more details

Compatibility

Render pipelines supported in each Unity version
Unity version Built-in URP HDRP Custom
2021.3.16f1 Compatible Compatible Compatible Compatible

This asset doesn't have much to do with the rendering pipeline since it only uses UI elements.

As listed on the Asset Store.