Merge commit 'bfaf553581b4099527bb7756e6b9cdf79ed111f5' into Gwendal

fusion patch météo
This commit is contained in:
Gwendal Le Vaillant 2019-07-04 22:01:31 +02:00
commit d8b9e0ff8d
2 changed files with 49 additions and 0 deletions

View File

@ -31,6 +31,36 @@ The following OSC messages can be sent to the server.
/get/cpu /get/cpu
``` ```
It's running as a systemd service with the following configuration at */etc/systemd/system/osc_server.service*.
```bash
[Unit]
Description=OSC server for puredata
After=network.target
[Service]
Type=simple
User=pi
Group=pi
WorkingDirectory=/home/pi/sources/puredata/
ExecStart=/usr/bin/python3 osc_server.py
StandardOutput=syslog
StandardError=syslog
[Install]
WantedBy=multi-user.target
```
Controlling the service is done with the following commands.
```bash
sudo systemctl start osc_server.service
sudo systemctl stop osc_server.service
sudo systemctl restart osc_server.service
sudo systemctl status osc_server.service
```
# todo # todo
* restructure so that there is a intro section with video examples of nice patches * restructure so that there is a intro section with video examples of nice patches

19
weather_client.pd Normal file
View File

@ -0,0 +1,19 @@
#N canvas 685 54 679 689 10;
#X obj 406 163 mrpeach/udpreceive 8081;
#X obj 406 186 mrpeach/unpackOSC;
#X obj 406 209 print;
#X obj 131 247 mrpeach/packOSC;
#X msg 140 185 send /get/weather \$1;
#X obj 131 322 mrpeach/udpsend;
#X msg 95 94 send /get/bitcoin;
#X msg 131 117 send /get/cpu;
#X msg 158 301 connect 192.168.0.235 8080;
#X msg 140 158 symbol paris;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 3 0 5 0;
#X connect 4 0 3 0;
#X connect 6 0 3 0;
#X connect 7 0 3 0;
#X connect 8 0 5 0;
#X connect 9 0 4 0;