Step 1: On your pi3, look for a console command to play a sound. The tool 'aplay' is a good starting point. Start with "aplay test.wav" and use google for the details.
Step2: find the ip address of your pi3. Console command "ip addr" will help. If you use DHCP, then set the hostname of the PI3 to a specific name, e.g. "pi3sound"
Step 3: on your zero, find out if you can reach the pi3. In a console window, ping the pi3 "ping <the ip of your pi3 or the hostname>"
Step 4: on your zero, use ssh to invoke the command from step 1 on the pi3. "ssh pi@<ip from step2 or hostname> <command from step1>"
Step 5: handle the usual login security problems. Either solve a key exchange procedure (recommended) or use sshpass to provide password for pi3 on the zero.
Step 6: write a python program which, when button pressed, invokes the ssh command.
Step 7: think about other ways to solve this.
Step2: find the ip address of your pi3. Console command "ip addr" will help. If you use DHCP, then set the hostname of the PI3 to a specific name, e.g. "pi3sound"
Step 3: on your zero, find out if you can reach the pi3. In a console window, ping the pi3 "ping <the ip of your pi3 or the hostname>"
Step 4: on your zero, use ssh to invoke the command from step 1 on the pi3. "ssh pi@<ip from step2 or hostname> <command from step1>"
Step 5: handle the usual login security problems. Either solve a key exchange procedure (recommended) or use sshpass to provide password for pi3 on the zero.
Step 6: write a python program which, when button pressed, invokes the ssh command.
Step 7: think about other ways to solve this.
Statistics: Posted by ghp — Thu Dec 12, 2024 7:35 am