Skip to content

Commit

Permalink
Cleanup readme and fix reference to MIX_TARGET
Browse files Browse the repository at this point in the history
  • Loading branch information
doughsay committed Apr 15, 2020
1 parent 74fd074 commit 96c4fa8
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 14 deletions.
49 changes: 37 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Overview

Xebow is a [nerves-based](https://nerves-project.org/) firmware for the [Keybow](https://shop.pimoroni.com/products/keybow?variant=21246333190227) keypad.
Xebow is a [nerves-based](https://nerves-project.org/) firmware for the
[Keybow](https://shop.pimoroni.com/products/keybow?variant=21246333190227)
keypad.

This project is still in **early development** and only functions as a basic keypad with the ability to cycle through a few LED animations and control sound volume.
This project is still in **early development** and only functions as a basic
keypad with the ability to cycle through a few LED animations and control sound
volume.

# Initial Setup

Expand All @@ -13,39 +17,58 @@ This project is still in **early development** and only functions as a basic key

## SSH Access (optional)

If you would like to flash firmware to the MicroSD card without having to remove it from the keybow each time, you will need to set up SSH access. This also provides access to a running iex shell for running commands directly on the device.
If you would like to flash firmware to the MicroSD card without having to remove
it from the keybow each time, you will need to set up SSH access. This also
provides access to a running iex shell for running commands directly on the
device.

If your SSH public key is not in your home directory's .ssh/ directory with one of the following names, then you can specify the path to your public key by setting the `NERVES_SSH_PUB_KEY` environment variable:
If your SSH public key is not in your home directory's .ssh/ directory with one
of the following names, then you can specify the path to your public key by
setting the `NERVES_SSH_PUB_KEY` environment variable:

- id_rsa.pub
- id_ecdsa.pub
- id_ed25519.pub

## Building the Firmware

If you have not used nerves to build firmware before, you may need to install several dependencies. See the [installation guide](https://hexdocs.pm/nerves/installation.html) if this is your first time using nerves.
If you have not used nerves to build firmware before, you may need to install
several dependencies. See the [installation
guide](https://hexdocs.pm/nerves/installation.html) if this is your first time
using nerves.

The keybow uses a Raspberry Pi Zero WH, so the target would be `rpi0`. However, to better support all the keybow features that xebow uses, a custom target has been setup called `xebow_rpi0` that you will need to use instead. To build and burn the firmware:
The keybow uses a Raspberry Pi Zero WH, so the target would be `rpi0`. However,
to better support all the keybow features that xebow uses, a custom target has
been setup called `kebow` that you will need to use instead. To build and burn
the firmware:

$ export MIX_TARGET=xebow_rpi0
$ export MIX_TARGET=kebow
$ mix deps.get
$ mix firmware

## Writing the Firmware to the MicroSD Card

Insert the MicroSD card into an card reader attached to your computer and then run:
Insert the MicroSD card into an card reader attached to your computer and then
run:

$ mix firmware.burn

The `mix firmware.burn` command will try to detect your MicroSD card and offer to write the data to the card. **IMPORTANT: Triple-check that the device it plans to write to is the MicroSD Card, or you could permanently delete data on another device.**
The `mix firmware.burn` command will try to detect your MicroSD card and offer
to write the data to the card. **IMPORTANT: Triple-check that the device it
plans to write to is the MicroSD Card, or you could permanently delete data on
another device.**

## Booting the Keybow

Remove the MicroSD card and insert it into the keybow. Plug the kebow into the computer and wait for it to boot. Once booted, the keypad should begin cycling all keys through a rainbow of colors.
Remove the MicroSD card and insert it into the keybow. Plug the kebow into the
computer and wait for it to boot. Once booted, the keypad should begin cycling
all keys through a rainbow of colors.

# Keyboard Layout

The xebow firmware sets up the keybow as a 10-key numpad. Turn the keypad so the flashing LEDs are on the left of each key and the USB cord is facing right. In this position, the keypad has the following layout:
The xebow firmware sets up the keybow as a 10-key numpad. Turn the keypad so the
flashing LEDs are on the left of each key and the USB cord is facing right. In
this position, the keypad has the following layout:

```
+-----+-----+-----+
Expand All @@ -59,7 +82,9 @@ The xebow firmware sets up the keybow as a 10-key numpad. Turn the keypad so th
+-----+-----+-----+
```

The `L-1` and `L-2` keys activate different "layers" of the keypad, which allows mapping additional commands to each key. For example, holding `L-2` and hitting `7` will trigger a command to flash the keypad red.
The `L-1` and `L-2` keys activate different "layers" of the keypad, which allows
mapping additional commands to each key. For example, holding `L-2` and hitting
`7` will trigger a command to flash the keypad red.

## Keyboard Shortcuts

Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Xebow.MixProject do

@app :xebow
@version "0.1.0"
@all_targets [:keybow]
@all_targets [:kebow]

def project do
[
Expand Down Expand Up @@ -56,7 +56,7 @@ defmodule Xebow.MixProject do

# Dependencies for specific targets
{:xebow_rpi0,
github: "doughsay/xebow_rpi0", ref: "v1.10.2+xebow.2", runtime: false, targets: :keybow}
github: "doughsay/xebow_rpi0", ref: "v1.10.2+xebow.2", runtime: false, targets: :kebow}
]
end

Expand Down

0 comments on commit 96c4fa8

Please sign in to comment.