Serial communication between arduino 33 BLE and Unity

Hi !

I am trying to connect my arduino 33 BLE to Unity through USB (no Bluetooth LE for the moment because I don't know how to use it on Unity). I tried my program with an arduino UNO connected through USB and everything is working fine. I upload the same pogram on the 33 BLE and Unity is not receiving any messages. Does anyone knows why and how can I solve this issue ?

Have a nice evening !

PS: I configured my card correctly and already used it for another project without issue (communication via BLE between my phone and the card).

El Unity3D suele dar problemas de comunicación con dispositivos, a diferencia que el Arduino IDE y Visual Basic 6.0 por ejemplo…, unity haciendo uso de los I.O entradas y salidas del sistema, tiene problemas de optimizaciones.

Suele haber problemas de sincronización y perdidas de datos porque no dispone de configuraciones básicas de estabilidad y conexiones.., no existe un módulo de control, y es algo que hay que tener muy en cuenta.

Estos errores traen muchos quebraderos de cabeza…, el más extendido pudiera ser el “The operation has timed-out”.

El Arduino Nano 33 BTL, no funciona como otros Arduinos..., pero tengo tu solución.

The Unity3D usually gives communication problems with devices, unlike the Arduino IDE and Visual Basic 6.0 for example ..., unity making use of the I.O inputs and outputs of the system, has optimization problems.

There are usually synchronization problems and data loss because it does not have basic stability and connection configurations ..., there is no control module, and it is something that must be taken into account.

These errors bring many headaches ..., the most widespread could be "The operation has timed-out".

The Arduino Nano 33 BTL, does not work like other Arduinos ..., but I have your solution.

using UnityEngine;
using System.IO.Ports;

public class Hola_Mundo_Unity3D : MonoBehaviour
{
public SerialPort serial = new SerialPort("COM3");

void Start()
{
serial.Open();
serial.DtrEnable = true; //Configuramos control de datos por DTR.
// We configure data control by DTR.
serial.ReadTimeout = 500;
}
void Update()
{
print(serial.ReadLine());
}
}

Saludos. :wink:

+Info: Guantes Hápticos

Guantes Hápticos : Foro: Creación > Te enseño: Como Fabricar tus propios Guantes Hápticos Rovian@s. (Legna)