2 # Example showing how to control the tuxgraphics digital power supply
5 echo "USAGE: ddcp-script-example.sh /dev/ttyUSB0"
6 echo "or ddcp-script-example.sh /dev/ttyUSB1"
10 # included the current directory to have access to the command
11 # ddcp-script-getval to make testing easier. Normally you would
12 # install ddcp-script-getval in /usr/bin and then delete the
13 # line that sets the PATH
15 ddcp-script-ttyinit "$dev"
16 echo "current settings are:"
17 ddcp-script-getval "$dev"
18 echo "setting voltage to 3.3 V"
19 ddcp-script-setval "u=33" "$dev"
20 echo "new settings are:"
21 ddcp-script-getval "$dev"
22 echo "wait one sec, it takes a moment for the display values to adjust as they are polled in the avr software"
24 echo "print settings again:"
25 ddcp-script-getval "$dev"