Skip to content

Commit bcce0f7

Browse files
Added images and links
1 parent 30a4440 commit bcce0f7

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,24 @@ The first game, introduced in session 1. The objective is to reproduce the seque
2929
- Play sound when the user guesses right, or loses game, for example (must wear headphones, or connect to a TV/monitor).
3030

3131
## Remote Message
32-
Remote message is a sample app to demo the Anvil service. The **remote_message.py** file uses the Anvil unplik service and acts as the server, allowing web clients from accessing the pi through it's exposed methods, which are flagged with the @anvil.server.callable decorator. In order to run this demo, you must also clone the client web app [Remote App](https://anvil.works/build#clone:XVB2OIJR2V4DT5Y2=4SQ25RYVZG45OFIU7IXI6KA6)
32+
Remote message is a sample app to demo the Anvil service. The **remote_message.py** file uses the Anvil unplik service and acts as the server, allowing web clients to access the Pi through it's exposed methods, which are flagged with the @anvil.server.callable decorator. In order to run this demo, you must also clone the client web app [Remote App](https://anvil.works/build#clone:XVB2OIJR2V4DT5Y2=4SQ25RYVZG45OFIU7IXI6KA6)
33+
34+
Once cloned, you must enable the Uplink and get your own unique ID. Click on the Gear menu and choose Uplink:
35+
![Uplink Menu](https://anvil.works/learn/tutorials/img/raspberry-pi/uplink-gear-menu.png)
36+
37+
38+
Then Enable the Uplink to get your unique ID:
39+
![Uplink Enable](https://anvil.works/learn/tutorials/img/raspberry-pi/enable-uplink.png)
40+
41+
Now in your Raspberr Pi, with this repo cloned, edit the **remote_message.py** file to include this new ID:
42+
43+
```python
44+
@anvil.server.callable
45+
def show_messgage(message):
46+
sense.show_message(message)
47+
48+
anvil.server.connect("REPLACE_WITH_YOUR_OWN_UPLINK_ID")
49+
50+
```
51+
52+
Make sure to save and Run the app on the Raspberry Pi first before runnign the Anvil Web app.

0 commit comments

Comments
 (0)