Hi,
i’m trying to do simple Android App. App have to connect with EV3 by bluetooth, there will be one button, and when you press this button app have to turn on one sequency.
First i have problem with xamarin project. I’m doing it at Visual Studio 2013. This is my code :
`using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using MonoBrick.EV3;
namespace MonoBrick
{
[Activity(Label = “App2”, MainLauncher = true, Icon = “@drawable/icon”)]
public class MainActivity : Activity
{
void Main(string[] args)
{
MonoBrick.Bluetooth<BrickCommand, BrickReply>.IsEnabled;
MonoBrick.Bluetooth<BrickCommand,BrickReply>.Enable();
MonoBrick.Bluetooth.BondDevices;
var device = MonoBrick.Bluetooth<MonoBrick.EV3.Command, MonoBrick.EV3.Reply>.GetBondDevice(“youDeviceName”);
var connection = new Bluetooth<MonoBrick.EV3.Command, MonoBrick.EV3.Reply>(device);
var bricked = new MonoBrick.EV3.Brick<MonoBrick.EV3.Sensor, MonoBrick.EV3.Sensor, MonoBrick.EV3.Sensor, MonoBrick.EV3.Sensor>(connection);
bricked.Connection.Open();
}
}
}
First question, what i have to do wrote in youDeviceName and second, what i’m doing wrong?
Attachments:
You must be
logged in to view attached files.
Follow