Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

12 лет назад
12 лет назад
1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/bash
  2. #
  3. # test.sh:
  4. # Simple test: Assumes LEDs on Pins 0-7 and lights them
  5. # in-turn.
  6. #################################################################################
  7. # This file is part of wiringPi:
  8. # A "wiring" library for the Raspberry Pi
  9. #
  10. # wiringPi is free software: you can redistribute it and/or modify
  11. # it under the terms of the GNU Lesser General Public License as published by
  12. # the Free Software Foundation, either version 3 of the License, or
  13. # (at your option) any later version.
  14. #
  15. # wiringPi is distributed in the hope that it will be useful,
  16. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. # GNU Lesser General Public License for more details.
  19. #
  20. # You should have received a copy of the GNU Lesser General Public License
  21. # along with wiringPi. If not, see <http://www.gnu.org/licenses/>.
  22. #################################################################################
  23. # Simple test - assumes LEDs on Pins 0-7.
  24. for i in `seq 0 7`;
  25. do
  26. gpio mode $i out
  27. done
  28. while true;
  29. do
  30. for i in `seq 0 7`;
  31. do
  32. gpio write $i 1
  33. sleep 0.1
  34. done
  35. for i in `seq 0 7`;
  36. do
  37. gpio write $i 0
  38. sleep 0.1
  39. done
  40. done