<?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=Arduino%3A%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D1%87%D0%BD%D0%B8%D0%BA_%D1%8F%D0%B7%D1%8B%D0%BA%D0%B0_Arduino%2F%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B8%2FWire</id>
	<title>Arduino:Справочник языка Arduino/Библиотеки/Wire - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wikihandbk.com/ruwiki/index.php?action=history&amp;feed=atom&amp;title=Arduino%3A%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D1%87%D0%BD%D0%B8%D0%BA_%D1%8F%D0%B7%D1%8B%D0%BA%D0%B0_Arduino%2F%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B8%2FWire"/>
	<link rel="alternate" type="text/html" href="http://wikihandbk.com/ruwiki/index.php?title=Arduino:%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D1%87%D0%BD%D0%B8%D0%BA_%D1%8F%D0%B7%D1%8B%D0%BA%D0%B0_Arduino/%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B8/Wire&amp;action=history"/>
	<updated>2026-04-14T21:09:20Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>http://wikihandbk.com/ruwiki/index.php?title=Arduino:%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D1%87%D0%BD%D0%B8%D0%BA_%D1%8F%D0%B7%D1%8B%D0%BA%D0%B0_Arduino/%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B8/Wire&amp;diff=8496143&amp;oldid=prev</id>
		<title>EducationBot в 08:44, 8 июля 2023</title>
		<link rel="alternate" type="text/html" href="http://wikihandbk.com/ruwiki/index.php?title=Arduino:%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D1%87%D0%BD%D0%B8%D0%BA_%D1%8F%D0%B7%D1%8B%D0%BA%D0%B0_Arduino/%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B8/Wire&amp;diff=8496143&amp;oldid=prev"/>
		<updated>2023-07-08T08:44:08Z</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;Версия от 12:44, 8 июля 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-l58&quot;&gt;Строка 58:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 58:&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;&amp;lt;references /&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;&amp;lt;references /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Навигационная таблица/Портал/Arduino}}&lt;/ins&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;[[Категория:Справочник языка Arduino]]&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;[[Категория:Справочник языка Arduino]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>EducationBot</name></author>
	</entry>
	<entry>
		<id>http://wikihandbk.com/ruwiki/index.php?title=Arduino:%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D1%87%D0%BD%D0%B8%D0%BA_%D1%8F%D0%B7%D1%8B%D0%BA%D0%B0_Arduino/%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B8/Wire&amp;diff=24854&amp;oldid=prev</id>
		<title>Myagkij: Замена текста — «{{#setlogo:ArduinoCommunityLogo.png}}» на « »</title>
		<link rel="alternate" type="text/html" href="http://wikihandbk.com/ruwiki/index.php?title=Arduino:%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D1%87%D0%BD%D0%B8%D0%BA_%D1%8F%D0%B7%D1%8B%D0%BA%D0%B0_Arduino/%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B8/Wire&amp;diff=24854&amp;oldid=prev"/>
		<updated>2017-01-15T12:30:00Z</updated>

		<summary type="html">&lt;p&gt;Замена текста — «{{#setlogo:ArduinoCommunityLogo.png}}» на « »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt; &lt;br /&gt;
{{Arduino панель перехода}}&lt;br /&gt;
{{Перевод от Сubewriter}}&lt;br /&gt;
{{Myagkij-редактор}}&lt;br /&gt;
&lt;br /&gt;
=Библиотека Wire&amp;lt;ref&amp;gt;[https://www.arduino.cc/en/Reference/Wire Wire Library]&amp;lt;/ref&amp;gt;=&lt;br /&gt;
&lt;br /&gt;
Эта библиотека позволяет коммуницировать с девайсами, которые работают через интерфейс I2C/TWI. На платах Arduino версии R3 (распиновка 1.0) выводы SDA (линия для передачи данных) и SCL (синхронизирующая линия) расположены на гребенке контактов неподалеку от AREF. Плата Arduino Due имеет два I2C/TWI интерфейса: один (SDA1 и SCL1) расположен вблизи AREF, а дополнительный — на 20-ом и 21-ом контактах.&lt;br /&gt;
&lt;br /&gt;
Вот таблица, которая показывает, где TWI-контакты расположены на различных платах '''Arduino''':&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Плата	 !! Контакты I2C/TWI&lt;br /&gt;
|-&lt;br /&gt;
| Uno, Ethernet || A4 (SDA), A5 (SCL)&lt;br /&gt;
|-&lt;br /&gt;
| Mega2560 ||	20 (SDA), 21 (SCL)&lt;br /&gt;
|-&lt;br /&gt;
|Leonardo ||	2 (SDA), 3 (SCL)&lt;br /&gt;
|-&lt;br /&gt;
| Due || 	20 (SDA), 21 (SCL), SDA1, SCL1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Поскольку это Arduino 1.0, то библиотека Wire наследует у класса Stream, что делает ее совместимой с другими библиотеками, где используются функции чтения/записи. В связи с этим send() и receive() были заменены на read() и write().&lt;br /&gt;
&lt;br /&gt;
==Функции==&lt;br /&gt;
&lt;br /&gt;
* [[Arduino:Справочник языка Arduino/Библиотеки/Wire/begin()|begin()]]&lt;br /&gt;
* [[Arduino:Справочник языка Arduino/Библиотеки/Wire/requestFrom()|requestFrom()]]&lt;br /&gt;
* [[Arduino:Справочник языка Arduino/Библиотеки/Wire/beginTransmission()|beginTransmission()]]&lt;br /&gt;
* [[Arduino:Справочник языка Arduino/Библиотеки/Wire/endTransmission()|endTransmission()]]&lt;br /&gt;
* [[Arduino:Справочник языка Arduino/Библиотеки/Wire/write()|write()]]&lt;br /&gt;
* [[Arduino:Справочник языка Arduino/Библиотеки/Wire/available()|available()]]&lt;br /&gt;
* [[Arduino:Справочник языка Arduino/Библиотеки/Wire/read()|read()]]&lt;br /&gt;
* [[Arduino:Справочник языка Arduino/Библиотеки/Wire/onReceive()|onReceive()]]&lt;br /&gt;
* [[Arduino:Справочник языка Arduino/Библиотеки/Wire/onRequest()|onRequest()]]&lt;br /&gt;
&lt;br /&gt;
==Примечание==&lt;br /&gt;
&lt;br /&gt;
I2C-адреса бывают 7-битными и 8-битными. Семь битов определяют девайс, а восьмой — какая операция происходит (запись или считывание). Библиотека Wire использует только 7-битные адреса. Поэтому если вам в коде или даташите попался 8-битный адрес, то его необходимо сдвинуть на один бит вправо, тем самым создав адрес в диапазоне от «0» до «127». Впрочем, адреса от «0» до «7» не используются, поэтому диапазон адресов сужается до значений от «8» до «127».&lt;br /&gt;
&lt;br /&gt;
==Примеры==&lt;br /&gt;
&lt;br /&gt;
* [http://wikihandbk.com/wiki/Arduino:Примеры/DigitalPotentiometer Digital Potentiometer] — Управление цифровым потенциометром AD5171 при помощи библиотеки Wire.&lt;br /&gt;
* [http://wikihandbk.com/wiki/Arduino:Примеры/MasterReader Master Reader / Slave Writer] — При помощи I2C-коммуникации настраивает две (или более) платы Arduino таким образом, чтобы они делились информацией по принципу «ведущая плата считывает / ведомая плата отсылает».&lt;br /&gt;
* [http://wikihandbk.com/wiki/Arduino:Примеры/MasterWriter Master Writer / Slave Reader] — При помощи I2C-коммуникации настраивает две (или более) платы Arduino таким образом, чтобы они делились информацией по принципу «ведущая плата отсылает / ведомая плата считывает».&lt;br /&gt;
* [http://wikihandbk.com/wiki/Arduino:Примеры/SFRRangerReader SFRRanger Reader] — При помощи I2C-коммуникации считывает данные с ультразвукового дальномера Devantech SRFxx.&lt;br /&gt;
&lt;br /&gt;
=См.также=&lt;br /&gt;
&lt;br /&gt;
# Master Writer&lt;br /&gt;
# Master Reader&lt;br /&gt;
# SFR Ranger Reader&lt;br /&gt;
# Digital Potentiometer&lt;br /&gt;
&lt;br /&gt;
=Внешние ссылки=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
[[Категория:Справочник языка Arduino]]&lt;/div&gt;</summary>
		<author><name>Myagkij</name></author>
	</entry>
</feed>