#!/bin/bash

CHANNEL_PATH=/sys/relays/channels
PASCAL_PATH=/sys/pascal

R_VAL=30

# Turn on channels
echo 1 > $CHANNEL_PATH/ch1/mode
echo 1 > $CHANNEL_PATH/ch2/mode

# Standby
#echo 1 > $PASCAL_PATH/standby

# Unmute
#echo 1 > $PASCAL_PATH/mute

echo 1 > /sys/class/gpio/gpio88/value
echo 1 > /sys/class/gpio/gpio89/value

# Talkback rheostat control (0 is wide open)
echo $R_VAL > /sys/bus/iio/devices/iio\:device1/out_resistance0_raw
echo $R_VAL > /sys/bus/iio/devices/iio\:device0/out_resistance0_raw

