Blinks SDK - API Cheat Sheet

based on the header file found here

*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()

Datagrams

  • getDatagramLengthOnFace(5)
  • isDatagramReadyOnFace(5)
  • getDatagramOnFace(5)
  • markDatagramReadOnFace(5)
  • sendDatagramOnFace(*data, length, face)

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()
  • random(65535)
  • map(val, 0, 100, 0, 255)
  • FACE_COUNT
  • MAX_BRIGHTNESS
  • hasWoken()
  • startState()

System

  • hasWoken()
  • startState()
  • • START_STATE_POWER_UP
  • • START_STATE_WE_ARE_ROOT
  • • START_STATE_DOWNLOAD_SUCCESS
  • getSerialNumberByte(0 - 8)
  • getBlinkbiosVersion()

© Copyright 2020, Move38, Inc.