You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+29-4Lines changed: 29 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,15 +16,15 @@ This repository hosts a collection of examples for working in Embedded JavaScrip
16
16
- The Pebble build depends on a tool called `rebble`. Install that following their [instructions](https://github.com/richinfante/rebbletool?tab=readme-ov-file#setup).
17
17
- You don't need to do the steps after `rebble sdk install latest`
18
18
- 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:
- 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).
28
28
29
29
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`.
30
30
@@ -37,18 +37,43 @@ This repository hosts a collection of examples for working in Embedded JavaScrip
37
37
./qemu-start.sh
38
38
```
39
39
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:
41
41
42
42
```
43
43
rebble logs --qemu localhost:12344
44
44
```
45
45
46
-
-To run `hellopebble`:
46
+
-Finally, run `hellopebble`:
47
47
48
48
```
49
49
cd hellopebble
50
50
./setup.sh
51
51
```
52
+
The screen will be blank in QEMU as hellopebble has no user interface. The log viewer will show:
[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.
0 commit comments