<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://wikihandbk.com/ruwiki/index.php?action=history&amp;feed=atom&amp;title=Raspberry_Pi%3A%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B%2F%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B0_WiringPi%2F%D0%A2%D0%B5%D1%81%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_WiringPi_v2</id>
	<title>Raspberry Pi:Примеры/Библиотека WiringPi/Тестирование WiringPi v2 - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wikihandbk.com/ruwiki/index.php?action=history&amp;feed=atom&amp;title=Raspberry_Pi%3A%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B%2F%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B0_WiringPi%2F%D0%A2%D0%B5%D1%81%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_WiringPi_v2"/>
	<link rel="alternate" type="text/html" href="http://wikihandbk.com/ruwiki/index.php?title=Raspberry_Pi:%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B/%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B0_WiringPi/%D0%A2%D0%B5%D1%81%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_WiringPi_v2&amp;action=history"/>
	<updated>2026-05-02T03:07:33Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>http://wikihandbk.com/ruwiki/index.php?title=Raspberry_Pi:%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B/%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B0_WiringPi/%D0%A2%D0%B5%D1%81%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_WiringPi_v2&amp;diff=8167835&amp;oldid=prev</id>
		<title>EducationBot в 09:15, 18 июня 2023</title>
		<link rel="alternate" type="text/html" href="http://wikihandbk.com/ruwiki/index.php?title=Raspberry_Pi:%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B/%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B0_WiringPi/%D0%A2%D0%B5%D1%81%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_WiringPi_v2&amp;diff=8167835&amp;oldid=prev"/>
		<updated>2023-06-18T09:15:46Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 13:15, 18 июня 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot;&gt;Строка 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Myagkij-редактор}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Myagkij-редактор}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Черновик}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Тестирование WiringPi v2&amp;lt;ref&amp;gt;[http://wiringpi.com/examples/testing-wiringpi-v2/ wiringpi.com - Testing wiringPi v2]&amp;lt;/ref&amp;gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Тестирование WiringPi v2&amp;lt;ref&amp;gt;[http://wiringpi.com/examples/testing-wiringpi-v2/ wiringpi.com - Testing wiringPi v2]&amp;lt;/ref&amp;gt;=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikihandbkcom:diff::1.12:old-7673572:rev-8167835 --&gt;
&lt;/table&gt;</summary>
		<author><name>EducationBot</name></author>
	</entry>
	<entry>
		<id>http://wikihandbk.com/ruwiki/index.php?title=Raspberry_Pi:%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B/%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B0_WiringPi/%D0%A2%D0%B5%D1%81%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_WiringPi_v2&amp;diff=7673572&amp;oldid=prev</id>
		<title>EducationBot в 14:21, 14 мая 2023</title>
		<link rel="alternate" type="text/html" href="http://wikihandbk.com/ruwiki/index.php?title=Raspberry_Pi:%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B/%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B0_WiringPi/%D0%A2%D0%B5%D1%81%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_WiringPi_v2&amp;diff=7673572&amp;oldid=prev"/>
		<updated>2023-05-14T14:21:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 18:21, 14 мая 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot;&gt;Строка 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 19:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Программа ниже демонстрирует, что [[Raspberry Pi:Библиотеки/WiringPi|WiringPi]] со своей задачей справляется на отлично. Вам больше не нужно записывать байты в конфигурационные регистры, включать шины '''I2C''' и '''SPI''' (хотя загружать модули для ядра '''Linux''' все же придется) или придумывать, как поменять один единственный бит в сдвиговом регистре '''‘595''' – [[Raspberry Pi:Библиотеки/WiringPi|WiringPi]] делает это все за вас! Нужно лишь создать экземпляр устройства, после чего вам будут доступны дополнительные контакты, на которых можно будет использовать функции вроде digitalWrite(), digitalRead() и т.д.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Программа ниже демонстрирует, что [[Raspberry Pi:Библиотеки/WiringPi|WiringPi]] со своей задачей справляется на отлично. Вам больше не нужно записывать байты в конфигурационные регистры, включать шины '''I2C''' и '''SPI''' (хотя загружать модули для ядра '''Linux''' все же придется) или придумывать, как поменять один единственный бит в сдвиговом регистре '''‘595''' – [[Raspberry Pi:Библиотеки/WiringPi|WiringPi]] делает это все за вас! Нужно лишь создать экземпляр устройства, после чего вам будут доступны дополнительные контакты, на которых можно будет использовать функции вроде digitalWrite(), digitalRead() и т.д.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;c&quot; line=&quot;GESHI_NORMAL_LINE_NUMBERS|GESHI_FANCY_LINE_NUMBERS&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot; enclose=&quot;div&lt;/del&gt;&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;c&quot; line=&quot;GESHI_NORMAL_LINE_NUMBERS|GESHI_FANCY_LINE_NUMBERS&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/*&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/*&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  * stress.c:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  * stress.c:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikihandbkcom:diff::1.12:old-40100:rev-7673572 --&gt;
&lt;/table&gt;</summary>
		<author><name>EducationBot</name></author>
	</entry>
	<entry>
		<id>http://wikihandbk.com/ruwiki/index.php?title=Raspberry_Pi:%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B/%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B0_WiringPi/%D0%A2%D0%B5%D1%81%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_WiringPi_v2&amp;diff=40100&amp;oldid=prev</id>
		<title>Myagkij в 19:24, 7 ноября 2018</title>
		<link rel="alternate" type="text/html" href="http://wikihandbk.com/ruwiki/index.php?title=Raspberry_Pi:%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B/%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B0_WiringPi/%D0%A2%D0%B5%D1%81%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_WiringPi_v2&amp;diff=40100&amp;oldid=prev"/>
		<updated>2018-11-07T19:24:47Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Raspberry Pi панель перехода}}&lt;br /&gt;
{{Перевод от Сubewriter}}&lt;br /&gt;
{{Myagkij-редактор}}&lt;br /&gt;
&lt;br /&gt;
{{Черновик}}&lt;br /&gt;
&lt;br /&gt;
=Тестирование WiringPi v2&amp;lt;ref&amp;gt;[http://wiringpi.com/examples/testing-wiringpi-v2/ wiringpi.com - Testing wiringPi v2]&amp;lt;/ref&amp;gt;=&lt;br /&gt;
&lt;br /&gt;
Тестирование – самая сложная часть в разработке новых проектов! Сама [[Raspberry Pi:Библиотеки/WiringPi|WiringPi]] протестирована неплохо, однако ее новые дополнения требуют дополнительных тестов. Поэтому в своем '''«стресс-тесте»''' я решил проверить, хорошо ли интегрируются и работают GPIO-расширители '''MCP23S17 (SPI)''' и '''MCP23017 (I2С)''', а также то, смогу ли управлять при помощи GPIO-контактов '''Raspberry Pi''' двумя сдвиговыми регистрами '''74HC595'''. &lt;br /&gt;
&lt;br /&gt;
Модулю сдвигового регистра нужно '''3''' контакта – один от '''SPI''', один от '''I2C''' и один GPIO-контакт от '''Pi'''.&lt;br /&gt;
&lt;br /&gt;
Я подключил к сдвиговым регистрам свой маленький '''10'''-светодиодный модуль. Обратите внимание, что для того, чтобы задать '''1 бит''', сдвиговым регистрам нужно передать '''10''' тактов, поэтому моя сборка получилась не самой производительной. Впрочем, свою демонстрационную задачу она выполняет – она показывает, что один модуль-расширитель может использовать контакты, заданные в других модулях.&lt;br /&gt;
&lt;br /&gt;
[[File:stressTest.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Это и есть тестовая сборка. К большой макетной плате подключены '''MCP23S17 (слева)''' и '''MCP23017 (справа)''', к маленькой (которая чуть ниже) – два сдвиговых регистра '''74HC595''', а к моей прототипной плате (в самом низу) – кнопка и массив из '''10''' светодиодов.&lt;br /&gt;
&lt;br /&gt;
Программа ниже демонстрирует, что [[Raspberry Pi:Библиотеки/WiringPi|WiringPi]] со своей задачей справляется на отлично. Вам больше не нужно записывать байты в конфигурационные регистры, включать шины '''I2C''' и '''SPI''' (хотя загружать модули для ядра '''Linux''' все же придется) или придумывать, как поменять один единственный бит в сдвиговом регистре '''‘595''' – [[Raspberry Pi:Библиотеки/WiringPi|WiringPi]] делает это все за вас! Нужно лишь создать экземпляр устройства, после чего вам будут доступны дополнительные контакты, на которых можно будет использовать функции вроде digitalWrite(), digitalRead() и т.д.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;GESHI_NORMAL_LINE_NUMBERS|GESHI_FANCY_LINE_NUMBERS&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * stress.c:&lt;br /&gt;
 * Стресс-тест WiringPi&lt;br /&gt;
 *&lt;br /&gt;
 * Копирайт (c) 2012-2013 Гордон Хендерсон. &amp;lt;projects@drogon.net&amp;gt;&lt;br /&gt;
 ***********************************************************************&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;wiringPi.h&amp;gt;&lt;br /&gt;
#include &amp;lt;mcp23s17.h&amp;gt;&lt;br /&gt;
#include &amp;lt;mcp23017.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sr595.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// первый контакт для каждого девайса &lt;br /&gt;
&lt;br /&gt;
#define BASE_SPI        123&lt;br /&gt;
#define BASE_I2C        456&lt;br /&gt;
#define BASE_SR         789&lt;br /&gt;
&lt;br /&gt;
int main (void)&lt;br /&gt;
{&lt;br /&gt;
  int i, bit ;&lt;br /&gt;
&lt;br /&gt;
  wiringPiSetup () ;&lt;br /&gt;
  mcp23017Setup (BASE_I2C, 0x20) ;&lt;br /&gt;
  mcp23s17Setup (BASE_SPI, 0, 0) ;&lt;br /&gt;
  sr595Setup    (BASE_SR, 10, 0, BASE_SPI, BASE_I2C) ;&lt;br /&gt;
&lt;br /&gt;
  printf (&amp;quot;Raspberry Pi - MCP23S17 + MCP23017 + 74x595 Test\n&amp;quot;) ;&lt;br /&gt;
  //  &amp;quot;Тест для Raspberry Pi, чипов MCP23S17 и MCP23017,&lt;br /&gt;
  //   а также 2 сдвиговых регистров 74x595\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  // для кнопки...&lt;br /&gt;
&lt;br /&gt;
  pinMode         (BASE_I2C + 15, INPUT) ;&lt;br /&gt;
  pullUpDnControl (BASE_I2C + 15, PUD_UP) ;&lt;br /&gt;
&lt;br /&gt;
  for (;;)&lt;br /&gt;
  {&lt;br /&gt;
    for (i = 0 ; i &amp;lt; 1024 ; ++i)&lt;br /&gt;
    {&lt;br /&gt;
      for (bit = 0 ; bit &amp;lt; 10 ; ++bit)&lt;br /&gt;
        digitalWrite (BASE_SR + bit, i &amp;amp; (1 &amp;lt;&amp;lt; bit)) ;&lt;br /&gt;
      delay (5) ;&lt;br /&gt;
      while (digitalRead (BASE_I2C + 15) == 0)&lt;br /&gt;
        delay (1) ;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  return 0 ;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=См.также=&lt;br /&gt;
&lt;br /&gt;
=Внешние ссылки=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
[[Категория:Пример с применением библиотеки WiringPi]]&lt;br /&gt;
[[Категория:Пример с применением WiringPi]]&lt;br /&gt;
[[Категория:Пример с использованием библиотеки WiringPi]]&lt;/div&gt;</summary>
		<author><name>Myagkij</name></author>
	</entry>
</feed>