Additional operations

All of the following operations you should have a valid and initialized Notch network.

Shut down notches

You can programatically send the turn off signal to all of the notches. NotchSerice.shutDown(...)

Coloring notches

Notches have a built in LED light that can be lit programatically. You can interact with them and color all of them or color them individually.

Channels

Sometimes more than one notch network is operating in bluetooth range in the same time. The solution to evade interference between the different measurements is that notches can operate in several radio frequencies.

In practice first you have to turn on and connect to the nothces that will be separate from the others. Then set a unique notchchannel to them. Check out NotchService.changeChannel(...)

If you have different channels, any init call will find notches only in one channel. Check out NotchService.initWithChannelAndWorkout(...)

NotchChannel

The channels are represented with an enum value that can be represented with any value from the english alphabet A-Z. e.g:

Utils

Skeleton

Skeleton is a biomechanical model of the human. It is a tree-structured hierarchy of bones originated from single root bone. The following figure illustrates the hierarchy of the default Notch Skeleton composed of 19 different bones.

Skeleton

A skeleton which contains the bones, with all their parameters. It can greatly influence the charactheristics of the visualisation.

You can load it by using this approach

func loadSkeleton() -> NotchSkeleton? {
    guard let file = Bundle.main.path(forResource: "skeleton_male.js", ofType: nil) else { return nil }
    do {
      let config = try String(contentsOf: URL(fileURLWithPath: file))
      return try NotchSkeleton.from(configJsonString: config)
    } catch {
      return nil
    }
}

Load workout configuration

func readWorkoutConfig() -> String? {
    guard let file = Bundle.main.path(forResource: "chest_config.js", ofType: nil) else { return nil }
    do {
      return try String(contentsOf: URL(fileURLWithPath: file))
    } catch {
      return nil
    }
  }