Skip to content

Commit a4315b0

Browse files
committed
more docs
1 parent 7958621 commit a4315b0

1 file changed

Lines changed: 29 additions & 4 deletions

File tree

readme.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ This repository hosts a collection of examples for working in Embedded JavaScrip
1616
- The Pebble build depends on a tool called `rebble`. Install that following their [instructions](https://github.com/richinfante/rebbletool?tab=readme-ov-file#setup).
1717
- You don't need to do the steps after `rebble sdk install latest`
1818
- Absolutely ignore the note on "Prerequisites for Apple Silicon: Install Rosetta 2".
19-
- Each time you start a new terminal session, be sure to activate its Python virtual environment and add it to your `$PATH`. That looks something like this:
19+
- Each time you start a new terminal session, be sure to activate Rebble's Python virtual environment and add it to your `$PATH`. That looks something like this:
2020

2121
```
2222
cd ~/pebble/rebbletool/rebbletool
2323
source .env/bin/activate
2424
export PATH=~/pebble/rebbletool/rebbletool/bin:$PATH
2525
```
2626

27-
- You will need the Moddable SDK tools available to build the mod. To ensure they are synchronized with the version of the Moddable SDK used in PebbleOS, you can use the macOS binaries [attached to this repository](https://github.com/Moddable-OpenSource/pebble-examples/releases).
27+
- You will need the Moddable SDK tools available to build the mod. To ensure they are synchronized with the version of the Moddable SDK used in PebbleOS firmware, you can use the macOS binaries [attached to this repository](https://github.com/Moddable-OpenSource/pebble-examples/releases).
2828

2929
To use these binaries, add `$MODDABLE` to your environment variables, pointing to the root of the Moddable SDK, and add `$MODDABLE/build/bin/mac/release` to your `$PATH`.
3030

@@ -37,18 +37,43 @@ This repository hosts a collection of examples for working in Embedded JavaScrip
3737
./qemu-start.sh
3838
```
3939

40-
- These examples use `console.log()`. Its output is routed to App Lib's logging facility. To see the output, launch the Pebble log, after launching QEMU but before running the app:
40+
- These examples use `console.log()`. Its output is routed to App Lib's logging facility. To see the output, launch the Pebble log viewer, after launching QEMU but before running the app:
4141

4242
```
4343
rebble logs --qemu localhost:12344
4444
```
4545

46-
- To run `hellopebble`:
46+
- Finally, run `hellopebble`:
4747

4848
```
4949
cd hellopebble
5050
./setup.sh
5151
```
52+
The screen will be blank in QEMU as hellopebble has no user interface. The log viewer will show:
53+
54+
```
55+
(.env) hoddie@jphAir2022 hellopebble % rebble logs --qemu localhost:12344
56+
[15:46:30] xsHost.c:130> unimplemented: xSemaphoreCreateMutex
57+
[15:46:30] xsHost.c:130> unimplemented: xQueueCreate
58+
[15:46:30] xsHost.c:130> Found mod "hellopebble.moddable.tech"
59+
[15:46:30] xsHost.c:130> Hello, Pebble.
60+
```
61+
62+
## Using QEMU
63+
64+
If you have never used QEMNU before, it is not entirely obvious.
65+
66+
When you launch QEMU, it shows the QEMU console in addition to the emulator window for the display. The console is more-or-less useless for JavaScript developers.
67+
68+
However, exiting QEMU is more difficult that you might imagine. The easiest way to kill it is to press Control C in the QEMU console. (Don't ask where your mouse cursor went...)
69+
70+
These are the Pebble button mappings:
71+
- Up - up arrow
72+
- Down - down arrow
73+
- Back - left arrow
74+
- Select - right arrow
75+
76+
When QEMU first starts, PebbleOS shows an alert about having not been properly shut down. This will stay up until dismissed (press Back). You want to dismiss it because it will prevent your application from displaying on the screen.
5277

5378
## The examples
5479

0 commit comments

Comments
 (0)