-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path01-Basic-Test.ino
61 lines (53 loc) · 3.41 KB
/
01-Basic-Test.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*-----------------------------------------------------------------------------------------------*
* 7-Segment Flip-disc Clock by Marcin Saj https://flipo.io *
* https://github.com/marcinsaj/Flipo-Clock-4x7-Segment-Flip-Disc-Display *
* *
* Basic Test *
* This example is used to test clock displays *
* *
* Attention!!! - Firmware Update Instructions - https://bit.ly/4x7SEG-CLOCK-FIRMWARE-UPDATE *
* *
* Setup: *
* Assembly Instructions - https://bit.ly/Flip-Disc-Clock-Assembly *
* Clock Diagram - https://bit.ly/4x7SEG-CLOCK-DIAGRAM *
* Dedicated Controller - https://bit.ly/AC1-FD *
* 7-Segment Flip-disc Display - https://bit.ly/7SEG-FD *
* 3x1 Flip-disc Display - https://bit.ly/3x1DOT-FD *
* Arduino Nano Every - https://bit.ly/ARD-EVERY *
* RTC Real Time Clock RX8025T - https://bit.ly/RX8025T *
* Temperature Sensor DHT22 - https://bit.ly/DHT22 *
*-----------------------------------------------------------------------------------------------*/
#include <FlipDisc.h> // https://github.com/marcinsaj/FlipDisc
/* Attention: do not change! Changing these settings may physical damage the flip-disc displays.
Pin declaration for a dedicated controller */
#define EN_PIN A7 // Start & End SPI transfer data
#define CH_PIN A2 // Charging PSPS module - turn ON/OFF
#define PL_PIN A3 // Release the current pulse - turn ON/OFF
void setup()
{
/* Attention: do not change! Changing these settings may physical damage the flip-disc displays.
Flip.Pin(...); it is the most important function and first to call before everything else.
The function is used to declare pin functions. */
Flip.Pin(EN_PIN, CH_PIN, PL_PIN);
/* Attention: do not change! Changing these settings may physical damage the flip-disc displays.
Flip.Init(...); it is the second most important function. Initialization function for a series
of displays. The function also prepares SPI to control displays. Correct initialization requires
code names of the serially connected displays:
- D7SEG - 7-segment display
- D3X1 - 3x1 display */
Flip.Init(D7SEG, D7SEG, D3X1, D7SEG, D7SEG);
delay(3000);
/* The function is used to set the delay effect between flip discs.
The default value without calling the function is 0. Can be called multiple times
anywhere in the code. Recommended delay range: 0 - 100ms, max 255ms */
Flip.Delay(50);
}
void loop()
{
/* The function is used to turn off (clear) all displays */
Flip.Clear();
delay(3000);
/* The function is used to turn on (set) all discs of all displays */
Flip.All();
delay(3000);
}