11/* *************************************************************************
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+
38 **************************************************************************/
4- #include " Images.h"
9+ #include " Images.h" // We save the images code there
510#include < Arduino_MKRIoTCarrier.h>
611MKRIoTCarrier carrier;
712
@@ -10,7 +15,6 @@ bool CARRIER_CASE = false;
1015uint32_t orange = carrier.leds.Color(50 , 242 , 0 );
1116
1217void setup () {
13-
1418 Serial.begin (9600 );
1519 carrier.begin ();
1620
@@ -26,7 +30,6 @@ void setup() {
2630int i = 0 ;
2731int ledC = 0 ;
2832int ledA = 0 ;
29- int count = 0 ;
3033
3134void loop () {
3235 carrier.display .fillScreen (ST77XX_BLACK);
@@ -39,7 +42,7 @@ void loop() {
3942 carrier.display .fillScreen (ST77XX_WHITE);
4043 drawArduino (0x0000 );
4144 fadeLoop ();
42- // carrier.display.fillScreen(ST77XX_WHITE);
45+
4346 drawArduino (0xF324 );
4447 fadeLoop ();
4548 drawArduino (0x04B3 );
@@ -48,11 +51,9 @@ void loop() {
4851 carrier.display .fillScreen (ST77XX_WHITE);
4952 drawEIoT ();
5053 fadeLoop ();
51-
52-
53-
54-
5554}
55+
56+ // Fading Orange loop
5657void fadeLoop () {
5758 carrier.leds .fill (orange, ledA, ledC);
5859 for ( i = 0 ; i < 125 ; i++) {
@@ -71,6 +72,7 @@ void fadeLoop() {
7172
7273}
7374
75+ // Compose the differentn parts of the image
7476void drawEIoT () {
7577 carrier.display .drawBitmap (44 , 25 , ArduinoLogo, 152 , 72 , 0x04B3 );
7678 carrier.display .drawBitmap (48 , 110 , ArduinoText, 144 , 23 , 0x04B3 );
@@ -79,6 +81,7 @@ void drawEIoT() {
7981 carrier.display .drawBitmap (0 , 150 , ExploreIoTtext, 240 , 75 , 0xFFFF );
8082}
8183
84+ // Same with the Arduino Logo and the text
8285void drawArduino (uint16_t color) {
8386 carrier.display .drawBitmap (44 , 60 , ArduinoLogo, 152 , 72 , color);
8487 carrier.display .drawBitmap (48 , 145 , ArduinoText, 144 , 23 , color);
0 commit comments