Skip to content

Commit f48e27f

Browse files
committed
[green] Add board-neutral GitHub import examples
Signed-off-by: Viwat Vchirawongkwin <viwat.v@chula.ac.th>
1 parent c7dfc85 commit f48e27f

3 files changed

Lines changed: 41 additions & 0 deletions

File tree

‎examples/github-import/README.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!-- SPDX-License-Identifier: MIT -->
2+
<!-- Part of PyBLE (https://pyble.dev) — see /LICENSE. -->
3+
4+
# GitHub import examples
5+
6+
This folder contains small, fresh PyBLE examples for testing the public GitHub
7+
import workflow. Both examples use ordinary Python output only. They assume no
8+
particular board, chip, pin, peripheral, or provisioning profile.
9+
10+
To copy them to a connected board:
11+
12+
1. Connect PyBLE to a compatible board and open the destination directory in
13+
**Files**.
14+
2. Choose **Import examples from GitHub**.
15+
3. Enter `https://github.com/PyBLE-dev/PyBLE` as the repository. Leave the ref
16+
blank for the repository's default branch, or enter an explicit public
17+
branch, tag, or commit.
18+
4. Browse to `examples/github-import`, select `hello.py`, `count.py`, or both,
19+
and continue to review.
20+
5. Confirm the displayed pinned commit, exact board target paths, and any
21+
overwrite warning before importing.
22+
23+
Importing copies the selected files into the Files directory that was open
24+
when the action began. PyBLE does not automatically open or run imported code;
25+
inspect a file first, then run it explicitly when ready.
26+

‎examples/github-import/count.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-License-Identifier: MIT
2+
# Part of PyBLE (https://pyble.dev) — see /LICENSE.
3+
4+
"""Count from one to five using only ordinary Python output."""
5+
6+
for number in range(1, 6):
7+
print("Count:", number)

‎examples/github-import/hello.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: MIT
2+
# Part of PyBLE (https://pyble.dev) — see /LICENSE.
3+
4+
"""Print a small greeting without assuming any attached hardware."""
5+
6+
message = "Hello from PyBLE!"
7+
print(message)
8+

0 commit comments

Comments
 (0)