Wiki

Clone wiki

subinitial / Specifying Indices or Masks

The Subinitial Stacks Python library provides a consistent way to specify indices when calling functions or class methods. There are generally two ways to specify indices:

  1. An arbritary set of each integer index can be passed directly, e.g.:

    core.leds.set(0, 1)  # This turns on Core User LEDs 0 and 1
    
  2. A bitmask of indices can be passed with the mask parameter, e.g.:

    core.leds.set(mask=0b11)  # This turns on Core User LEDs 0 and 1
    

Warning

Use EITHER an arbitrary set of integer indices OR a bitmask BUT NOT BOTH

Updated