Skip to content

Commit c73521a

Browse files
committed
updated readme
1 parent ed4d520 commit c73521a

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This project uses [DeviceScript](https://microsoft.github.io/devicescript/)
44
to interact with a [blues.io Notecard](https://blues.io/products/notecard/).
55

6-
This library uses the [serial-to-i2c bridge](// https://dev.blues.io/guides-and-tutorials/notecard-guides/serial-over-i2c-protocol/).
6+
This library uses the [serial-to-i2c bridge](https://dev.blues.io/guides-and-tutorials/notecard-guides/serial-over-i2c-protocol/).
77

88
> This library has a minimal surface and most messages have not been mapped to types. See [Notecard API](https://dev.blues.io/api-reference/notecard-api/introduction/) for a full list.
99
@@ -18,12 +18,6 @@ npm install --save pelikhan/devicescript-note
1818
## Configuration
1919

2020
Add the notehub product UID into your settings.
21-
22-
```yaml
23-
# .env.defaults
24-
NOTE_PUID=your-product-uid
25-
```
26-
2721
By default, DeviceScript will use the deviceid as a serial number; but you can override this setting.
2822

2923
```yaml
@@ -35,22 +29,26 @@ NOTE_SN=your-serial-number
3529
## Usage
3630

3731
- Connect the notecard to your I2C pins and power it up.
38-
- Start by calling `init` for the initial handshake with the notecard.
3932

4033
```ts
4134
import { delay, millis } from "@devicescript/core"
42-
import { init, request } from "devicescript-note"
35+
import { init, request, NoteAddRequest } from "devicescript-note"
4336

4437
// configure product UID and serial number
4538
await init()
4639

4740
while (true) {
4841
// send node.add request
49-
const res = await request({ req: "note.add", body: { time: millis() } })
42+
const res = await request(<NoteAddRequest>{
43+
req: "note.add",
44+
body: { time: millis() },
45+
})
5046
console.log(res)
5147
// take a break
5248
await delay(10000)
5349
}
5450
```
5551

56-
## [Contributing](./CONTRIBUTING.md)
52+
## Contributing
53+
54+
Contributions are welcome. [Follow the guide](./CONTRIBUTING.md).

0 commit comments

Comments
 (0)