This project is read-only.

Project Description

Enough Connectivity eases the access to Bluetooth shields like the Seeedstudio BT Shield and other devices that are connected via the SerialPort on Netduino, .NET Gadgeteer or any .NET Micro Framework based platform.
Enough Software
An Enough Software project.

Usage

Enough Connectivity makes receiving content on Netduino and co really easy:

using Enough.Connectivity;
using Enough.Connectivity.Seeedstudio;
public class Program
{

	private static OutputPort _led = new OutputPort(Pins.ONBOARD_LED, false);
	private static IBinaryConnection _connection;

	public static void Main()
	{
		SeeedstudioBluetoothShieldConnection btConnection = new SeeedstudioBluetoothShieldConnection();
		btConnection.Initialize(serialPortname: SerialPorts.COM2, bluetoothName: "SeeedBTSlave");
		_connection = btConnection;
		_connection.OnStringReceived += onStringReceived;
		Thread.Sleep(0);
	}

	private static void onStringReceived(IBinaryConnection sender, string data)
	{
		if (data == "on" || data == "off")
		{
			bool ledOn = "on".Equals(data);
			_led.Write(ledOn);
		}
		else
		{
			_connection.SendString("unknown command: " + data, sendLength: true);
		}
	}
}

For more information please refer to the documentation.

NuGet

Enough.MF.Connectivity is available on NuGet.





Last edited Oct 17, 2013 at 8:45 PM by enoughrob, version 7