Differences
This shows you the differences between two versions of the page.
|
en:essais_des_sorties_relais [2016/03/25 15:42] |
en:essais_des_sorties_relais [2020/07/05 17:13] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ==== Configuration of the Outputs of the control relays ==== | ||
| + | File ''/ | ||
| + | Edit the file with the command (Add this code at the end of the file just BEFORE "exit 0") | ||
| + | <code bash> | ||
| + | sudo nano / | ||
| + | </ | ||
| + | <code bash> | ||
| + | #RELAYS OUTPUTS | ||
| + | echo " | ||
| + | sleep 2 | ||
| + | echo out > / | ||
| + | echo " | ||
| + | sleep 2 | ||
| + | echo out > / | ||
| + | echo " | ||
| + | sleep 2 | ||
| + | echo out > / | ||
| + | echo " | ||
| + | sleep 2 | ||
| + | echo out > / | ||
| + | </ | ||
| + | |||
| + | ==== Tests of the Outputs of the control relays ==== | ||
| + | |||
| + | You can verify the correct functioning of the outputs of the relays with the following code | ||
| + | <code bash> | ||
| + | sudo nano test-relays.sh | ||
| + | </ | ||
| + | |||
| + | <code bash | test-relays.sh> | ||
| + | #!/bin/bash | ||
| + | # Sequence of testing the 4 relays | ||
| + | |||
| + | for i in `seq 20 23`; | ||
| + | do | ||
| + | echo 1 > / | ||
| + | sleep 1 | ||
| + | done | ||
| + | for i in `seq 20 23`; | ||
| + | do | ||
| + | echo 0 > / | ||
| + | sleep 1 | ||
| + | done | ||
| + | |||
| + | for i in `seq 20 23`; | ||
| + | do | ||
| + | echo 1 > / | ||
| + | done | ||
| + | sleep 1 | ||
| + | for i in `seq 20 23`; | ||
| + | do | ||
| + | echo 0 > / | ||
| + | done | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | For running the code | ||
| + | <code bash> | ||
| + | sudo python test-relays.sh | ||
| + | </ | ||
| + | |||
| + | root@f5uii-serveur:/ | ||
| + | root@f5uii-serveur:/ | ||
| + | ==== Configuration of the Outputs of the control relays ==== | ||
| + | File ''/ | ||
| + | Edit the file with the command (Add this code at the end of the file just BEFORE "exit 0") | ||
| + | |||
| + | <code bash> | ||
| + | sudo nano / | ||
| + | </ | ||
| + | <code bash> | ||
| + | #RELAYS OUTPUTS | ||
| + | echo " | ||
| + | sleep 2 | ||
| + | echo out > / | ||
| + | echo " | ||
| + | sleep 2 | ||
| + | echo out > / | ||
| + | echo " | ||
| + | sleep 2 | ||
| + | echo out > / | ||
| + | echo " | ||
| + | sleep 2 | ||
| + | echo out > / | ||
| + | </ | ||
| + | |||
| + | ==== Tests of the Outputs of the control relays ==== | ||
| + | |||
| + | You can verify the correct functioning of the outputs of the relays with the following code | ||
| + | <code bash> | ||
| + | sudo nano test-relays.sh | ||
| + | </ | ||
| + | |||
| + | <code bash | test-relays.sh> | ||
| + | #!/bin/bash | ||
| + | # Sequence of testing the 4 relays | ||
| + | |||
| + | for i in `seq 20 23`; | ||
| + | do | ||
| + | echo 1 > / | ||
| + | sleep 1 | ||
| + | done | ||
| + | for i in `seq 20 23`; | ||
| + | do | ||
| + | echo 0 > / | ||
| + | sleep 1 | ||
| + | done | ||
| + | |||
| + | for i in `seq 20 23`; | ||
| + | do | ||
| + | echo 1 > / | ||
| + | done | ||
| + | sleep 1 | ||
| + | for i in `seq 20 23`; | ||
| + | do | ||
| + | echo 0 > / | ||
| + | done | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | For running the code | ||
| + | <code bash> | ||
| + | sudo python test-relays.sh | ||
| + | </ | ||
| + | |||
| + | {{youtube> | ||