How to make Arduino Sketch

Open Wire Editor

First, you need to open Wire Editor in ARDUnity menu.

Create Empty GameObject

You should create a empty GameObject for adding a component of ARDUnity.

It recommend to set name 'Ardunity'.

Add ArdunityApp

  1. Select the created GameObject in Inspector.

  2. Click right button of mouse in Wire Editor.

  1. Select ArdunityApp.

  2. You can see the added ArdunityApp in Inspector and Wire Editor.

ArdunityApp must be existed at least one. Also it is equal to the number of Arduino board.

Add Controller

Controller is a function to control the made circuit in Arduino board.

ARDUnity support a various controller so, you need to choose what is suitable.

It recommend to create child empty GameObject for adding Controller.

Wiring ArdunityApp and Controller

Every controller has owner node.

It means that the controller communicate through one of ArdunityApp.

So, you must wire between ArdunityApp and Controller.

Settings of Sketch Option

ArdunityApp and Controller has sketch options.

You can find it in Inspector.

Each of Controller has a different sketch options.

But, ID is a common option in all of Controller.

Each Controller must have a different id in wired ArdunityApp.

Export and Upload Arduino Sketch

If you did complete, you need to export Arduino Sketch in ArdunityApp.

Then open the exported sketch in Arduino IDE and upload it.

Test in Unity

You need to add CommSocket for testing in Unity.

It recommend to add CommSocket a same gameObject of ArdunityApp.