1
1
/* *************************************************************************
2
- This example orignillay from Adafruit ST7735 library, just converted for the carrier usage
2
+ This example shows how to compose images from bitmaps
3
+
4
+ We have used this tool to convert the .bmp to cpp
5
+ https://javl.github.io/image2cpp/
6
+ Thanks!
7
+
3
8
**************************************************************************/
4
- #include " Images.h"
9
+ #include " Images.h" // We save the images code there
5
10
#include < Arduino_MKRIoTCarrier.h>
6
11
MKRIoTCarrier carrier;
7
12
@@ -10,7 +15,6 @@ bool CARRIER_CASE = false;
10
15
uint32_t orange = carrier.leds.Color(50 , 242 , 0 );
11
16
12
17
void setup () {
13
-
14
18
Serial.begin (9600 );
15
19
carrier.begin ();
16
20
@@ -26,7 +30,6 @@ void setup() {
26
30
int i = 0 ;
27
31
int ledC = 0 ;
28
32
int ledA = 0 ;
29
- int count = 0 ;
30
33
31
34
void loop () {
32
35
carrier.display .fillScreen (ST77XX_BLACK);
@@ -39,7 +42,7 @@ void loop() {
39
42
carrier.display .fillScreen (ST77XX_WHITE);
40
43
drawArduino (0x0000 );
41
44
fadeLoop ();
42
- // carrier.display.fillScreen(ST77XX_WHITE);
45
+
43
46
drawArduino (0xF324 );
44
47
fadeLoop ();
45
48
drawArduino (0x04B3 );
@@ -48,11 +51,9 @@ void loop() {
48
51
carrier.display .fillScreen (ST77XX_WHITE);
49
52
drawEIoT ();
50
53
fadeLoop ();
51
-
52
-
53
-
54
-
55
54
}
55
+
56
+ // Fading Orange loop
56
57
void fadeLoop () {
57
58
carrier.leds .fill (orange, ledA, ledC);
58
59
for ( i = 0 ; i < 125 ; i++) {
@@ -71,6 +72,7 @@ void fadeLoop() {
71
72
72
73
}
73
74
75
+ // Compose the differentn parts of the image
74
76
void drawEIoT () {
75
77
carrier.display .drawBitmap (44 , 25 , ArduinoLogo, 152 , 72 , 0x04B3 );
76
78
carrier.display .drawBitmap (48 , 110 , ArduinoText, 144 , 23 , 0x04B3 );
@@ -79,6 +81,7 @@ void drawEIoT() {
79
81
carrier.display .drawBitmap (0 , 150 , ExploreIoTtext, 240 , 75 , 0xFFFF );
80
82
}
81
83
84
+ // Same with the Arduino Logo and the text
82
85
void drawArduino (uint16_t color) {
83
86
carrier.display .drawBitmap (44 , 60 , ArduinoLogo, 152 , 72 , color);
84
87
carrier.display .drawBitmap (48 , 145 , ArduinoText, 144 , 23 , color);
0 commit comments