Make Controller Kit

ActionScript 3.0 Documentation

Board

com.makingthings.makecontroller.Board

Classes:

Back to front page...

Last Updated: August 30, 2007

Summary

Constructor:

Properties:

1. type
3. name

Methods:


Class Information

Board is a representation of a Make Controller connected to mchelper. You'll never need to create your own Board objects, as mchelper is the source of this information, and it will create and notify you when a new board is connected, or a board is disconnected.

A Board has a few relevant properties. The type tells you whether it's USB or Ethernet, and the location is a unique value - an IP address for Ethernet boards, and a device location for USB boards. You can always count on these two values being in place for a baord, while the name and serialnumber values will only be available once mchelper has had a chance to probe the connected boards.

If you're only working with one Make Controller Kit, it can be useful to use the setDefaultBoard on McFlashConnect. This way, once you set the board's information once, you can simply use the send() method, instead of sendToBoard() which requires that you specify each time which board you want to send to. The most convenient time to do this is when mchelper tells you a new board is connected - simply pass this new board into setDefaultBoard().

Example

	function onBoardArrived( event:McEvent )
	{
		var newBoard:Board == event.data;
		mcFlash.setDefaultBoard( newBoard );
	}
	

There are also a few helper methods to find connected boards:

  • getBoardByIPAddress( )
  • getBoardByUsbLocation( )
  • getBoardsByName( )
  • getBoardsBySerialNumber( )
See McFlashConnect for more info.


Constructor


Properties

type

public var type:String

The type of board - this can be either "Ethernet" or "USB".

Also see: (none)

location

public var location:String

The location of the board - for boards connected via Ethernet, this will be their IP address. For boards connected via USB, this will be a unique ID.

Also see: (none)

name

public var name:String

This is the name of the board, as specified by the /system/name OSC message.

Also see: (none)

serialnumber

public var serialnumber:Number

This is the serial number of the board, as specified by the /system/serialnumber OSC message.

Also see: (none)

Methods


The Make Controller Kit is an open source project maintained by MakingThings.
MakingThings code is released under the Apache 2.0 license.
Bug tracker, development wiki and status can be found at http://dev.makingthings.com.
Documentation produced with Zendoc.