Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.

Commit 6050dd1

Browse files
committed
towards getting started
1 parent 08a9ed5 commit 6050dd1

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
const sensor = roles.airPressure()
2+
const mouse = roles.hidMouse()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"label": "Getting Started",
3+
"position": 1.5,
4+
"collapsible": true
5+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Getting Started
2+
3+
This section contains various guides to get started with DeviceScript on different micro-controllers.
4+
The guides don't assume any deep embedded development knowledge.
5+
6+
## Pico Pressure Button
7+
8+
In this guide, you'll use a Raspberry Pi Pico and a pressure sensor to create a mouse button actionable with the mouse.
9+
10+
* [Start guide](/getting-started/pico-pressure-button)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Pico Pressure Button
2+
3+
In this guide, you'll use a Raspberry Pi Pico and a pressure sensor to create a mouse button actionable with the mouse.
4+
5+
:::tip
6+
Don't worry about the necessary hardware yet, you can use DeviceScript simulator get started without it.
7+
:::
8+
9+
## Roles
10+
11+
In DeviceScript, all access to sensors, actuators or other hardware components is abstracted through [Jacdac](https://aka.ms/jacdac) services.
12+
To interact with Jacdac services, you define **roles** for each service you need.
13+
14+
In this scenario, we will need to measure air pressure and send HID mouse commands. Therefore, we declare a `airPressure` role and a `hidMouse` role.
15+
16+
```ts
17+
const sensor = roles.airPressure()
18+
const mouse = roles.hidMouse()
19+
```

0 commit comments

Comments
 (0)