diff --git a/README.md b/README.md index 0c90d26..523f9e8 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,36 @@ The following OSC messages can be sent to the server. /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 * restructure so that there is a intro section with video examples of nice patches diff --git a/weather_client.pd b/weather_client.pd new file mode 100644 index 0000000..fbf3848 --- /dev/null +++ b/weather_client.pd @@ -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;