Main Site Documentation

Note: Example for http://code.tinyclr.com/project/266/blinkm-command-wrapper/ is hard to use


#1

(Sorry for putting this here. I spent a lot of time trying to get this example to build, and thought I should jot this down)

The usage example for

http://code.tinyclr.com/project/266/blinkm-command-wrapper/

seems incomplete.

It has this:

// blink green
// uses default I2C address of 0x09
I2CDevice device = new I2CDevice(null);
BlinkM blink = new BlinkM(device);
blink.PlayScript(Script.GreenFlash);

I found to get it to build at all, that I had to do this:

using BlinkM = BlinkM.DominoHost;
        // blink green
        // uses default I2C address of 0x09
        I2CDevice device = new I2CDevice(null);
        BlinkM blink = new BlinkM(device);
        blink.PlayScript(DominoHost.Script.GreenFlash);

hth!


#2

The only difference I see is the namespace in front of the Script enumeration. If you change the namespace in the wrapper class to match what’s in your Program.cs, you would not need the using statement or the qualifier. You could achieve the same thing by removing the namespace declaration around the class.