<?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%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B%2FCircularLightBuffer</id>
	<title>Arduino:Примеры/CircularLightBuffer - История изменений</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%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B%2FCircularLightBuffer"/>
	<link rel="alternate" type="text/html" href="http://wikihandbk.com/ruwiki/index.php?title=Arduino:%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B/CircularLightBuffer&amp;action=history"/>
	<updated>2026-05-14T01:24:36Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>http://wikihandbk.com/ruwiki/index.php?title=Arduino:%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B/CircularLightBuffer&amp;diff=8495845&amp;oldid=prev</id>
		<title>EducationBot в 08:33, 8 июля 2023</title>
		<link rel="alternate" type="text/html" href="http://wikihandbk.com/ruwiki/index.php?title=Arduino:%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B/CircularLightBuffer&amp;diff=8495845&amp;oldid=prev"/>
		<updated>2023-07-08T08:33:04Z</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:33, 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-l71&quot;&gt;Строка 71:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 71:&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;[[Категория:Пример]]&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;[[Категория:Примеры]]&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;[[Категория:Пример программирования 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;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%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B/CircularLightBuffer&amp;diff=16337&amp;oldid=prev</id>
		<title>Myagkij в 21:00, 15 октября 2016</title>
		<link rel="alternate" type="text/html" href="http://wikihandbk.com/ruwiki/index.php?title=Arduino:%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B/CircularLightBuffer&amp;diff=16337&amp;oldid=prev"/>
		<updated>2016-10-15T21:00:40Z</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;{{Arduino панель перехода}}&lt;br /&gt;
{{Перевод от Сubewriter}}&lt;br /&gt;
{{Myagkij-редактор}}&lt;br /&gt;
&lt;br /&gt;
= Анимированный «значок загрузки» из светодиодов &amp;lt;ref&amp;gt;[https://github.com/PaulStoffregen/Tlc5940/blob/master/examples/CircularLightBuffer/CircularLightBuffer.pde github.com - CircularLightBuffer.pde]&amp;lt;/ref&amp;gt;=&lt;br /&gt;
&lt;br /&gt;
Это скетч для [[Arduino:Библиотеки/TLC5940|библиотеки TLC5940]] и платы '''Arduino''', который демонстрирует, как при помощи чипа '''TLC5940''' сделать на светодиодах анимацию «значка загрузки». Для этого светодиоды понадобится выставить в круг.&lt;br /&gt;
&lt;br /&gt;
== Код ==&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;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
Анимированный «значок загрузки» из светодиодов.&lt;br /&gt;
&lt;br /&gt;
Если вы как-то умудрились сделать круг из светодиодов, &lt;br /&gt;
обязательно вышлите фотографию! Этот скетч считывает &lt;br /&gt;
аналоговые данные с 0-ого аналогового контакта и добавляет &lt;br /&gt;
к нему значение, считанное с последнего светодиода. Если &lt;br /&gt;
итоговая сумма получается выше «4095», то светодиод выключается,&lt;br /&gt;
а если меньше, то итоговая сумма становится значением для LED 0.&lt;br /&gt;
&lt;br /&gt;
Если заземлить 12-ый контакт, значение на LED 0 будет «0».&lt;br /&gt;
&lt;br /&gt;
После этого скетч сдвигает все значения на светодиодах &lt;br /&gt;
на одну единицу вперед (в итоге LED 0 становится LED 1 и т.д.), &lt;br /&gt;
а LED 0 получает значение, которое было на последнем светодиоде.&lt;br /&gt;
Таким образом, если включен только один светодиод, он будет &lt;br /&gt;
бегать по кругу вечно.&lt;br /&gt;
&lt;br /&gt;
Настройки оборудования смотрите в примере «Базовое использование».&lt;br /&gt;
Создан 2009-02-04 Алексом Леоне (Alex Leone; acleone ~AT~ gmail.com).&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;Tlc5940.h&amp;quot;&lt;br /&gt;
#include &amp;quot;tlc_shifts.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// какой аналоговый контакт будем использовать:&lt;br /&gt;
#define ANALOG_PIN      0&lt;br /&gt;
&lt;br /&gt;
// какой контакт будет стирать значения на светодиодах:&lt;br /&gt;
#define CLEAR_PIN      12&lt;br /&gt;
&lt;br /&gt;
// сколько секунд потребуется на полный круг по всем светодиодам:&lt;br /&gt;
#define SCOPE_PERIOD    (2000 * NUM_TLCS)&lt;br /&gt;
#define LED_PERIOD      SCOPE_PERIOD / (NUM_TLCS * 16)&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  pinMode(CLEAR_PIN, INPUT);&lt;br /&gt;
  digitalWrite(CLEAR_PIN, HIGH); // включаем подтягивающий резистор&lt;br /&gt;
  Tlc.init();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
 // функция tlc_shiftUp() возвращает значение с последнего светодиода:&lt;br /&gt;
  uint16_t sum = tlc_shiftUp() + analogRead(ANALOG_PIN) * 4;&lt;br /&gt;
  if (digitalRead(CLEAR_PIN) == LOW || sum &amp;gt; 4095)&lt;br /&gt;
    sum = 0;&lt;br /&gt;
  Tlc.set(0, sum);&lt;br /&gt;
  Tlc.update();&lt;br /&gt;
  delay(LED_PERIOD);&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;
[[Категория:Пример]]&lt;br /&gt;
[[Категория:Примеры]]&lt;br /&gt;
[[Категория:Пример программирования Arduino]]&lt;br /&gt;
[[Категория:Примеры программирования Arduino]]&lt;/div&gt;</summary>
		<author><name>Myagkij</name></author>
	</entry>
</feed>