| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

ExemplarAndTheMakeController

Page history last edited by PBworks 16 years, 5 months ago


Goal

We're trying to connect the Make Controller as an input device to Exemplar so that it can supply sensor readings from its 8 analog input ports.

 

Status

Exemplar as of v0.4.2 now includes experimental support for reading sensor data from the Make controller through OSC over UDP (Ethernet). You should be able to read from it at frequencies up to about 300Hz. your mileage may vary slightly.

 

How-To

  • Load the latest firmware version onto your Make Controller using mchelper. At the time of this writing, this is Heavy v1.2.0.
  • Connect PC running Exemplar and the Make controller via Ethernet. You can either connect the Make Controller to your local/home network and address it as usual, or you can connect it directly to your computer and configure to communicate with it on your own subnet - check this tutorial. Make sure that your controller can send and receive OSC messages over UDP by trying to send "/appled/0/state 1" via Ethernet in mchelper. If LED0 on the application board turns on, you are good to go. Close mchelper.
  • Set up the highlighted fields in the Exemplar preferences as follows:

Then close and restart Eclipse. If upon restart the "heartbeat" LED on the Make Controller stops blinking, power cycle it. Data should now be visible in Exemplar.

(We need to send data to the Make controller to get sensor readings and have overloaded the "output" settings for now; this is ugly and should be changed in the future)

 

Detailed Information

Approach

Since the Controller "speaks" OSC with the supplied Heavy firmware, this should not be all that hard. We should add corresponding classes to dtools-osc-comm.jar.

Polling for messages

The main difference to our other supported microcontrollers is that the MAKE Controller is quiescent by default and needs to be polled for sensor data. That means our Make Controller adapter within Exemplar needs to send OSC messages at, say, 50Hz, requesting new sensor readings. In the future, we may create our own version of the firmware that will automatically send its analogin values.

 

According to the Making Things OSC documentation, the messages to poll for values should be of the following format (no arguments):

/analogin/x/value 
where 0<=x<=7

It's also possible to send

/analogin/*/value
to read all the analog inputs.

 

The messages sent in return will have the same address, and a single int argument.

 

Buffering and translating addresses

A second difference is that Exemplar expects analog sensors to have OSC addresses /adc0 through /adc7 whilee the make controller delivers sensor readings to /analogin/0/value through /analogin/7/value.

 

So our adapter should poll for sensor values, receive the sensor value messages, translate the address and forward/dispatch the messages with an Exemplar-compatible address.

 

Communication modes

There are two possible connection modes: USB or Ethernet.

Ethernet

The Make Controller supports DHCP, so you can plug it into your local network and it will automatically retrieve an address from your router (which you can check in mchelper). Otherwise, default parameters for ethernet are: 192.168.0.200, default port is 10000 (taken from the Network system docs).

 

USB

The controller presents itself as a Serial port; however, the OSC over serial protocol MC is using is NOT compatible with the OSC-over-serial protocol defined by Pascal Stang that we've been using.

Instead, it appears to be a SLIP wrapping of OSC messages, which does not include message length or checksums. For more detail, consult their firmware source code for usb.c.

 

Wiring up sensors

Here is the application board layout of A2D ports:

Comments (0)

You don't have permission to comment on this page.