# bb_nsk v0.1.2 - Table of Contents

> Beam Bots board support for the Nerves Starter Kit and its Balance Bot add-on.

## Pages

- [README](readme.md)
- [Change Log](changelog.md)

## Modules

- [BB.NSK](BB.NSK.md): Board support for the Nerves Starter Kit and its Beam Bots Balance Bot add-on.
- [BB.NSK.Balance.Controller](BB.NSK.Balance.Controller.md): Keeps the robot upright, and knows when it has stopped being able to.
- [BB.NSK.Command.Arm](BB.NSK.Command.Arm.md): Arms the robot, and lands it in the state its attitude calls for.
- [BB.NSK.Command.Fall](BB.NSK.Command.Fall.md): Gives up balancing, leaving the robot waiting to be stood back up.
- [BB.NSK.Command.Poweroff](BB.NSK.Command.Poweroff.md): Shuts the robot down cleanly.
- [BB.NSK.Command.Stand](BB.NSK.Command.Stand.md): Hands the robot over to the balance controller.
- [BB.NSK.Display](BB.NSK.Display.md): The board's 4.2" e-paper panel: its size, its fonts and its packed formats.
- [BB.NSK.Display.Controller](BB.NSK.Display.Controller.md): Decides when the panel is redrawn, and with what.
- [BB.NSK.Display.Dashboard](BB.NSK.Display.Dashboard.md): The panel's main screen: network, robot and system status.
- [BB.NSK.Display.FrameSink](BB.NSK.Display.FrameSink.md): Takes packed frames off the renderer and puts them on the panel.
- [BB.NSK.Display.Supervisor](BB.NSK.Display.Supervisor.md): The panel, its renderer and the sink between them.
- [BB.NSK.Display.TestCard](BB.NSK.Display.TestCard.md): A screen exercising text and each of the basic shapes, for checking that the
panel is wired up and that the rendering pipeline is the right way up.
- [BB.NSK.Display.Viewport](BB.NSK.Display.Viewport.md): The Emerge renderer behind the panel.
- [BB.NSK.Drive](BB.NSK.Drive.md): Where a pilot's intentions reach the balance controller.
- [BB.NSK.Igniter](BB.NSK.Igniter.md): Helpers the `bb_nsk.add_*` tasks share.
- [BB.NSK.Leds](BB.NSK.Leds.md): The four NeoPixels on the add-on board.
- [BB.NSK.Leds.Controller](BB.NSK.Leds.Controller.md): Shows the robot's safety state on the NeoPixels.
- [BB.NSK.Message.Drive](BB.NSK.Message.Drive.md): What a pilot is asking the robot to do.
- [BB.NSK.Message.EnvironmentState](BB.NSK.Message.EnvironmentState.md): The air around the robot.
- [BB.NSK.MixHelpers](BB.NSK.MixHelpers.md): Aliases a project needs when it draws on the panel.
- [BB.NSK.Network](BB.NSK.Network.md): The robot's own access point, and the credentials for joining somebody else's.
- [BB.NSK.Network.Monitor](BB.NSK.Network.Monitor.md): Decides whether the robot is an access point or a station, and notices when
being a station hasn't worked.
- [BB.NSK.PWM](BB.NSK.PWM.md): The kernel's PWM channels, through sysfs.
- [BB.NSK.Sensor.Environment](BB.NSK.Sensor.Environment.md): Reads ambient temperature and humidity from the board's HTS221, and publishes
them as `BB.NSK.Message.EnvironmentState`.
- [BB.NSK.Sensor.Heading](BB.NSK.Sensor.Heading.md): Reports which way the body is pointing, as the `:ground` joint's rotation.
- [BB.NSK.Sensor.Lean](BB.NSK.Sensor.Lean.md): Reports how far the body has fallen away from upright, as the `:lean` joint's
configuration.
- [BB.NSK.Status](BB.NSK.Status.md): A snapshot of what the robot and the board it runs on are currently doing.
- [BB.NSK.TaskCase](BB.NSK.TaskCase.md): A `mix nerves.new`-shaped project for the installer tests to work on.
- [BB.NSK.TestRobot](BB.NSK.TestRobot.md): The Balance Bot's topology, with nothing attached to it.
- [BB.NSK.Wheel](BB.NSK.Wheel.md): Drives one wheel through a DRV8837 H-bridge.

## Mix Tasks

- [mix bb_nsk.add_balance](Mix.Tasks.BbNsk.AddBalance.md): Adds the balance loop, its states and its commands
- [mix bb_nsk.add_display](Mix.Tasks.BbNsk.AddDisplay.md): Adds the 4.2" e-paper panel and the status screen it draws
- [mix bb_nsk.add_environment_sensor](Mix.Tasks.BbNsk.AddEnvironmentSensor.md): Adds the base board's HTS221 temperature and humidity sensor
- [mix bb_nsk.add_imu](Mix.Tasks.BbNsk.AddImu.md): Adds the Balance Bot's IMU, its filter and the two derived sensors
- [mix bb_nsk.add_leds](Mix.Tasks.BbNsk.AddLeds.md): Adds the NeoPixel state indicator
- [mix bb_nsk.add_web](Mix.Tasks.BbNsk.AddWeb.md): Adds the drive pad, the wifi setup page and the Phoenix they need
- [mix bb_nsk.add_wheels](Mix.Tasks.BbNsk.AddWheels.md): Adds the Balance Bot's two wheels to a robot
- [mix bb_nsk.add_wifi](Mix.Tasks.BbNsk.AddWifi.md): Makes the robot bring up its own network when it has none to join
- [mix bb_nsk.cheat](Mix.Tasks.BbNsk.Cheat.md): Builds the whole Balance Bot in one go
- [mix bb_nsk.doctor](Mix.Tasks.BbNsk.Doctor.md): Checks that the board is showing the hardware this package expects
- [mix bb_nsk.install](Mix.Tasks.BbNsk.Install.md): Installs Balance Bot board support into a Nerves project
- [mix bb_nsk.prune_nifs](Mix.Tasks.BbNsk.PruneNifs.md): Removes NIFs built for another architecture before a firmware build
- [mix bb_nsk.restore_nifs](Mix.Tasks.BbNsk.RestoreNifs.md): Puts the host's NIF back after a firmware build removed it

