Blinks SDK - API Cheat Sheet

*the blue type shows example values


Display

  • setColor(RED)
  • setColorOnFace(BLUE, 2)

Colors

  • makeColorRGB(255, 0, 255)
  • makeColorHSB(127, 255, 255)
  • dim(RED, 64)
  • RED
  • ORANGE
  • YELLOW
  • GREEN
  • CYAN
  • BLUE
  • MAGENTA
  • WHITE
  • OFF

Button

  • buttonPressed()
  • buttonReleased()
  • buttonSingleClicked()
  • buttonDoubleClicked()
  • buttonMultiClicked()
  • buttonClickCount()
  • buttonLongPressed()
  • buttonDown()

Communication

  • setValueSentOnAllFaces(63)
  • setValueSentOnFace(63, 0)
  • getLastValueReceivedOnFace(5)
  • isValueReceivedOnFaceExpired()
  • didValueOnFaceChange()
  • isAlone()

Time

  • millis()
  • Timer.set(3000)
  • Timer.isExpired()
  • Timer.getRemaining()

Types

  • byte 0-255
  • word 0-65,535
  • int (-32,767, 32,767)
  • long (-big, +big)
  • float ex 3.14
  • double ex 3.14159...
  • bool true/false
  • Color MAGENTA
  • Timer

Convenience

  • FOREACH_FACE(f){...}
  • COUNT_OF(array)
  • sin8_C()
  • map(val, 0, 100, 0, 255)
  • FACE_COUNT
  • MAX_BRIGHTNESS

© Copyright 2020, Move38, Inc.