Skip to content

Commit

Permalink
Add README, fill some metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
aklajnert committed Sep 29, 2020
1 parent 43c2467 commit b3779b6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name = "idasen"
version = "0.1.0"
authors = ["Andrzej Klajnert <[email protected]>"]
edition = "2018"
license = "MIT"
description = "Crate to control IDASEN standing desk from IKEA via Bluetooth."
homepage = "https://github.com/aklajnert/idasen"
repository = "https://github.com/aklajnert/idasen"
readme = "README.md"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Idasen

Crate to control IDASEN standing desk from IKEA via Bluetooth.

## Usage

```rust
use idasen::Idasen;

// instantiate the struct, this will attempt to connect to the desk and discover its characteristics
let desk = Idasen::new()?;

// alternatively, if there's more than one desk you can get the correct one by it's mac addres
// let desk = Idasen::by_addr("EC:86:F6:44:D3:31")?;

// move desk up and down
desk.up();
desk.down();

// stop desk from moving
desk.stop();

// move desk to desired position - minimum: 6200 (62cm), maximum: 12700 (1.27m)
desk.move_to(7400);

// get the position as an integer (10 = 1mm)
println!("Position: {}", desk.position()?);
```

0 comments on commit b3779b6

Please sign in to comment.