220@710
240@710 corner: 266.0d@730
220@710 corner: 286.0d@730
244@723.5d
320@690
340@690 corner: 380@730
320@690 corner: 400@730
346.5d@704.5d
320@710 corner: 340@730
680@520
700@520 corner: 825.0d@760
680@520 corner: 845.0d@760
705.0d@534.5d
500@540
520@540 corner: 558.0d@560
500@540 corner: 578.0d@560
524@554.5d
500@550
520@550
500@540 corner: 520@560
558.0d@540 corner: 578.0d@560
578.0d@550
1
in_Eff
3
0
30.0d
9.0d
0.0d
558.0d@550
578.0d@550 corner: 578.0d@550
eff_in
680@550
700@550
animation_MAX7219_3
e554101d-bcd3-4a10-bfe6-b172bd9f2a83
079ef5f4-b1a0-492c-9f92-9d05ebb4aa4b
eff_out
5d07ca70-237e-424c-b64d-c08e19d133e0
f9b4ce8a-2a66-4bed-96e6-e732d5fb164c
animation_MAX7219
PAUSE
3ed7e0a2-2b1f-45d5-b314-9ddf5407ea9e
822ac632-9a44-4bb4-9f94-c4201bf06f18
SPEED
7395c04f-361a-4ec8-9f3b-53480353f647
3403b7bd-ea3f-4884-a241-8f7c4ed2dacf
399fb437-da8e-49a4-ae89-76444078ba65
Анимация МАХ7219
for (uint8_t j=0; j<3; j++)
{
textPosition_t just;
switch (j)
{
case 0: just = PA_LEFT; break;
case 1: just = PA_CENTER; break;
case 2: just = PA_RIGHT; break;
}
for (uint8_t i=0; i<ARRAY_SIZE(catalog); i++)
{
P.displayText(catalog[i].psz, just, catalog[i].speed, catalog[i].pause, catalog[i].effect, catalog[i].effect);
while (!P.displayAnimate());
delay(catalog[i].pause);
}
}
452
P.begin();
P.setInvert(false);
for (uint8_t i=0; i<ARRAY_SIZE(catalog); i++)
{
catalog[i].speed *= SPEED;
catalog[i].pause *= PAUSE;
}
151
#include
<MD_Parola.h>
#include
<MD_MAX72xx.h>
#include
<SPI.h>
#define
MAX_DEVICES
4
#define
CLK_PIN
13
#define
DATA_PIN
11
#define
CS_PIN
10
P
= MD_Parola(CS_PIN, MAX_DEVICES);
MD_Parola
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES)
#define
ARRAY_SIZE(x)
(sizeof(x)/sizeof(x[0]))
text effect to display
struct
{
textEffect_t effect;
typedef
text string nul terminated
psz
;
char *
speed multiplier of library default
speed
;
uint16_t
pause multiplier for library default
pause
;
uint16_t
sCatalog
;
}
catalog
[] =
{
{ PA_PRINT, "PRINT", 1, 1 },
{ PA_SLICE, "SLICE", 1, 1 },
{ PA_MESH, "MESH", 20, 1 },
{ PA_FADE, "FADE", 20, 1 },
{ PA_WIPE, "WIPE", 5, 1 },
{ PA_WIPE_CURSOR, "WPE_C", 4, 1 },
{ PA_OPENING, "OPEN", 3, 1 },
{ PA_OPENING_CURSOR, "OPN_C", 4, 1 },
{ PA_CLOSING, "CLOSE", 3, 1 },
{ PA_CLOSING_CURSOR, "CLS_C", 4, 1 },
{ PA_RANDOM, "RAND", 3, 1 },
{ PA_BLINDS, "BLIND", 7, 1 },
{ PA_DISSOLVE, "DSLVE", 7, 1 },
{ PA_SCROLL_UP, "SC_U", 5, 1 },
{ PA_SCROLL_DOWN, "SC_D", 5, 1 },
{ PA_SCROLL_LEFT, "SC_L", 5, 1 },
{ PA_SCROLL_RIGHT, "SC_R", 5, 1 },
{ PA_SCROLL_UP_LEFT, "SC_UL", 7, 1 },
{ PA_SCROLL_UP_RIGHT, "SC_UR", 7, 1 },
{ PA_SCROLL_DOWN_LEFT, "SC_DL", 7, 1 },
{ PA_SCROLL_DOWN_RIGHT, "SC_DR", 7, 1 },
{ PA_SCAN_HORIZ0, "SCNH0", 4, 1 },
{ PA_SCAN_HORIZ1, "SCNH1", 4, 1 },
{ PA_SCAN_VERT0, "SCNV0", 3, 1 },
{ PA_SCAN_VERT1, "SCNV1", 3, 1 },
{ PA_GROW_UP, "GRW_U", 7, 1 },
{ PA_GROW_DOWN, "GRW_D", 7, 1 },
};
sCatalog
PAUSE_SET
animation_MAX7219_1
SPEED_IN
FLIP_SET
56073eaa-09db-4205-b5f0-05328ec6bf5b
0e0cd874-2631-47a4-8d6a-0737dd12c7e1
JUSTIFY_SET
285cac63-f041-42e7-bdef-a9249e89b7bc
9dc0ff3c-8fec-46a2-8642-8e9af0c16b4e
INTENSITY_SET
9c16e22a-189f-44e9-b633-d20fba189a58
424b710a-052e-4727-8920-f750bf81f585
ind
3fc2e891-78c4-4a20-9e79-90fff31308b5
e334162f-bdee-4886-bd29-61379d0386f4
3f829cfc-97c0-4d33-bc03-537ddc170846
N
4
4
14d4cfd4-bb46-4e5c-8bb3-a19531818a53
e8a0d088-9e83-4a98-9cf5-d1d686ccec80
{
textPosition_t PA_CENTER;
P.displayText(catalog[ind].psz, just, catalog[ind].speed, catalog[ind].pause, catalog[ind].effect, catalog[ind].effect);
while (!P.displayAnimate());
}
212
P.begin();
P.setInvert(false);
for (uint8_t i=0; i<ARRAY_SIZE(catalog); i++)
{
catalog[i].speed *= SPEED;
catalog[i].pause *= PAUSE;
}
152
#include
<MD_Parola.h>
#include
<MD_MAX72xx.h>
#include
<SPI.h>
#define
CLK_PIN
13
#define
DATA_PIN
11
#define
CS_PIN
10
MAX_DEVICES
= N;
int
P
= MD_Parola(CS_PIN, MAX_DEVICES);
MD_Parola
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES)
#define
ARRAY_SIZE(x)
(sizeof(x)/sizeof(x[0]))
text effect to display
struct
{
textEffect_t effect;
typedef
text string nul terminated
psz
;
char *
speed multiplier of library default
speed
;
uint16_t
pause multiplier for library default
pause
;
uint16_t
sCatalog
;
}
catalog
[] =
{
{ PA_PRINT, "PRINT", 1, 1 },
{ PA_SLICE, "SLICE", 1, 1 },
{ PA_MESH, "MESH", 20, 1 },
{ PA_FADE, "FADE", 20, 1 },
{ PA_WIPE, "WIPE", 5, 1 },
{ PA_WIPE_CURSOR, "WPE_C", 4, 1 },
{ PA_OPENING, "OPEN", 3, 1 },
{ PA_OPENING_CURSOR, "OPN_C", 4, 1 },
{ PA_CLOSING, "CLOSE", 3, 1 },
{ PA_CLOSING_CURSOR, "CLS_C", 4, 1 },
{ PA_RANDOM, "RAND", 3, 1 },
{ PA_BLINDS, "BLIND", 7, 1 },
{ PA_DISSOLVE, "DSLVE", 7, 1 },
{ PA_SCROLL_UP, "SC_U", 5, 1 },
{ PA_SCROLL_DOWN, "SC_D", 5, 1 },
{ PA_SCROLL_LEFT, "SC_L", 5, 1 },
{ PA_SCROLL_RIGHT, "SC_R", 5, 1 },
{ PA_SCROLL_UP_LEFT, "SC_UL", 7, 1 },
{ PA_SCROLL_UP_RIGHT, "SC_UR", 7, 1 },
{ PA_SCROLL_DOWN_LEFT, "SC_DL", 7, 1 },
{ PA_SCROLL_DOWN_RIGHT, "SC_DR", 7, 1 },
{ PA_SCAN_HORIZ0, "SCNH0", 4, 1 },
{ PA_SCAN_HORIZ1, "SCNH1", 4, 1 },
{ PA_SCAN_VERT0, "SCNV0", 3, 1 },
{ PA_SCAN_VERT1, "SCNV1", 3, 1 },
{ PA_GROW_UP, "GRW_U", 7, 1 },
{ PA_GROW_DOWN, "GRW_D", 7, 1 },
};
sCatalog
EFFECT_SET
Эффект входа 28 шт
INVERSE_SET
0a3218e9-213a-44e0-8c38-0926f22bd961
3e2f1442-b37f-483f-a06e-b4916a3b7216
50ad2e77-a8df-4bee-b6b9-78c936419449
Анимация МАХ7219_1
doUI();
if (P.displayAnimate())
{
P.setTextBuffer(pc[curString]);
P.displayReset();
curString = NEXT_STRING;
}
129
P.begin();
P.displayText(pc[curString], PA_CENTER, P.getSpeed(), PAUSE_TIME, PA_PRINT, PA_PRINT);
curString = NEXT_STRING;
131
#include
<MD_Parola.h>
#include
<MD_MAX72xx.h>
#include
<SPI.h>
HARDWARE SPI
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
int MAX_DEVICES N
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10
SOFTWARE SPI
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
in milliseconds
#define
PAUSE_TIME
0
in analog units
#define
SPEED_DEADBAND
20
Global variables
curString
= 0;
uint8_t
*pc
[] =
{
"Parola for",
"Arduino",
"LED Matrix",
"Display"
};
char
#define
NEXT_STRING
((curString + 1) % ARRAY_SIZE(pc))
{
int16_t speed = SPEED_IN;
if ((speed >= ((int16_t)P.getSpeed() + SPEED_DEADBAND)) ||
(speed <= ((int16_t)P.getSpeed() - SPEED_DEADBAND)))
{
P.setSpeed(speed);
}
}
if (JUSTIFY_SET)
{
static uint8_t curMode = 0;
textPosition_t align = P.getTextAlignment();
textPosition_t textAlign[] =
{
PA_LEFT,
PA_CENTER,
PA_RIGHT
};
P.setTextAlignment(textAlign[curMode]);
P.displayReset();
curMode = (curMode + 1) % ARRAY_SIZE(textAlign);
}
if (EFFECT_SET)
{
static uint8_t curFX = 0;
textEffect_t effect[] =
{
PA_PRINT,
PA_SCROLL_UP,
PA_SCROLL_DOWN,
PA_SCROLL_LEFT,
PA_SCROLL_RIGHT,
PA_SLICE,
PA_FADE,
PA_MESH,
PA_BLINDS,
PA_DISSOLVE,
PA_RANDOM,
PA_WIPE,
PA_WIPE_CURSOR,
PA_OPENING,
PA_OPENING_CURSOR,
PA_CLOSING,
PA_CLOSING_CURSOR,
PA_SCROLL_UP_LEFT,
PA_SCROLL_UP_RIGHT,
PA_SCROLL_DOWN_LEFT,
PA_SCROLL_DOWN_RIGHT,
PA_SCAN_HORIZ0,
PA_SCAN_HORIZ1,
PA_SCAN_VERT0,
PA_SCAN_VERT1,
PA_GROW_UP,
PA_GROW_DOWN,
};
curFX = (curFX + 1) % ARRAY_SIZE(effect);
P.setTextEffect(effect[curFX], effect[curFX]);
P.displayClear();
P.displayReset();
}
if (PAUSE_SET)
{
if (P.getPause() <= P.getSpeed())
P.setPause(PAUSE_TIME);
else
P.setPause(0);
}
if (INTENSITY_SET)
{
static uint8_t intensity = 7;
intensity = ++intensity % (MAX_INTENSITY + 1);
if (intensity == 0)
{
P.displayShutdown(true);
}
else
{
P.setIntensity(intensity);
P.displayShutdown(false);
}
}
if (INVERSE_SET)
{
P.setInvert(!P.getInvert());
}
if (FLIP_SET)
{
P.setZoneEffect(0, !P.getZoneEffect(0, PA_FLIP_LR), PA_FLIP_LR);
P.setZoneEffect(0, !P.getZoneEffect(0, PA_FLIP_UD), PA_FLIP_UD);
}
1965
void
doUI
EFFECT_SET_in
Эффект входа 24шт
EFFECT_SET_out
82e566ce-88b1-4483-abac-b8243580fd83
39f283e1-ba82-4805-bbd2-c321f1e8cd0e
16b244f6-5869-4714-9c7e-60a242e58d18
Анимация МАХ7219_3
TEXT1
Arduino
75ab8633-45f7-43a5-943e-16a74e357d4c
85efaf29-34ee-4672-9866-2aad48e8ae4a
TEXT2
FLProg
e28c2ad3-8df6-4c46-8f88-b83e54fda452
1d47293a-6c87-42d9-94e2-6f253d976cba
TEXT3
FLProg
aeb34ca7-fb91-42fd-9957-fa78c8cefd72
51d8593b-f89d-4e70-845e-3018768fa574
if (P.displayAnimate())
{
if (newMessageAvailable)
{
strcpy(curMessage, newMessage);
newMessageAvailable = false;
}
P.displayReset();
}
readSerial();
191
Serial.begin(57600);
Serial.print("\n[Parola Scrolling Spacing]\nType a message for the scrolling display\nEnd message line with a newline");
uiDirection.begin();
uiInvert.begin();
pinMode(SPEED_IN, INPUT);
doUI();
P.begin();
P.displayText(curMessage, PA_CENTER, P.getSpeed(), PAUSE_TIME, PA_PRINT, PA_PRINT);
333
#include
<MD_Parola.h>
#include
<MD_MAX72xx.h>
#include
<SPI.h>
#define
DEBUG
0
#if
DEBUG
#define
PRINT(s,
x) { Serial.print(F(s)); Serial.print(x); }
#define
PRINTS(x)
Serial.print(F(x))
#define
PRINTX(x)
Serial.println(x, HEX)
#else
#define
PRINT(s,
x)
#define
PRINTS(x)
#define
PRINTX(x)
#endif
MAX_DEVICES
= N;
int
#define
CLK_PIN
13
#define
DATA_PIN
11
#define
CS_PIN
10
#define
SPEED_IN
A5
#define
BUF_SIZE
75
curMessage
[BUF_SIZE] = { "" };
char
newMessage
[BUF_SIZE] = { "Привет! Вводите новый текст?" };
char
newMessageAvailable
= true;
bool
HARDWARE SPI
P
= MD_Parola(CS_PIN, MAX_DEVICES);
MD_Parola
SOFTWARE SPI
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
in milliseconds
#define
PAUSE_TIME
1000
in analog units
#define
SPEED_DEADBAND
5
{
int16_t speed = map(analogRead(SPEED_IN), 0, 1023, 0, 200);
if ((speed >= ((int16_t)P.getSpeed() + SPEED_DEADBAND)) ||
(speed <= ((int16_t)P.getSpeed() - SPEED_DEADBAND)))
{
P.setSpeed(speed);
}
}
if (JUSTIFY_SET)
{
static uint8_t curMode = 0;
textPosition_t align = P.getTextAlignment();
textPosition_t textAlign[] =
{
PA_LEFT,
PA_CENTER,
PA_RIGHT
};
P.setTextAlignment(textAlign[curMode]);
P.displayReset();
curMode = (curMode + 1) % ARRAY_SIZE(textAlign);
}
if (EFFECT_SET)
{
static uint8_t curFX = 0;
textEffect_t effect[] =
{
PA_PRINT,
PA_SCROLL_UP,
PA_SCROLL_DOWN,
PA_SCROLL_LEFT,
PA_SCROLL_RIGHT,
PA_SLICE,
PA_FADE,
PA_MESH,
PA_BLINDS,
PA_DISSOLVE,
PA_RANDOM,
PA_WIPE,
PA_WIPE_CURSOR,
PA_OPENING,
PA_OPENING_CURSOR,
PA_CLOSING,
PA_CLOSING_CURSOR,
PA_SCROLL_UP_LEFT,
PA_SCROLL_UP_RIGHT,
PA_SCROLL_DOWN_LEFT,
PA_SCROLL_DOWN_RIGHT,
PA_SCAN_HORIZ0,
PA_SCAN_HORIZ1,
PA_SCAN_VERT0,
PA_SCAN_VERT1,
PA_GROW_UP,
PA_GROW_DOWN,
};
curFX = (curFX + 1) % ARRAY_SIZE(effect);
P.setTextEffect(effect[curFX], effect[curFX]);
P.displayClear();
P.displayReset();
}
if (PAUSE_SET)
{
if (P.getPause() <= P.getSpeed())
P.setPause(PAUSE_TIME);
else
P.setPause(0);
}
if (INTENSITY_SET)
{
static uint8_t intensity = 7;
intensity = ++intensity % (MAX_INTENSITY + 1);
if (intensity == 0)
{
P.displayShutdown(true);
}
else
{
P.setIntensity(intensity);
P.displayShutdown(false);
}
}
if (INVERSE_SET)
{
P.setInvert(!P.getInvert());
}
if (FLIP_SET)
{
P.setZoneEffect(0, !P.getZoneEffect(0, PA_FLIP_LR), PA_FLIP_LR);
P.setZoneEffect(0, !P.getZoneEffect(0, PA_FLIP_UD), PA_FLIP_UD);
}
1999
{
static char *cp = newMessage;
while (Serial.available())
{
*cp = (char)Serial.read();
if ((*cp == '\n') || (cp - newMessage >= BUF_SIZE-2)) // end of message character or full buffer
{
*cp = '\0'; // end the string
// restart the index for next filling spree and flag we have a message waiting
cp = newMessage;
newMessageAvailable = true;
}
else // move char pointer to next position
cp++;
}
}
461
void
readSerial
effect_set
pause_set
flip_set
justify_set
intensity_set
inverse_set
ad14cbd5-1e52-48e5-97ad-b7f5832f3887
Serial.begin(57600);
Serial.print("\n[Parola Scrolling Spacing]\nType a message for the scrolling display\nEnd message line with a newline");
pinMode(SPEED_IN, INPUT);
doUI();
P.begin();
P.displayText(curMessage, PA_CENTER, P.getSpeed(), PAUSE_TIME, effect[eff_in], effect_out[eff_out);
305
#include
<MD_Parola.h>
#include
<MD_MAX72xx.h>
#include
<SPI.h>
#define
CLK_PIN
13
#define
DATA_PIN
11
#define
CS_PIN
10
#define
SPEED_IN
A5
#define
BUF_SIZE
75
MAX_DEVICES
= N;
int
curMessage
[BUF_SIZE] = { "" };
char
newMessage
[BUF_SIZE] = { "Привет! Новый текст?" };
char
newMessageAvailable
= true;
bool
HARDWARE SPI
P
= MD_Parola(CS_PIN, MAX_DEVICES);
MD_Parola
SOFTWARE SPI
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
in milliseconds
#define
PAUSE_TIME
1000
in analog units
#define
SPEED_DEADBAND
20
0
PA_NO_EFFECT, ///< Used as a place filler, executes no operation
// 1
PA_PRINT, ///< Text just appears (printed)
// 2
PA_SCROLL_UP, ///< Text scrolls up through the display
// 3
PA_SCROLL_DOWN, ///< Text scrolls down through the display
// 4
PA_SCROLL_LEFT, ///< Text scrolls right to left on the display
// 5
PA_SCROLL_RIGHT,///< Text scrolls left to right on the display
// 6
PA_SLICE, ///< Text enters and exits a slice (column) at a time from the right
// 7
PA_MESH, ///< Text enters and exits in columns moving in alternate direction (U/D)
// 8
PA_FADE, ///< Text enters and exits by fading from/to 0 and intensity setting
// 9
PA_DISSOLVE, ///< Text dissolves from one display to another
// 10
PA_BLINDS, ///< Text is replaced behind vertical blinds
// 11
PA_RANDOM, ///< Text enters and exits as random dots
// 12
PA_WIPE, ///< Text appears/disappears one column at a time, looks like it is wiped on and off
// 13
PA_WIPE_CURSOR, ///< WIPE with a light bar ahead of the change
// 14
PA_OPENING, ///< Appear and disappear from the center of the display, towards the ends
// 15
PA_OPENING_CURSOR, ///< OPENING with light bars ahead of the change
// 16
PA_CLOSING, ///< Appear and disappear from the ends of the display, towards the middle
// 17
PA_CLOSING_CURSOR, ///< CLOSING with light bars ahead of the change
// 18
PA_SCROLL_UP_LEFT, ///< Text moves in/out in a diagonal path up and left (North East)
// 19
PA_SCROLL_UP_RIGHT, ///< Text moves in/out in a diagonal path up and right (North West)
// 20
PA_SCROLL_DOWN_LEFT, ///< Text moves in/out in a diagonal path down and left (South East)
// 21
PA_SCROLL_DOWN_RIGHT, ///< Text moves in/out in a diagonal path down and right (North West)
// 22
PA_GROW_UP, ///< Text grows from the bottom up and shrinks from the top down
// 23
PA_GROW_DOWN, ///< Text grows from the top down and and shrinks from the bottom up
// 24
PA_SCAN_HORIZ0, ///< Scan a blank column through the text one column at a time then appears/disappear at end
// 25
PA_SCAN_HORIZ1, ///< Scan the LED column one at a time then appears/disappear at end (previously PA_SCAN_HORIZ)
// 26
PA_SCAN_VERT0, ///< Scan a blank row through the text one row at a time then appears/disappear at end
// 27
PA_SCAN_VERT1, ///< Scan the LED row one at a time then appears/disappear at end (previously PA_SCAN_VERT)
};
effect
[] =
{
textEffect_t
{
int16_t speed = map(analogRead(SPEED_IN), 0, 1023, 0, 200);
if ((speed >= ((int16_t)P.getSpeed() + SPEED_DEADBAND)) ||
(speed <= ((int16_t)P.getSpeed() - SPEED_DEADBAND)))
{
P.setSpeed(speed);
}
}
if (justify_set)
{
static uint8_t curMode = 0;
textPosition_t align = P.getTextAlignment();
textPosition_t textAlign[] =
{
PA_LEFT,
PA_CENTER,
PA_RIGHT
};
P.setTextAlignment(textAlign[curMode]);
P.displayReset();
curMode = (curMode + 1) % ARRAY_SIZE(textAlign);
}
if (effect_set)
{
P.setTextEffect(effect_in[eff_in],effect _out[eff_out]);
P.displayClear();
P.displayReset();
}
if (pause_set)
{
if (P.getPause() <= P.getSpeed())
P.setPause(PAUSE_TIME);
else
P.setPause(0);
}
if (intensity_set)
{
static uint8_t intensity = 7;
intensity = ++intensity % (MAX_INTENSITY + 1);
if (intensity == 0)
{
P.displayShutdown(true);
}
else
{
P.setIntensity(intensity);
P.displayShutdown(false);
}
}
if (inverse_set)
{
P.setInvert(!P.getInvert());
}
if (flip_set)
{
P.setZoneEffect(0, !P.getZoneEffect(0, PA_FLIP_LR), PA_FLIP_LR);
P.setZoneEffect(0, !P.getZoneEffect(0, PA_FLIP_UD), PA_FLIP_UD);
}
1329
680@540 corner: 700@560
500@560
520@560 corner: 564.0d@580
500@560 corner: 584.0d@580
524@574.5d
500@570
520@570
500@560 corner: 520@580
564.0d@560 corner: 584.0d@580
584.0d@570
out_Eff
36.0d
9.0d
0.0d
564.0d@570
584.0d@570 corner: 584.0d@570
680@570
700@570
680@560 corner: 700@580
400@540
420@540 corner: 460@600
400@540 corner: 480@600
431.5d@553.5d
270@520
290@520 corner: 370@560
270@520 corner: 390@560
291.0d@534.5d
170@540
190@540 corner: 228.0d@560
170@540 corner: 248.0d@560
194@554.5d
170@550
190@550
170@540 corner: 190@560
228.0d@540 corner: 248.0d@560
248.0d@550
30.0d
9.0d
0.0d
228.0d@550
248.0d@550 corner: 248.0d@550
Value
270@550
290@550
270@540 corner: 290@560
370@540 corner: 390@560
390@550
2
constant
Q
9.0d
370@550
390@550 corner: 390@570
400@570
420@570
400@560 corner: 420@580
270@560
290@560 corner: 370@600
270@560 corner: 390@600
291.0d@574.5d
170@580
190@580 corner: 234.0d@600
170@580 corner: 254.0d@600
194@594.5d
170@590
254.0d@590
36.0d
9.0d
0.0d
234.0d@590
254.0d@590 corner: 254.0d@590
270@590
290@590
270@580 corner: 290@600
370@580 corner: 390@600
390@590
9.0d
370@590
390@590 corner: 390@590
400@590
420@590
400@580 corner: 420@600
460@580 corner: 480@600
480@590
Q
9.0d
460@590
480@590 corner: 480@590
680@590
700@590
680@580 corner: 700@600
500@600
520@600 corner: 570.0d@620
500@600 corner: 590.0d@620
524@614.5d
500@610
520@610
500@600 corner: 520@620
570.0d@600 corner: 590.0d@620
590.0d@610
Speed_t
5
42.0d
9.0d
0.0d
570.0d@610
590.0d@610 corner: 590.0d@610
speed
680@610
700@610
animation_MAX7219_4
98fcb6a3-9099-4ff7-95b2-b1d1757eb9ea
f05f0c45-6e91-4144-a198-7425e8ce2574
c8f26903-255f-4cb8-943c-2ce892e9d6ee
Анимация МАХ7219_4
8
scale
250
250
0-1023
fc7ef332-7ed2-4b77-9762-30017dc4dd38
77e5f85d-6da1-4f34-b245-996dda6dbf9b
pause_time
1000
20
40913747-cc22-4d23-bcbc-66829430ceef
21c1b7f2-eedc-4dd3-9e2c-fe7e18a5581e
doUI();
if (P.displayAnimate())
{
if (newMessageAvailable)
{
strcpy(curMessage, newMessage);
newMessageAvailable = false;
}
P.displayReset();
}
readSerial();
199
Serial.begin(57600);
Serial.print("\n[Parola Scrolling Spacing]\nType a message for the scrolling display\nEnd message line with a newline");
pinMode(SPEED_IN, INPUT);
P.begin();
P.displayText(curMessage, PA_CENTER, P.getSpeed(), PAUSE_TIME, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
292
#include
<MD_Parola.h>
#include
<MD_MAX72xx.h>
#include
<SPI.h>
#define
CLK_PIN
13
#define
DATA_PIN
11
#define
CS_PIN
10
#define
SPEED_IN
A5
#define
BUF_SIZE
75
MAX_DEVICES
= N;
int
curMessage
[BUF_SIZE] = { "" };
char
newMessage
[BUF_SIZE] = {"TEKCT?"};
char
newMessageAvailable
= true;
bool
HARDWARE SPI
P
= MD_Parola(CS_PIN, MAX_DEVICES);
MD_Parola
SOFTWARE SPI
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
in milliseconds
PAUSE_TIME
= pause_time;
int
in analog units
#define
SPEED_DEADBAND
20
0
PA_NO_EFFECT, ///< Used as a place filler, executes no operation
// 1
PA_PRINT, ///< Text just appears (printed)
// 2
PA_SCROLL_UP, ///< Text scrolls up through the display
// 3
PA_SCROLL_DOWN, ///< Text scrolls down through the display
// 4
PA_SCROLL_LEFT, ///< Text scrolls right to left on the display
// 5
PA_SCROLL_RIGHT,///< Text scrolls left to right on the display
// 6
PA_SLICE, ///< Text enters and exits a slice (column) at a time from the right
// 7
PA_MESH, ///< Text enters and exits in columns moving in alternate direction (U/D)
// 8
PA_FADE, ///< Text enters and exits by fading from/to 0 and intensity setting
// 9
PA_DISSOLVE, ///< Text dissolves from one display to another
// 10
PA_BLINDS, ///< Text is replaced behind vertical blinds
// 11
PA_RANDOM, ///< Text enters and exits as random dots
// 12
PA_WIPE, ///< Text appears/disappears one column at a time, looks like it is wiped on and off
// 13
PA_WIPE_CURSOR, ///< WIPE with a light bar ahead of the change
// 14
PA_OPENING, ///< Appear and disappear from the center of the display, towards the ends
// 15
PA_OPENING_CURSOR, ///< OPENING with light bars ahead of the change
// 16
PA_CLOSING, ///< Appear and disappear from the ends of the display, towards the middle
// 17
PA_CLOSING_CURSOR, ///< CLOSING with light bars ahead of the change
// 18
PA_SCROLL_UP_LEFT, ///< Text moves in/out in a diagonal path up and left (North East)
// 19
PA_SCROLL_UP_RIGHT, ///< Text moves in/out in a diagonal path up and right (North West)
// 20
PA_SCROLL_DOWN_LEFT, ///< Text moves in/out in a diagonal path down and left (South East)
// 21
PA_SCROLL_DOWN_RIGHT, ///< Text moves in/out in a diagonal path down and right (North West)
// 22
PA_GROW_UP, ///< Text grows from the bottom up and shrinks from the top down
// 23
PA_GROW_DOWN, ///< Text grows from the top down and and shrinks from the bottom up
// 24
PA_SCAN_HORIZ0, ///< Scan a blank column through the text one column at a time then appears/disappear at end
// 25
PA_SCAN_HORIZ1, ///< Scan the LED column one at a time then appears/disappear at end (previously PA_SCAN_HORIZ)
// 26
PA_SCAN_VERT0, ///< Scan a blank row through the text one row at a time then appears/disappear at end
// 27
PA_SCAN_VERT1, ///< Scan the LED row one at a time then appears/disappear at end (previously PA_SCAN_VERT)
};
effect
[] =
{
textEffect_t
{
int16_t speed = map(analogRead(SPEED_IN), 0, 1023, 0, scale);
if ((speed >= ((int16_t)P.getSpeed() + SPEED_DEADBAND)) ||
(speed <= ((int16_t)P.getSpeed() - SPEED_DEADBAND)))
{
P.setSpeed(speed);
}
}
if (justify_set)
{
static uint8_t curMode = 0;
textPosition_t align = P.getTextAlignment();
textPosition_t textAlign[] =
{
PA_LEFT,
PA_CENTER,
PA_RIGHT
};
P.setTextAlignment(textAlign[curMode]);
P.displayReset();
curMode = (curMode + 1) % ARRAY_SIZE(textAlign);
}
if (effect_set)
{
P.setTextEffect(effect[eff_in],effect[eff_out]);
P.displayClear();
P.displayReset();
}
if (pause_set)
{
if (P.getPause() <= P.getSpeed())
P.setPause(PAUSE_TIME);
else
P.setPause(0);
}
if (intensity_set)
{
static uint8_t intensity = 7;
intensity = ++intensity % (MAX_INTENSITY + 1);
if (intensity == 0)
{
P.displayShutdown(true);
}
else
{
P.setIntensity(intensity);
P.displayShutdown(false);
}
}
if (inverse_set)
{
P.setInvert(!P.getInvert());
}
if (flip_set)
{
P.setZoneEffect(0, !P.getZoneEffect(0, PA_FLIP_LR), PA_FLIP_LR);
P.setZoneEffect(0, !P.getZoneEffect(0, PA_FLIP_UD), PA_FLIP_UD);
}
1323
{
static char *cp = newMessage;
while (Serial.available())
{
*cp = (char)Serial.read();
if ((*cp == '\n') || (cp - newMessage >= BUF_SIZE-2)) // end of message character or full buffer
{
*cp = '\0'; // end the string
// restart the index for next filling spree and flag we have a message waiting
cp = newMessage;
newMessageAvailable = true;
}
else // move char pointer to next position
cp++;
}
}
456
680@600 corner: 700@620
270@600
290@600 corner: 370@640
270@600 corner: 390@640
291.0d@614.5d
170@620
190@620 corner: 240.0d@640
170@620 corner: 260.0d@640
194@634.5d
170@630
260.0d@630
42.0d
9.0d
0.0d
240.0d@630
260.0d@630 corner: 260.0d@630
270@630
290@630
270@620 corner: 290@640
370@620 corner: 390@640
390@630
9.0d
370@630
390@630 corner: 390@630
set_speed
680@630
700@630
pause_time
65b63d7a-1ec2-466a-be3e-b07bfe7bff28
eb6ea71f-db84-4756-aa3c-48621690f89e
6c1abbe3-ea4b-4de2-8bfa-dd40c03de038
bbda7196-770b-4097-9fc0-b0d1999dcd2c
ce833f53-6952-425c-9d75-5bc7edbabf36
Serial.begin(57600);
Serial.print("\n[Parola Scrolling Spacing]\nType a message for the scrolling display\nEnd message line with a newline");
pinMode(SPEED_IN, INPUT);
P.begin();
P.displayText(curMessage, PA_CENTER, SPEED, PAUSE_TIME, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
285
#include
<MD_Parola.h>
#include
<MD_MAX72xx.h>
#include
<SPI.h>
#define
CLK_PIN
13
#define
DATA_PIN
11
#define
CS_PIN
10
#define
BUF_SIZE
75
MAX_DEVICES
= N;
int
curMessage
[BUF_SIZE] = { "" };
char
newMessage
[BUF_SIZE] = {"TEKCT?"};
char
newMessageAvailable
= true;
bool
HARDWARE SPI
P
= MD_Parola(CS_PIN, MAX_DEVICES);
MD_Parola
SOFTWARE SPI
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
in milliseconds
PAUSE_TIME
= 1000;
int
SPEED
= 20;
int
0
PA_NO_EFFECT, ///< Used as a place filler, executes no operation
// 1
PA_PRINT, ///< Text just appears (printed)
// 2
PA_SCROLL_UP, ///< Text scrolls up through the display
// 3
PA_SCROLL_DOWN, ///< Text scrolls down through the display
// 4
PA_SCROLL_LEFT, ///< Text scrolls right to left on the display
// 5
PA_SCROLL_RIGHT,///< Text scrolls left to right on the display
// 6
PA_SLICE, ///< Text enters and exits a slice (column) at a time from the right
// 7
PA_MESH, ///< Text enters and exits in columns moving in alternate direction (U/D)
// 8
PA_FADE, ///< Text enters and exits by fading from/to 0 and intensity setting
// 9
PA_DISSOLVE, ///< Text dissolves from one display to another
// 10
PA_BLINDS, ///< Text is replaced behind vertical blinds
// 11
PA_RANDOM, ///< Text enters and exits as random dots
// 12
PA_WIPE, ///< Text appears/disappears one column at a time, looks like it is wiped on and off
// 13
PA_WIPE_CURSOR, ///< WIPE with a light bar ahead of the change
// 14
PA_OPENING, ///< Appear and disappear from the center of the display, towards the ends
// 15
PA_OPENING_CURSOR, ///< OPENING with light bars ahead of the change
// 16
PA_CLOSING, ///< Appear and disappear from the ends of the display, towards the middle
// 17
PA_CLOSING_CURSOR, ///< CLOSING with light bars ahead of the change
// 18
PA_SCROLL_UP_LEFT, ///< Text moves in/out in a diagonal path up and left (North East)
// 19
PA_SCROLL_UP_RIGHT, ///< Text moves in/out in a diagonal path up and right (North West)
// 20
PA_SCROLL_DOWN_LEFT, ///< Text moves in/out in a diagonal path down and left (South East)
// 21
PA_SCROLL_DOWN_RIGHT, ///< Text moves in/out in a diagonal path down and right (North West)
// 22
PA_GROW_UP, ///< Text grows from the bottom up and shrinks from the top down
// 23
PA_GROW_DOWN, ///< Text grows from the top down and and shrinks from the bottom up
// 24
PA_SCAN_HORIZ0, ///< Scan a blank column through the text one column at a time then appears/disappear at end
// 25
PA_SCAN_HORIZ1, ///< Scan the LED column one at a time then appears/disappear at end (previously PA_SCAN_HORIZ)
// 26
PA_SCAN_VERT0, ///< Scan a blank row through the text one row at a time then appears/disappear at end
// 27
PA_SCAN_VERT1, ///< Scan the LED row one at a time then appears/disappear at end (previously PA_SCAN_VERT)
};
effect
[] =
{
textEffect_t
if(speed_set)
{ P.getSpeed()=
P.setSpeed(speed)};
if (justify_set)
{
static uint8_t curMode = 0;
textPosition_t align = P.getTextAlignment();
textPosition_t textAlign[] =
{
PA_LEFT,
PA_CENTER,
PA_RIGHT
};
P.setTextAlignment(textAlign[curMode]);
P.displayReset();
curMode = (curMode + 1) % ARRAY_SIZE(textAlign);
}
if (effect_set)
{
P.setTextEffect(effect[eff_in],effect[eff_out]);
P.displayClear();
P.displayReset();
}
if (pause_set)
{
if (P.getPause() <= P.getSpeed())
P.setPause(pause_time);
else
P.setPause(0);
}
if (intensity_set)
{
static uint8_t intensity = 7;
intensity = ++intensity % (MAX_INTENSITY + 1);
if (intensity == 0)
{
P.displayShutdown(true);
}
else
{
P.setIntensity(intensity);
P.displayShutdown(false);
}
}
if (inverse_set)
{
P.setInvert(!P.getInvert());
}
if (flip_set)
{
P.setZoneEffect(0, !P.getZoneEffect(0, PA_FLIP_LR), PA_FLIP_LR);
P.setZoneEffect(0, !P.getZoneEffect(0, PA_FLIP_UD), PA_FLIP_UD);
}
1154
680@620 corner: 700@640
500@640
520@640 corner: 567.0d@660
500@640 corner: 587.0d@660
524@654.5d
500@650
520@650
500@640 corner: 520@660
567.0d@640 corner: 587.0d@660
587.0d@650
pause_t
6
39.0d
9.0d
0.0d
567.0d@650
587.0d@650 corner: 587.0d@650
680@650
700@650
680@640 corner: 700@660
270@640
290@640 corner: 370@680
270@640 corner: 390@680
291.0d@654.5d
170@660
190@660 corner: 237.0d@680
170@660 corner: 257.0d@680
194@674.5d
170@670
257.0d@670
39.0d
9.0d
0.0d
237.0d@670
257.0d@670 corner: 257.0d@670
270@670
290@670
270@660 corner: 290@680
370@660 corner: 390@680
390@670
9.0d
370@670
390@670 corner: 390@670
680@670
700@670
680@660 corner: 700@680
680@680 corner: 700@700
390@710
410@710 corner: 450@750
390@710 corner: 470@750
416.5d@724.5d
220@730
240@730 corner: 267.0d@750
220@730 corner: 287.0d@750
244@743.5d
273.0d@730 corner: 287.0d@750
287.0d@740
кн4
19.0d
7.0d
0.0d
273.0d@740
287.0d@740 corner: 287.0d@740
I
390@740
410@740
390@730 corner: 410@750
450@730 corner: 470@750
470@740
9.0d
450@740
470@710 corner: 470@740
680@710
700@710
680@700 corner: 700@720
470@730
490@730 corner: 530@770
470@730 corner: 550@770
496.5d@744.5d
220@750
240@750 corner: 266.0d@770
220@750 corner: 286.0d@770
244@763.5d
286.0d@760
кн5
18.0d
7.0d
0.0d
272.0d@760
286.0d@760 corner: 286.0d@760
470@760
490@760
470@750 corner: 490@770
530@750 corner: 550@770
550@760
9.0d
530@760
550@730 corner: 550@760
680@730
700@730
680@720 corner: 700@740
550@750
570@750 corner: 610@790
550@750 corner: 630@790
576.5d@764.5d
220@770
240@770 corner: 266.0d@790
220@770 corner: 286.0d@790
244@783.5d
286.0d@780
кн6
7
18.0d
7.0d
0.0d
272.0d@780
286.0d@780 corner: 286.0d@780
550@780
570@780
550@770 corner: 570@790
610@770 corner: 630@790
630@780
9.0d
610@780
630@750 corner: 630@780
680@750
700@750
680@740 corner: 700@760
680@690
dd0e519c-8076-49b0-8280-d5bdcbfdf3d3
Serial.begin(57600);
Serial.print("\n[Parola Scrolling Spacing]\nType a message for the scrolling display\nEnd message line with a newline");
P.begin();
P.displayText(curMessage, PA_CENTER, SPEED, PAUSE_TIME, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
258
#include
<MD_Parola.h>
#include
<MD_MAX72xx.h>
#include
<SPI.h>
#define
CLK_PIN
13
#define
DATA_PIN
11
#define
CS_PIN
10
#define
BUF_SIZE
75
in milliseconds
#define
PAUSE_TIME
1000
#define
SPEED
20
MAX_DEVICES
= N;
int
curMessage
[BUF_SIZE] = { "" };
char
newMessage
[BUF_SIZE] = {"TEKCT"};
char
newMessageAvailable
= true;
bool
HARDWARE SPI
P
= MD_Parola(CS_PIN, MAX_DEVICES);
MD_Parola
SOFTWARE SPI
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
0
PA_NO_EFFECT, ///< Used as a place filler, executes no operation
// 1
PA_PRINT, ///< Text just appears (printed)
// 2
PA_SCROLL_UP, ///< Text scrolls up through the display
// 3
PA_SCROLL_DOWN, ///< Text scrolls down through the display
// 4
PA_SCROLL_LEFT, ///< Text scrolls right to left on the display
// 5
PA_SCROLL_RIGHT,///< Text scrolls left to right on the display
// 6
PA_SLICE, ///< Text enters and exits a slice (column) at a time from the right
// 7
PA_MESH, ///< Text enters and exits in columns moving in alternate direction (U/D)
// 8
PA_FADE, ///< Text enters and exits by fading from/to 0 and intensity setting
// 9
PA_DISSOLVE, ///< Text dissolves from one display to another
// 10
PA_BLINDS, ///< Text is replaced behind vertical blinds
// 11
PA_RANDOM, ///< Text enters and exits as random dots
// 12
PA_WIPE, ///< Text appears/disappears one column at a time, looks like it is wiped on and off
// 13
PA_WIPE_CURSOR, ///< WIPE with a light bar ahead of the change
// 14
PA_OPENING, ///< Appear and disappear from the center of the display, towards the ends
// 15
PA_OPENING_CURSOR, ///< OPENING with light bars ahead of the change
// 16
PA_CLOSING, ///< Appear and disappear from the ends of the display, towards the middle
// 17
PA_CLOSING_CURSOR, ///< CLOSING with light bars ahead of the change
// 18
PA_SCROLL_UP_LEFT, ///< Text moves in/out in a diagonal path up and left (North East)
// 19
PA_SCROLL_UP_RIGHT, ///< Text moves in/out in a diagonal path up and right (North West)
// 20
PA_SCROLL_DOWN_LEFT, ///< Text moves in/out in a diagonal path down and left (South East)
// 21
PA_SCROLL_DOWN_RIGHT, ///< Text moves in/out in a diagonal path down and right (North West)
// 22
PA_GROW_UP, ///< Text grows from the bottom up and shrinks from the top down
// 23
PA_GROW_DOWN, ///< Text grows from the top down and and shrinks from the bottom up
// 24
PA_SCAN_HORIZ0, ///< Scan a blank column through the text one column at a time then appears/disappear at end
// 25
PA_SCAN_HORIZ1, ///< Scan the LED column one at a time then appears/disappear at end (previously PA_SCAN_HORIZ)
// 26
PA_SCAN_VERT0, ///< Scan a blank row through the text one row at a time then appears/disappear at end
// 27
PA_SCAN_VERT1, ///< Scan the LED row one at a time then appears/disappear at end (previously PA_SCAN_VERT)
};
effect
[] =
{
textEffect_t
if(set_speed)
P.setSpeed(speed);
if (justify_set)
{
static uint8_t curMode = 0;
textPosition_t align = P.getTextAlignment();
textPosition_t textAlign[] =
{
PA_LEFT,
PA_CENTER,
PA_RIGHT
};
P.setTextAlignment(textAlign[curMode]);
P.displayReset();
curMode = (curMode + 1) % ARRAY_SIZE(textAlign);
}
if (effect_set)
{
P.setTextEffect(effect[eff_in],effect[eff_out]);
P.displayClear();
P.displayReset();
}
if (pause_set) {
P.setPause(pause_time);
}
if (intensity_set)
{
static uint8_t intensity = 7;
intensity = ++intensity % (MAX_INTENSITY + 1);
if (intensity == 0)
{
P.displayShutdown(true);
}
else
{
P.setIntensity(intensity);
P.displayShutdown(false);
}
}
if (inverse_set)
{
P.setInvert(!P.getInvert());
}
if (flip_set)
{
P.setZoneEffect(0, !P.getZoneEffect(0, PA_FLIP_LR), PA_FLIP_LR);
P.setZoneEffect(0, !P.getZoneEffect(0, PA_FLIP_UD), PA_FLIP_UD);
}
1057
700@690
400@690 corner: 400@720
9.0d
380@720
400@720
380@710 corner: 400@730
320@720
340@720
286.0d@720 corner: 286.0d@720
0.0d
272.0d@720
286.0d@720
кн3
18.0d
7.0d
620@150
640@150 corner: 684.0d@170
620@150 corner: 704.0d@170
644@164.5d
490@110
510@110 corner: 570@190
490@110 corner: 590@190
529.0d@123.5d
270@160
290@160 corner: 350@260
270@160 corner: 370@260
305.0d@174.5d
170@140
190@140 corner: 250@200
170@140 corner: 270@200
206.0d@153.5d
10@160
30@160 corner: 56.0d@180
10@160 corner: 76.0d@180
34@173.5d
62.0d@160 corner: 76.0d@180
76.0d@170
кн2
18.0d
7.0d
0.0d
62.0d@170
390@380
410@380 corner: 450@460
390@380 corner: 470@460
418.5d@393.5d
Q3
15.0d
350@250
370@250
490@290
510@290 corner: 570@370
490@290 corner: 590@370
529.0d@303.5d
490@310 corner: 510@330
L
2000
490@340
510@340
464.0d@343.5d
490@330 corner: 510@350
390@350
410@350 corner: 456.0d@370
390@350 corner: 476.0d@370
414@364.5d
390@360
410@360
390@350 corner: 410@370
456.0d@350 corner: 476.0d@370
476.0d@360
сброс4
10
38.0d
9.0d
0.0d
456.0d@360
476.0d@360 corner: 476.0d@360
R
490@360
510@360
490@350 corner: 510@370
620@330
640@330 corner: 687.0d@350
620@330 corner: 707.0d@350
644@344.5d
620@330 corner: 640@350
687.0d@340
707.0d@340
687.0d@330 corner: 707.0d@350
620@340
39.0d
9.0d
640@340
590@340 corner: 590@340
V
10.0d
570@340
590@340
570@330 corner: 590@350
620@350
640@350 corner: 686.0d@370
620@350 corner: 706.0d@370
644@364.5d
620@350 corner: 640@370
686.0d@360
706.0d@360
686.0d@350 corner: 706.0d@370
620@360
38.0d
9.0d
640@360
590@360 corner: 590@360
>L
14.0d
570@360
590@360
570@350 corner: 590@370
490@320
490@340
up
C
510@320
410@240
430@240 corner: 466.0d@280
410@240 corner: 486.0d@280
434@264.5d
410@250
430@250
402.0d@253.5d
410@240 corner: 430@260
410@260 corner: 430@280
410@250
410@270
l_imp
11
28.0d
9.0d
En
430@270
370@250 corner: 370@410
390@410
410@410
390@400 corner: 410@420
340@420
360@420 corner: 374.0d@440
340@420 corner: 394.0d@440
364@433.5d
340@430
360@430
340@420 corner: 360@440
374.0d@420 corner: 394.0d@440
394.0d@430
1
12
6.0d
7.0d
0.0d
374.0d@430
390@430 corner: 390@430
390@430
404@430
390@420 corner: 404@440
390@440 corner: 410@460
470@400
490@400 corner: 530@440
470@400 corner: 550@440
496.5d@414.5d
470@420 corner: 490@440
550@410
570@410 corner: 610@470
550@410 corner: 630@470
581.5d@423.5d
550@430 corner: 570@450
470@440
490@440 corner: 530@480
470@440 corner: 550@480
496.5d@454.5d
I
470@470
484@470
470@460 corner: 490@480
530@460 corner: 550@480
470@470
550@470
Q
9.0d
530@470
550@460 corner: 550@470
550@460
570@460
550@450 corner: 570@470
640@420
660@420 corner: 700@460
640@420 corner: 720@460
672.5d@433.5d
640@440 corner: 660@460
710@440
730@440 corner: 744.0d@460
710@440 corner: 764.0d@460
734@453.5d
710@440 corner: 730@460
744.0d@450
764.0d@450
744.0d@440 corner: 764.0d@460
710@450
6.0d
7.0d
730@450
720@380
740@380 corner: 780@420
720@380 corner: 800@420
746.5d@394.5d
720@400 corner: 740@420
820@400
840@400 corner: 886.0d@420
820@400 corner: 906.0d@420
844@414.5d
820@400 corner: 840@420
886.0d@410
906.0d@410
886.0d@400 corner: 906.0d@420
820@410
38.0d
9.0d
840@410
800@410 corner: 800@410
Q
9.0d
780@410
800@410
780@400 corner: 800@420
720@410
8
I
740@410
710@410 corner: 710@450
9.0d
700@450
720@450
700@440 corner: 720@460
640@450
T
660@450
630@450 corner: 630@460
9.0d
610@460
630@460
610@450 corner: 630@470
550@440
570@440
550@430 corner: 550@440
9.0d
530@430
550@430
530@420 corner: 550@440
470@430
490@430
470@430 corner: 470@450
9.0d
450@450
470@450
450@440 corner: 470@460
390@450
410@450
76.0d@170 corner: 76.0d@470
EN
170@170
190@170
170@160 corner: 190@180
90@190
110@190 corner: 146.0d@210
90@190 corner: 166.0d@210
114@204.5d
90@200
110@200
90@190 corner: 110@210
146.0d@190 corner: 166.0d@210
166.0d@200
28.0d
9.0d
0.0d
146.0d@200
166.0d@190 corner: 166.0d@200
OnVal
170@190
190@190
170@180 corner: 190@200
250@180 corner: 270@200
270@190
simetricMulti
9.0d
250@190
270@190 corner: 270@190
V
270@190
290@190
270@180 corner: 290@200
200@210
220@210 corner: 243.0d@230
200@210 corner: 263.0d@230
224@223.5d
200@220
220@220
200@210 corner: 220@230
243.0d@210 corner: 263.0d@230
263.0d@220
sel
15.0d
7.0d
0.0d
243.0d@220
263.0d@210 corner: 263.0d@220
Sel
270@210
290@210
270@200 corner: 290@220
490@20
510@20 corner: 570@100
490@20 corner: 590@100
529.0d@33.5d
490@40 corner: 510@60
27
490@70
510@70
476.0d@73.5d
490@60 corner: 510@80
400@110
420@110 corner: 464.0d@130
400@110 corner: 484.0d@130
424@124.5d
400@120
420@120
400@110 corner: 420@130
464.0d@110 corner: 484.0d@130
484.0d@120
сброс1
36.0d
9.0d
0.0d
464.0d@120
484.0d@90 corner: 484.0d@120
490@90
510@90
490@80 corner: 510@100
620@60
640@60 corner: 678.0d@80
620@60 corner: 698.0d@80
644@74.5d
620@60 corner: 640@80
678.0d@70
698.0d@70
678.0d@60 corner: 698.0d@80
620@70
30.0d
9.0d
640@70
590@70 corner: 590@70
10.0d
570@70
590@70
570@60 corner: 590@80
620@80
640@80 corner: 684.0d@100
620@80 corner: 704.0d@100
644@94.5d
620@80 corner: 640@100
684.0d@90
704.0d@90
684.0d@80 corner: 704.0d@100
620@90
36.0d
9.0d
640@90
590@90 corner: 590@90
14.0d
570@90
590@90
570@80 corner: 590@100
490@50
510@50
410@0
430@0 corner: 466.0d@40
410@0 corner: 486.0d@40
434@24.5d
410@10
430@10
390.0d@13.5d
410@0 corner: 430@20
410@20 corner: 430@40
410@30
28.0d
9.0d
430@30
370@30 corner: 370@190
Q0
15.0d
350@190
370@190
350@180 corner: 370@200
350@200 corner: 370@220
490@200
510@200 corner: 570@280
490@200 corner: 590@280
529.0d@213.5d
490@220 corner: 510@240
150
490@250
510@250
471.0d@253.5d
490@240 corner: 510@260
400@290
420@290 corner: 465.0d@310
400@290 corner: 485.0d@310
424@304.5d
400@300
420@300
400@290 corner: 420@310
465.0d@290 corner: 485.0d@310
485.0d@300
сброс3
9
37.0d
9.0d
0.0d
465.0d@300
485.0d@270 corner: 485.0d@300
490@270
510@270
490@260 corner: 510@280
620@240
640@240 corner: 690.0d@260
620@240 corner: 710.0d@260
644@254.5d
620@240 corner: 640@260
690.0d@250
710.0d@250
690.0d@240 corner: 710.0d@260
620@250
42.0d
9.0d
640@250
590@250 corner: 590@250
10.0d
570@250
590@250
570@240 corner: 590@260
620@260
640@260 corner: 685.0d@280
620@260 corner: 705.0d@280
644@274.5d
620@260 corner: 640@280
685.0d@270
705.0d@270
685.0d@260 corner: 705.0d@280
620@270
37.0d
9.0d
640@270
590@270 corner: 590@270
14.0d
570@270
590@270
570@260 corner: 590@280
490@230
510@230
410@150
430@150 corner: 466.0d@190
410@150 corner: 486.0d@190
434@174.5d
100
410@160
430@160
391.0d@163.5d
410@150 corner: 430@170
410@170 corner: 430@190
410@160
410@180
28.0d
9.0d
430@180
390@180 corner: 390@230
Q2
15.0d
350@230
370@230
350@220 corner: 370@240
350@240 corner: 370@260
370@210
Q1
14.0d
350@210
410@60
430@60 corner: 466.0d@100
410@60 corner: 486.0d@100
434@84.5d
410@70
430@70
390.0d@73.5d
410@60 corner: 430@80
410@80 corner: 430@100
410@90
28.0d
9.0d
430@90
380@90 corner: 380@210
490@140
510@140
490@130 corner: 510@150
490@160
510@160
476.0d@163.5d
490@150 corner: 510@170
400@200
420@200 corner: 465.0d@220
400@200 corner: 485.0d@220
424@214.5d
400@210
420@210
400@200 corner: 420@220
465.0d@200 corner: 485.0d@220
485.0d@210
сброс2
37.0d
9.0d
0.0d
465.0d@210
485.0d@180 corner: 485.0d@210
490@180
510@180
490@170 corner: 510@190
570@150 corner: 590@170
620@170
640@170 corner: 685.0d@190
620@170 corner: 705.0d@190
644@184.5d
620@170 corner: 640@190
685.0d@180
705.0d@180
685.0d@170 corner: 705.0d@190
620@180
37.0d
9.0d
640@180
590@180 corner: 590@180
14.0d
570@180
590@180
570@170 corner: 590@190
590@160
10.0d
570@160
590@160 corner: 590@160
620@160
640@160
620@150 corner: 640@170
684.0d@160
704.0d@160
684.0d@150 corner: 704.0d@170
36.0d
9.0d
10@60
30@60 corner: 56.0d@80
10@60 corner: 76.0d@80
34@73.5d
80@40
100@40 corner: 140@80
80@40 corner: 160@80
106.5d@54.5d
80@60 corner: 100@80
170@40
190@40 corner: 250@100
170@40 corner: 270@100
209.0d@53.5d
170@60 corner: 190@80
80@80
100@80 corner: 140.0d@100
80@80 corner: 160.0d@100
104@94.5d
80@90
100@90
80@80 corner: 100@100
140.0d@80 corner: 160.0d@100
160.0d@90
Сброс
32.0d
9.0d
0.0d
140.0d@90
170.0d@90 corner: 170.0d@90
170@90
190@90
170@80 corner: 190@100
280@60
300@60 corner: 323.0d@80
280@60 corner: 343.0d@80
304@73.5d
280@60 corner: 300@80
323.0d@70
343.0d@70
323.0d@60 corner: 343.0d@80
280@70
15.0d
7.0d
300@70
270@70 corner: 270@70
10.0d
250@70
270@70
250@60 corner: 270@80
280@80
300@80 corner: 340.0d@100
280@80 corner: 360.0d@100
304@94.5d
280@80 corner: 300@100
340.0d@90
360.0d@90
340.0d@80 corner: 360.0d@100
280@90
32.0d
9.0d
300@90
270@90 corner: 270@90
14.0d
250@90
270@90
250@80 corner: 270@100
170@70
190@70
160@70 corner: 160@70
Q
9.0d
140@70
160@70
140@60 corner: 160@80
80@70
I
100@70
76.0d@70 corner: 76.0d@70
0.0d
62.0d@70
76.0d@70
Кн1
18.0d
7.0d
880
(0 to: 880)
Arduino Uno
398@558
398@538
398@518
398@498
398@478
398@458
398@438
398@418
396@386
396@364
396@346
396@324
396@304
13
396@286
12@458
14
12@480
15
12@498
16
12@518
17
12@538
18
12@560
19
Общие сведения
Arduino Uno контроллер построен на ATmega328 . Платформа имеет 14 цифровых вход/выходов (6 из которых могут использоваться как выходы ШИМ), 6 аналоговых входов, кварцевый генератор 16 МГц, разъем USB, силовой разъем, разъем ICSP и кнопку перезагрузки. Для работы необходимо подключить платформу к компьютеру посредством кабеля USB, либо подать питание при помощи адаптера AC/DC или батареи.
В отличие от всех предыдущих плат, использовавших FTDI USB микроконтроллер для связи по USB, новый Ардуино Uno использует микроконтроллер ATmega8U2.
"Uno" переводится как один с итальянского и разработчики тем самым намекают на грядущий выход Arduino 1.0. Новая плата стала флагманом линейки плат Ардуино.
Характеристики
Микроконтроллер ATmega328
Рабочее напряжение 5 В
Входное напряжение (рекомендуемое) 7-12 В
Входное напряжение (предельное) 6-20 В
Цифровые Входы/Выходы 14 (6 из которых
могут
использоваться как
выходы ШИМ)
Аналоговые входы 6
Постоянный ток через вход/выход 40 мА
Постоянный ток для вывода 3.3 В 50 мА
Флеш-память 32 Кб (ATmega328)
из которых 0.5 Кб
используются для
загрузчика
ОЗУ 2 Кб (ATmega328)
EEPROM 1 Кб (ATmega328)
Тактовая частота 16 МГц
Питание
Arduino Uno может получать питание через подключение USB или от внешнего источника питания. Источник питания выбирается автоматически. Внешнее питание (не USB) может подаваться через преобразователь напряжения AC/DC (блок питания) или аккумуляторной батареей. Преобразователь напряжения подключается посредством разъема 2.1 мм с центральным положительным полюсом. Провода от батареи подключаются к выводам Gnd и Vin разъема питания. Платформа может работать при внешнем питании от 6 В до 20 В. При напряжении питания ниже 7 В, вывод 5V может выдавать менее 5 В, при этом платформа может работать нестабильно. При использовании напряжения выше 12 В регулятор напряжения может перегреться и повредить плату. Рекомендуемый диапазон от 7 В до 12 В.
Выводы питания:
VIN. - Вход используется для подачи питания от внешнего источника (в отсутствие 5 В от разъема USB или другого регулируемого источника питания). Подача напряжения питания происходит через данный вывод.
5V. - Регулируемый источник напряжения, используемый для питания микроконтроллера и компонентов на плате. Питание может подаваться от вывода VIN через регулятор напряжения, или от разъема USB, или другого регулируемого источника напряжения 5 В.
3V3. - Напряжение на выводе 3.3 В генерируемое встроенным регулятором на плате. Максимальное потребление тока 50 мА.
GND. - Выводы заземления.
Память
Микроконтроллер ATmega328 располагает 32 кБ флэш памяти, из которых 0.5 кБ используется для хранения загрузчика, а также 2 кБ ОЗУ (SRAM) и 1 Кб EEPROM.
Входы и Выходы
Каждый из 14 цифровых выводов Uno может настроен как вход или выход. Выводы работают при напряжении 5 В. Каждый вывод имеет нагрузочный резистор (по умолчанию отключен) 20-50 кОм и может пропускать до 40 мА.
Некоторые выводы имеют особые функции:
Последовательная шина: 0 (RX) и 1 (TX). Выводы используются для получения (RX) и передачи (TX) данных TTL. Данные выводы подключены к соответствующим выводам микросхемы последовательной шины ATmega8U2 USB-to-TTL.
Внешнее прерывание: 2 и 3. Данные выводы могут быть сконфигурированы на вызов прерывания либо на младшем значении, либо на переднем или заднем фронте, или при изменении значения.
ШИМ: 3, 5, 6, 9, 10, и 11. Любой из выводов обеспечивает ШИМ с разрешением 8 бит.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). Посредством данных выводов осуществляется связь SPI, для чего используется библиотека SPI.
LED: 13. Встроенный светодиод, подключенный к цифровому выводу 13. Если значение на выводе имеет высокий потенциал, то светодиод горит.
На платформе Uno установлены 6 аналоговых входов (обозначенных как A0 .. A5), каждый разрешением 10 бит (т.е. может принимать 1024 различных значения). Стандартно выводы имеют диапазон измерения до 5 В относительно земли, тем не менее имеется возможность изменить верхний предел посредством вывода AREF.
Некоторые выводы имеют дополнительные функции:
I2C: 4 (SDA) и 5 (SCL). Посредством выводов осуществляется связь I2C (TWI).
Дополнительная пара выводов платформы:
AREF. Опорное напряжение для аналоговых входов.
Reset. Низкий уровень сигнала на выводе перезагружает микроконтроллер. Обычно применяется для подключения кнопки перезагрузки на плате расширения, закрывающей доступ к кнопке на самой плате Arduino.
Связь
На платформе Arduino Uno установлено несколько устройств для осуществления связи с компьютером, другими устройствами Arduino или микроконтроллерами. ATmega328 поддерживают последовательный интерфейс UART TTL (5 В), осуществляемый выводами 0 (RX) и 1 (TX). Установленная на плате микросхема ATmega8U2 направляет данный интерфейс через USB, программы на стороне компьютера "общаются" с платой через виртуальный COM порт. Прошивка ATmega8U2 использует стандартные драйвера USB COM, никаких стороних драйверов не требуется, но на Windows для подключения потребуется файл ArduinoUNO.inf. Мониторинг последовательной шины (Serial Monitor) программы Arduino позволяет посылать и получать текстовые данные при подключении к платформе. Светодиоды RX и TX на платформе будут мигать при передаче данных через микросхему FTDI или USB подключение (но не при использовании последовательной передачи через выводы 0 и 1).
ATmega328 поддерживает интерфейсы I2C (TWI) и SPI.
Программирование
Микроконтроллер ATmega328 поставляется с записанным загрузчиком, облегчающим запись новых программ без использования внешних программаторов. Связь осуществляется оригинальным протоколом STK500.
Имеется возможность не использовать загрузчик и запрограммировать микроконтроллер через выводы ICSP (внутрисхемное программирование).
Автоматическая (программная) перезагрузка
Uno разработана таким образом, чтобы перед записью нового кода перезагрузка осуществлялась самой программой Arduino на компьютере, а не нажатием кнопки на платформе. Одна из линий DTR микросхемы ATmega8U2, управляющих потоком данных (DTR), подключена к выводу перезагрузки микроконтроллеру ATmega328 через 100 нФ конденсатор. Активация данной линии, т.е. подача сигнала низкого уровня, перезагружает микроконтроллер. Программа Arduino, используя данную функцию, загружает код одним нажатием кнопки Upload в самой среде программирования. Подача сигнала низкого уровня по линии DTR скоординирована с началом записи кода, что сокращает таймаут загрузчика.
Функция имеет еще одно применение. Перезагрузка Uno происходит каждый раз при подключении к программе Arduino на компьютере с ОС Mac X или Linux (через USB). Следующие полсекунды после перезагрузки работает загрузчик. Во время программирования происходит задержка нескольких первых байтов кода во избежание получения платформой некорректных данных (всех, кроме кода новой программы). Если производится разовая отладка скетча, записанного в платформу, или ввод каких-либо других данных при первом запуске, необходимо убедиться, что программа на компьютере ожидает в течение секунды перед передачей данных.
На Uno имеется возможность отключить линию автоматической перезагрузки разрывом соответствующей линии. Контакты микросхем с обоих концов линии могут быть соединены с целью восстановления. Линия маркирована «RESET-EN». Отключить автоматическую перезагрузку также возможно подключив резистор 110 Ом между источником 5 В и данной линией.
Токовая защита разъема USB
В Arduino Uno встроен самовостанавливающийся предохранитель (автомат), защищающий порт USB компьютера от токов короткого замыкания и сверхтоков. Хотя практически все компьютеры имеют подобную защиту, тем не менее, данный предохранитель обеспечивает дополнительный барьер. Предохранитель срабатыват при прохождении тока более 500 мА через USB порт и размыкает цепь до тех пока нормальные значения токов не будут востановлены.
Физические характеристики
Длина и ширина печатной платы Uno составляют 6.9 и 5.3 см соответственно. Разъем USB и силовой разъем выходят за границы данных размеров. Четыре отверстия в плате позволяют закрепить ее на поверхности. Расстояние между цифровыми выводами 7 и 8 равняется 0,4 см, хотя между другими выводами оно составляет 0,25 см.
8417
1d6511bf-56cb-49c2-8364-b9d4259c91b4.png
30b73db2-4dd7-4723-ac94-7c5cef2fc3cc.png
8eb4ba2c-940b-4563-be47-5a6b09ecae4d.png
ae28eee5-4e06-4e7b-a8f2-10344c949970.png
uno.png
A
A
1024
uno
uno
General information
Arduino Uno controller built on the ATmega328 . The platform has 14 digital input/outputs (of which 6 can be used as PWM outputs), 6 analog inputs, a crystal oscillator 16 MHz, USB connector, power Jack, ICSP and the reset button. For the work necessary to connect the platform to a computer via a USB cable or power it with a AC/DC adapter or battery.
Unlike all the previous boards that used the FTDI USB microcontroller to communicate over USB, new Arduino Uno uses the ATmega8U2 microcontroller.
"Uno" means one in Italian and the developers thereby hinting at the upcoming release of Arduino 1.0. The new Board became the flagship Arduino boards.
Features
Microcontroller ATmega328
Operating voltage 5 V
Input voltage (recommended) 7-12 V
Input voltage (limits) 6-20 In
Digital Inputs/Outputs 14 (of which 6
can
be used as
PWM outputs)
Analog inputs 6
DC current through input/output 40 mA
DC current for 3.3 V pin 50 mA
Flash memory 32 KB (ATmega328)
of which 0.5 KB
used for
loader
RAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock speed 16 MHz
Food
Arduino Uno can be powered via the USB connection or from an external power source. The power source is selected automatically. External power (not USB) can be supplied via an AC/DC adapter (wall-wart) or battery. The voltage Converter is connected by connector 2.1 mm center positive pole. The wires from the battery connect to the Gnd and Vin pin headers of the power connector. The platform can work with external supply from 6 V to 20 V. When the supply voltage is below 7 V, the output of 5V can give less than 5, the platform may become unstable. When using voltage higher than 12V, the voltage regulator may overheat and damage the Board. The recommended range is from 7 V to 12 V.
Power pins:
VIN. - Input is used to supply power from an external source (in the absence of the 5 volts from the USB connection or other regulated power source). The power supply takes place through this pin.
5V. - Adjustable voltage source used to power the microcontroller and other components on the Board. Power may be supplied from VIN via a voltage regulator or from USB or another regulated voltage source of 5 V.
3V3. - The voltage on the 3.3 V output generated by the internal regulator on the Board. The maximum current consumption of 50 mA.
GND. The conclusions of the ground.
Memory
The ATmega328 microcontroller comes with 32 KB of flash memory of which 0.5 KB is used to store bootloader, 2 KB of RAM (SRAM and 1 KB EEPROM.
Inputs and Outputs
Each of the 14 digital pins Uno can be configured as input or output. Insights operate at a voltage of 5 V. Each output has a load resistor (disabled by default) of 20-50 ohms and can handle up to 40 mA.
Some pins have special functions:
Serial bus: 0 (RX) and 1 (TX). Pins are used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to corresponding pins of the serial chip the ATmega8U2 USB-to-TTL.
External interrupt: 2 and 3. These pins can be configured for call interruption or the lower value, either for front or rear front or when you change the value.
PWM: 3, 5, 6, 9, 10, and 11. Any insights provides PWM resolution of 8 bits.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication, which uses the SPI library.
LED: 13. Built-in led connected to digital pin 13. If the value on the output is held high, the led is illuminated.
Platform Uno has 6 analog inputs (A0 .. A5), each 10 bits of resolution (i.e. 1024 different values). Standard conclusions are measuring range to 5 V relative to the earth, nonetheless it is possible to change the upper limit by the AREF pin.
Some pins have additional functions:
I2C: 4 (SDA) and 5 (SCL). By means of pins communicates I2C (TWI).
An additional pair of pins on the Board:
AREF. The reference voltage for the analog inputs.
Reset. The low level signal at pin resets the microcontroller. Typically used to connect the reset button on the expansion card, closing access to the button on the Arduino Board.
Link
The Arduino Uno has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. ATmega328 support serial interface UART TTL (5V) by the pins 0 (RX) and 1 (TX). Installed on Board ATmega8U2 chip directs the interface via USB, programs on the computer "communicate" with the Board via a virtual COM port. The ATmega8U2 firmware uses the standard USB COM drivers, no the drivers side is not required, but on Windows to connect need file ArduinoUNO.inf. Monitoring Serial Monitor of the Arduino program allows you to send and receive text data when you connect to the platform. The RX and TX LEDs on the Board will flash when data transfer via the FTDI chip and USB connection (but not for serial communication via pins 0 and 1).
The ATmega328 supports I2C (TWI) and SPI.
Programming
The ATmega328 microcontroller comes with a recorded loader, facilitating the entry of new programs without using an external hardware programmer. Communication takes the original STK500 Protocol.
You have the option not to use the bootloader and program the microcontroller through the insights ICSP (in-circuit programming).
Automatic (software) reset
Uno is designed in such a way that the new code before recording the restart performed by the Arduino program on your computer, instead of pressing buttons on the platform. One of the lines DTR chip the ATmega8U2, control flow (DTR), connected to the output of the restart, the microcontroller ATmega328 via a 100 nF capacitor. Activation of this line, i.e. the signal of the low level, resets the microcontroller. The Arduino software uses this capability to upload code by simply pressing the Upload button in the Arduino environment. Supply low-level signal at the DTR coordinated with the beginning of writing code that reduces the loader timeout.
The function has another use. Restart Uno happens every time you connect to the Arduino program on a computer with Mac OS X or Linux (via USB). Following half a second after the reboot bootloader works. During programming intercept the first few bytes of code to avoid incorrect data platform (all except the code of the new program). If you are debugging one-off sketch recorded in the platform or entering any other data when you first start, you must make sure that the computer waits for a second before transmitting the data.
On the Uno you have the option to disable the auto-restart gap of the respective line. The contacts of the chips with both ends of the line can be connected to restore. The line labeled "RESET-EN". Disable automatic restart also possible by connecting a 110 Ohm resistor with a 5 V source and this line.
Current protection of the USB connector
The Arduino Uno has a built-samoustraniajutsia fuse (automatic), which protects the computer's USB ports from short-circuit currents and overcurrents. Although virtually all computers have this protection, however, this fuse provides an additional barrier. Fuse srabatyvaet the passage of current more than 500 mA via USB port and opens the circuit until normal currents will not be restored.
Physical characteristics
Length and width of the Uno PCB are 6.9 and 5.3 cm, respectively. USB connector and power Jack extending beyond the former dimensions. Four screw holes allow the Board to secure it to the surface. The distance between digital pins 7 and 8 is equal to 0.4 cm, although other findings, it is 0,25 m.
9600
arduinoIDE
108
258713944
0@0
LibraryRoot
LibraryGroup-Базовые элементы
0@0
98
0@-420
317
446
0@-216
root
input
globalVariable
c654c70d-ce27-4824-80c5-c0620666b21a
0@0