Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
projets:matrice_led_24x24 [01/06/2018 18:24] Mathieu Hery |
projets:matrice_led_24x24 [03/12/2018 17:06] Mathieu Hery |
||
---|---|---|---|
Ligne 11: | Ligne 11: | ||
{{projets:ledmatrix_smiley.jpg?400}} | {{projets:ledmatrix_smiley.jpg?400}} | ||
+ | {{projets:ppm_conversion_matrix.png?400}} | ||
+ | {{projets:ppm_conversion_math.png?400}} | ||
+ | {{projets:ppm_read_order.png?400}} | ||
+ | |||
---- | ---- | ||
Ligne 19: | Ligne 23: | ||
*Dans gimp exporter le bitmap 24x24 en image ppm et choisir ASCII. | *Dans gimp exporter le bitmap 24x24 en image ppm et choisir ASCII. | ||
- | *Utiliser ce [[https://github.com/8mh8/ppmconverter|script python]] ci-dessous pour convertir le fichier ppm en deux pavés à copier/coller dans arduino | + | *Utiliser ce [[https://github.com/8mh8/ppmconverter|programme python]] pour convertir le fichier ppm en deux pavés à copier/coller dans arduino |
+ | |||
+ | ==== Code Arduino ==== | ||
+ | |||
+ | ++++ Déclaration de la matrice | | ||
+ | <code c> | ||
+ | Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(8, 8, 3, 3, PIN, | ||
+ | NEO_TILE_BOTTOM + NEO_TILE_RIGHT + NEO_TILE_ROWS + NEO_TILE_PROGRESSIVE + | ||
+ | NEO_MATRIX_BOTTOM + NEO_MATRIX_RIGHT + NEO_MATRIX_ROWS + NEO_MATRIX_PROGRESSIVE, | ||
+ | NEO_GRB + NEO_KHZ800); | ||
+ | </code> | ||
+ | ++++ | ||
Ligne 26: | Ligne 41: | ||
{{projets:bulbasaur.png?200}} | {{projets:bulbasaur.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/bulbasaur.ppm|Bulbasaur PPM]] | ||
++++ | ++++ | ||
- | Bulbausaur A REFAIRE| | + | Bulbasaur Arduino| |
<code c> | <code c> | ||
Copy/Paste this part before your setup(): | Copy/Paste this part before your setup(): | ||
- | //Pixels bulbasaur | + | // Pixels bulbasaur : |
- | const uint16_t bulbasaur0[] = {513, 514, 47, 55, 63, 96, 97, 98, 107, 108, 109, 110, 111, 115, 122, 125, 168, 169, 178, 179, 188, 196, 197, 198, 203, 206, 211, 215, 219, 220, 221, 222, 227, 234, 242, 250, 257, 260, 261, 272, 273, 275, 282, 290, 291, 292, 301, 310, 311, 319, 325, 333, 340, 341, 348, 349, 356, 363, 371, 376, 379, 387, 396, 397, 406, 414, 423, 455, 461, 462, 466, 467, 468, 474, 480, 481}; | + | const uint16_t PROGMEM bulbasaur0[] = {513, 514, 47, 55, 63, 96, 97, 98, 107, 108, 109, 110, 111, 115, 122, 125, 168, 169, 178, 179, 188, 196, 197, 198, 203, 206, 211, 215, 219, 220, 221, 222, 227, 234, 242, 250, 257, 260, 261, 272, 273, 275, 282, 290, 291, 292, 301, 310, 311, 319, 325, 333, 340, 341, 348, 349, 356, 363, 371, 376, 379, 387, 396, 397, 406, 414, 423, 455, 461, 462, 466, 467, 468, 474, 480, 481}; |
- | const uint16_t bulbasaur1[] = {105, 112, 113, 114, 116, 117, 118, 119, 120, 121, 123, 176, 177, 187, 199, 205, 207, 212, 213, 214, 256, 258, 259, 264, 265, 266, 267, 274, 279, 294, 295, 302, 324, 328, 339, 347, 353}; | + | const uint16_t PROGMEM bulbasaur1[] = {105, 112, 113, 114, 116, 117, 118, 119, 120, 121, 123, 176, 177, 187, 199, 205, 207, 212, 213, 214, 256, 258, 259, 264, 265, 266, 267, 274, 279, 294, 295, 302, 324, 328, 339, 347, 353}; |
- | const uint16_t bulbasaur2[] = {124, 184, 185, 186, 268, 271, 276, 277, 278, 283, 284, 285, 286, 287, 293, 303, 320, 321, 322, 323, 329, 330, 331, 332, 336, 337, 338, 344, 345, 346, 352, 354, 355, 360, 361, 362, 368, 369, 370, 377, 378}; | + | const uint16_t PROGMEM bulbasaur2[] = {124, 184, 185, 186, 268, 271, 276, 277, 278, 283, 284, 285, 286, 287, 293, 303, 320, 321, 322, 323, 329, 330, 331, 332, 336, 337, 338, 344, 345, 346, 352, 354, 355, 360, 361, 362, 368, 369, 370, 377, 378}; |
- | const uint16_t bulbasaur3[] = {126, 262}; | + | const uint16_t PROGMEM bulbasaur3[] = {126, 262}; |
- | const uint16_t bulbasaur4[] = {223, 228, 230, 231, 235, 236, 238, 239, 243, 244, 246, 247, 251, 252, 253, 255, 280, 281, 288, 289, 296, 297, 298, 300, 304, 305, 306, 308, 312, 313, 315, 317, 318, 388, 389, 390, 398, 407, 415, 448, 449, 452, 453, 454, 456, 457, 459, 460, 464, 465, 472, 473}; | + | const uint16_t PROGMEM bulbasaur4[] = {223, 228, 230, 231, 235, 236, 238, 239, 243, 244, 246, 247, 251, 252, 253, 255, 280, 281, 288, 289, 296, 297, 298, 300, 304, 305, 306, 308, 312, 313, 315, 317, 318, 388, 389, 390, 398, 407, 415, 448, 449, 452, 453, 454, 456, 457, 459, 460, 464, 465, 472, 473}; |
- | const uint16_t bulbasaur5[] = {229, 237, 245, 254, 299, 307, 309, 314, 316, 391, 399, 450, 451, 458}; | + | const uint16_t PROGMEM bulbasaur5[] = {229, 237, 245, 254, 299, 307, 309, 314, 316, 391, 399, 450, 451, 458}; |
Copy/Paste this part in your loop(): | Copy/Paste this part in your loop(): | ||
- | //Draw bulbasaur | + | // Draw bulbasaur : |
- | for (int i = 0; i < 76; i++){matrix.setPixelColor(bulbasaur0[i], 255, 255, 255);} | + | for (int i = 0; i < 76; i++){matrix.setPixelColor(pgm_read_word_near(&bulbasaur0[i]), 255, 255, 255);} |
- | for (int i = 0; i < 37; i++){matrix.setPixelColor(bulbasaur1[i], 0, 87, 168);} | + | for (int i = 0; i < 37; i++){matrix.setPixelColor(pgm_read_word_near(&bulbasaur1[i]), 0, 87, 168);} |
- | for (int i = 0; i < 41; i++){matrix.setPixelColor(bulbasaur2[i], 135, 192, 234);} | + | for (int i = 0; i < 41; i++){matrix.setPixelColor(pgm_read_word_near(&bulbasaur2[i]), 135, 192, 234);} |
- | for (int i = 0; i < 2; i++){matrix.setPixelColor(bulbasaur3[i], 255, 0, 0);} | + | for (int i = 0; i < 2; i++){matrix.setPixelColor(pgm_read_word_near(&bulbasaur3[i]), 255, 0, 0);} |
- | for (int i = 0; i < 52; i++){matrix.setPixelColor(bulbasaur4[i], 149, 185, 11);} | + | for (int i = 0; i < 52; i++){matrix.setPixelColor(pgm_read_word_near(&bulbasaur4[i]), 149, 185, 11);} |
- | for (int i = 0; i < 14; i++){matrix.setPixelColor(bulbasaur5[i], 0, 153, 0);} | + | for (int i = 0; i < 14; i++){matrix.setPixelColor(pgm_read_word_near(&bulbasaur5[i]), 0, 153, 0);} |
matrix.show(); | matrix.show(); | ||
- | delay(10000); | + | delay(delay_var); |
matrix.fillScreen(0); | matrix.fillScreen(0); | ||
Ligne 57: | Ligne 72: | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:burger.png?200}} | {{projets:burger.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/burger.ppm|Burger PPM]] | ||
++++ | ++++ | ||
- | Burger | | + | Burger Arduino| |
<code c> | <code c> | ||
Ligne 91: | Ligne 106: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:carapuce.png?200}} | {{projets:carapuce.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/carapuce.ppm|Carapuce PPM]] | ||
++++ | ++++ | ||
- | Carapuce A REFAIRE| | + | Carapuce Arduino| |
<code c> | <code c> | ||
Copy/Paste this part before your setup(): | Copy/Paste this part before your setup(): | ||
- | //Pixels carapuce | + | // Pixels carapuce : |
- | const uint16_t carapuce0[] = {517, 524, 532, 539, 544, 545, 546, 63, 97, 98, 99, 104, 108, 112, 113, 115, 116, 117, 121, 125, 126, 127, 184, 199, 206, 214, 222, 230, 237, 238, 243, 244, 245, 247, 250, 252, 255, 257, 263, 266, 267, 268, 269, 274, 278, 286, 287, 292, 293, 299, 321, 328, 337, 338, 344, 345, 347, 354, 355, 364, 373, 376, 381, 385, 388, 393, 395, 399, 401, 407, 410, 414, 419, 420, 421, 448, 457, 458, 460, 467, 468, 477, 478, 487}; | + | const uint16_t PROGMEM carapuce0[] = {517, 524, 532, 539, 544, 545, 546, 63, 97, 98, 99, 104, 108, 112, 113, 115, 116, 117, 121, 125, 126, 127, 184, 199, 206, 214, 222, 230, 237, 238, 243, 244, 245, 247, 250, 252, 255, 257, 263, 266, 267, 268, 269, 274, 278, 286, 287, 292, 293, 299, 321, 328, 337, 338, 344, 345, 347, 354, 355, 364, 373, 376, 381, 385, 388, 393, 395, 399, 401, 407, 410, 414, 419, 420, 421, 448, 457, 458, 460, 467, 468, 477, 478, 487}; |
- | const uint16_t carapuce1[] = {512, 513, 514, 515, 520, 521, 522, 523, 528, 529, 530, 531, 536, 537, 538, 105, 106, 107, 114, 122, 246, 251, 253, 254, 275, 276, 277, 282, 283, 284, 285, 290, 291, 294, 295, 300, 301, 302, 308, 309, 310, 316, 317, 318, 320, 346, 352, 353, 361, 362, 363, 369, 370, 371, 372, 377, 378, 379, 380, 386, 387, 389, 390, 391, 394, 396, 397, 398, 402, 403, 404, 405, 406, 411, 412, 413, 452, 453, 454, 455, 461, 462, 463, 469, 470, 471, 479}; | + | const uint16_t PROGMEM carapuce1[] = {512, 513, 514, 515, 520, 521, 522, 523, 528, 529, 530, 531, 536, 537, 538, 105, 106, 107, 114, 122, 246, 251, 253, 254, 275, 276, 277, 282, 283, 284, 285, 290, 291, 294, 295, 300, 301, 302, 308, 309, 310, 316, 317, 318, 320, 346, 352, 353, 361, 362, 363, 369, 370, 371, 372, 377, 378, 379, 380, 386, 387, 389, 390, 391, 394, 396, 397, 398, 402, 403, 404, 405, 406, 411, 412, 413, 452, 453, 454, 455, 461, 462, 463, 469, 470, 471, 479}; |
- | const uint16_t carapuce2[] = {123, 124, 258, 259, 260, 261, 262, 270, 271, 279, 336}; | + | const uint16_t PROGMEM carapuce2[] = {123, 124, 258, 259, 260, 261, 262, 270, 271, 279, 336}; |
- | const uint16_t carapuce3[] = {516, 207, 215, 223, 231, 239, 264, 272, 280, 288, 296, 297, 303, 304, 305, 306, 311, 312, 313, 314, 449, 450, 451, 459}; | + | const uint16_t PROGMEM carapuce3[] = {516, 207, 215, 223, 231, 239, 264, 272, 280, 288, 296, 297, 303, 304, 305, 306, 311, 312, 313, 314, 449, 450, 451, 459}; |
Copy/Paste this part in your loop(): | Copy/Paste this part in your loop(): | ||
- | //Draw carapuce | + | // Draw carapuce : |
- | for (int i = 0; i < 84; i++){matrix.setPixelColor(carapuce0[i], 255, 255, 255);} | + | for (int i = 0; i < 84; i++){matrix.setPixelColor(pgm_read_word_near(&carapuce0[i]), 255, 255, 255);} |
- | for (int i = 0; i < 87; i++){matrix.setPixelColor(carapuce1[i], 135, 192, 234);} | + | for (int i = 0; i < 87; i++){matrix.setPixelColor(pgm_read_word_near(&carapuce1[i]), 135, 192, 234);} |
- | for (int i = 0; i < 11; i++){matrix.setPixelColor(carapuce2[i], 238, 245, 0);} | + | for (int i = 0; i < 11; i++){matrix.setPixelColor(pgm_read_word_near(&carapuce2[i]), 238, 245, 0);} |
- | for (int i = 0; i < 24; i++){matrix.setPixelColor(carapuce3[i], 102, 51, 0);} | + | for (int i = 0; i < 24; i++){matrix.setPixelColor(pgm_read_word_near(&carapuce3[i]), 102, 51, 0);} |
matrix.show(); | matrix.show(); | ||
delay(10000); | delay(10000); | ||
Ligne 120: | Ligne 137: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:chica.png?200}} | {{projets:chica.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/chica.ppm|Chica PPM]] | ||
++++ | ++++ | ||
- | Chica A REFAIRE| | + | Chica Arduino| |
<code c> | <code c> | ||
Copy/Paste this part before your setup(): | Copy/Paste this part before your setup(): | ||
- | //Pixels chica | + | // Pixels chica : |
- | const uint16_t chica0[] = {512, 513, 2, 3, 4, 5, 6, 7, 520, 15, 30, 37, 38, 44, 45, 46, 52, 53, 54, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 79, 127, 128, 129, 130, 131, 132, 160, 168, 169, 176, 177, 178, 184, 185, 186, 187, 195, 196, 197, 198, 199, 203, 204, 211, 212, 219, 220, 227, 228, 229, 235, 236, 237, 238, 239, 244, 245, 246, 247, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 265, 266, 267, 268, 269, 273, 274, 275, 276, 277, 281, 282, 283, 284, 285, 289, 290, 291, 292, 293, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 330, 331, 338, 339, 346, 347, 353, 354, 355, 360, 361, 362, 363, 368, 369, 370, 376, 377, 378, 389, 390, 391, 398, 399, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 473, 474, 475, 476, 482, 483, 484}; | + | const uint16_t PROGMEM chica0[] = {512, 513, 2, 3, 4, 5, 6, 7, 520, 15, 30, 37, 38, 44, 45, 46, 52, 53, 54, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 79, 127, 128, 129, 130, 131, 132, 160, 168, 169, 176, 177, 178, 184, 185, 186, 187, 195, 196, 197, 198, 199, 203, 204, 211, 212, 219, 220, 227, 228, 229, 235, 236, 237, 238, 239, 244, 245, 246, 247, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 265, 266, 267, 268, 269, 273, 274, 275, 276, 277, 281, 282, 283, 284, 285, 289, 290, 291, 292, 293, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 330, 331, 338, 339, 346, 347, 353, 354, 355, 360, 361, 362, 363, 368, 369, 370, 376, 377, 378, 389, 390, 391, 398, 399, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 473, 474, 475, 476, 482, 483, 484}; |
- | const uint16_t chica1[] = {521, 514, 528, 22, 23, 29, 36, 43, 51, 58, 72, 73, 74, 75, 76, 77, 78, 87, 144, 152, 153, 161, 162, 170, 171, 179, 188, 194, 202, 205, 206, 207, 210, 218, 226, 234, 243, 251, 264, 270, 271, 288, 294, 324, 328, 329, 332, 340, 348, 356, 364, 371, 379, 388, 397, 406, 407, 430, 438, 439, 471, 472, 477, 478, 481, 488, 489, 491, 493, 494, 496, 498, 499}; | + | const uint16_t PROGMEM chica1[] = {521, 514, 528, 22, 23, 29, 36, 43, 51, 58, 72, 73, 74, 75, 76, 77, 78, 87, 144, 152, 153, 161, 162, 170, 171, 179, 188, 194, 202, 205, 206, 207, 210, 218, 226, 234, 243, 251, 264, 270, 271, 288, 294, 324, 328, 329, 332, 340, 348, 356, 364, 371, 379, 388, 397, 406, 407, 430, 438, 439, 471, 472, 477, 478, 481, 488, 489, 491, 493, 494, 496, 498, 499}; |
- | const uint16_t chica2[] = {31, 39, 47, 55, 80, 81, 82, 83, 84, 85, 86, 95, 96, 97, 98, 99, 100, 101, 102, 103, 111, 119, 120, 121, 122, 123, 124, 125, 126}; | + | const uint16_t PROGMEM chica2[] = {31, 39, 47, 55, 80, 81, 82, 83, 84, 85, 86, 95, 96, 97, 98, 99, 100, 101, 102, 103, 111, 119, 120, 121, 122, 123, 124, 125, 126}; |
- | const uint16_t chica3[] = {88, 89, 90, 91, 92, 93, 94, 104, 105, 106, 107, 108, 109, 110, 115, 116, 117, 118}; | + | const uint16_t PROGMEM chica3[] = {88, 89, 90, 91, 92, 93, 94, 104, 105, 106, 107, 108, 109, 110, 115, 116, 117, 118}; |
- | const uint16_t chica4[] = {112, 113, 114}; | + | const uint16_t PROGMEM chica4[] = {112, 113, 114}; |
- | const uint16_t chica5[] = {213, 221, 230, 231, 272, 278, 280, 286, 295, 337, 345, 352}; | + | const uint16_t PROGMEM chica5[] = {213, 221, 230, 231, 272, 278, 280, 286, 295, 337, 345, 352}; |
- | const uint16_t chica6[] = {214, 222, 223, 287, 336, 344}; | + | const uint16_t PROGMEM chica6[] = {214, 222, 223, 287, 336, 344}; |
Copy/Paste this part in your loop(): | Copy/Paste this part in your loop(): | ||
- | //Draw chica | + | // Draw chica : |
- | for (int i = 0; i < 186; i++){matrix.setPixelColor(chica0[i], 255, 204, 0);} | + | for (int i = 0; i < 186; i++){matrix.setPixelColor(pgm_read_word_near(&chica0[i]), 255, 204, 0);} |
- | for (int i = 0; i < 73; i++){matrix.setPixelColor(chica1[i], 230, 184, 0);} | + | for (int i = 0; i < 73; i++){matrix.setPixelColor(pgm_read_word_near(&chica1[i]), 230, 184, 0);} |
- | for (int i = 0; i < 29; i++){matrix.setPixelColor(chica2[i], 224, 148, 0);} | + | for (int i = 0; i < 29; i++){matrix.setPixelColor(pgm_read_word_near(&chica2[i]), 224, 148, 0);} |
- | for (int i = 0; i < 18; i++){matrix.setPixelColor(chica3[i], 255, 168, 0);} | + | for (int i = 0; i < 18; i++){matrix.setPixelColor(pgm_read_word_near(&chica3[i]), 255, 168, 0);} |
- | for (int i = 0; i < 3; i++){matrix.setPixelColor(chica4[i], 251, 174, 27);} | + | for (int i = 0; i < 3; i++){matrix.setPixelColor(pgm_read_word_near(&chica4[i]), 251, 174, 27);} |
- | for (int i = 0; i < 12; i++){matrix.setPixelColor(chica5[i], 255, 255, 255);} | + | for (int i = 0; i < 12; i++){matrix.setPixelColor(pgm_read_word_near(&chica5[i]), 255, 255, 255);} |
- | for (int i = 0; i < 6; i++){matrix.setPixelColor(chica6[i], 131, 215, 204);} | + | for (int i = 0; i < 6; i++){matrix.setPixelColor(pgm_read_word_near(&chica6[i]), 131, 215, 204);} |
matrix.show(); | matrix.show(); | ||
delay(10000); | delay(10000); | ||
Ligne 157: | Ligne 175: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:foxy.png?200}} | {{projets:foxy.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/foxy.ppm|Foxy PPM]] | ||
++++ | ++++ | ||
- | Foxy A REFAIRE| | + | Foxy Arduino| |
<code c> | <code c> | ||
Copy/Paste this part before your setup(): | Copy/Paste this part before your setup(): | ||
- | //Pixels foxy | + | // Pixels foxy : |
- | const uint16_t foxy0[] = {2, 3, 4, 5, 6, 7, 14, 71, 128, 129, 130, 131, 132, 136}; | + | const uint16_t PROGMEM foxy0[] = {2, 3, 4, 5, 6, 7, 14, 71, 128, 129, 130, 131, 132, 136}; |
- | const uint16_t foxy1[] = {15, 22, 536, 537, 29, 546, 36, 43, 51, 564, 58, 573, 64, 65, 66, 67, 68, 69, 70, 78, 79, 118, 119, 125, 144, 153, 162, 171, 179, 185, 188, 194, 196, 197, 198, 199, 202, 210, 218, 220, 226, 233, 234, 241, 256, 257, 555, 260, 267, 275, 283, 289, 290, 291, 297, 301, 302, 303, 305, 307, 308, 312, 315, 322, 332, 339, 340, 347, 348, 354, 356, 360, 361, 365, 391, 398, 406, 413, 420, 427, 433, 434, 441, 450, 451, 457, 458, 465, 466, 467, 468, 469, 470, 471}; | + | const uint16_t PROGMEM foxy1[] = {15, 22, 536, 537, 29, 546, 36, 43, 51, 564, 58, 573, 64, 65, 66, 67, 68, 69, 70, 78, 79, 118, 119, 125, 144, 153, 162, 171, 179, 185, 188, 194, 196, 197, 198, 199, 202, 210, 218, 220, 226, 233, 234, 241, 256, 257, 555, 260, 267, 275, 283, 289, 290, 291, 297, 301, 302, 303, 305, 307, 308, 312, 315, 322, 332, 339, 340, 347, 348, 354, 356, 360, 361, 365, 391, 398, 406, 413, 420, 427, 433, 434, 441, 450, 451, 457, 458, 465, 466, 467, 468, 469, 470, 471}; |
- | const uint16_t foxy2[] = {512, 520, 521, 528, 529, 259, 23, 538, 30, 517, 547, 37, 44, 565, 566, 55, 59, 60, 62, 63, 72, 526, 87, 97, 98, 99, 100, 101, 104, 105, 106, 107, 108, 109, 110, 112, 113, 117, 120, 121, 122, 124, 152, 161, 170, 186, 187, 195, 574, 203, 211, 219, 227, 228, 229, 230, 231, 235, 236, 237, 238, 239, 242, 243, 244, 245, 246, 247, 248, 249, 250, 253, 254, 255, 258, 556, 266, 274, 281, 282, 288, 296, 304, 309, 310, 311, 316, 317, 318, 319, 355, 362, 363, 364, 61, 368, 369, 370, 371, 372, 373, 376, 377, 381, 382, 384, 385, 390, 392, 397, 399, 405, 412, 419, 426, 432, 440, 452, 453, 454, 455, 459, 460, 461, 462, 463, 518}; | + | const uint16_t PROGMEM foxy2[] = {512, 520, 521, 528, 529, 259, 23, 538, 30, 517, 547, 37, 44, 565, 566, 55, 59, 60, 62, 63, 72, 526, 87, 97, 98, 99, 100, 101, 104, 105, 106, 107, 108, 109, 110, 112, 113, 117, 120, 121, 122, 124, 152, 161, 170, 186, 187, 195, 574, 203, 211, 219, 227, 228, 229, 230, 231, 235, 236, 237, 238, 239, 242, 243, 244, 245, 246, 247, 248, 249, 250, 253, 254, 255, 258, 556, 266, 274, 281, 282, 288, 296, 304, 309, 310, 311, 316, 317, 318, 319, 355, 362, 363, 364, 61, 368, 369, 370, 371, 372, 373, 376, 377, 381, 382, 384, 385, 390, 392, 397, 399, 405, 412, 419, 426, 432, 440, 452, 453, 454, 455, 459, 460, 461, 462, 463, 518}; |
- | const uint16_t foxy3[] = {38, 45, 47, 73, 74, 75, 76, 77, 80, 86, 89, 90, 91, 92, 93, 95, 96, 102, 111, 160, 169, 176, 204, 205, 212, 213, 221, 222, 223, 273, 280, 265, 54, 31}; | + | const uint16_t PROGMEM foxy3[] = {38, 45, 47, 73, 74, 75, 76, 77, 80, 86, 89, 90, 91, 92, 93, 95, 96, 102, 111, 160, 169, 176, 204, 205, 212, 213, 221, 222, 223, 273, 280, 265, 54, 31}; |
- | const uint16_t foxy4[] = {206, 207, 214, 264, 272}; | + | const uint16_t PROGMEM foxy4[] = {206, 207, 214, 264, 272}; |
- | const uint16_t foxy5[] = {523, 524, 514, 532, 533, 540, 558, 515, 531, 534, 550, 516, 541, 542, 251, 525, 549, 378, 379, 380, 386, 387, 388, 393, 394, 395, 400, 401, 402, 408, 409, 410, 416, 417, 424}; | + | const uint16_t PROGMEM foxy5[] = {523, 524, 514, 532, 533, 540, 558, 515, 531, 534, 550, 516, 541, 542, 251, 525, 549, 378, 379, 380, 386, 387, 388, 393, 394, 395, 400, 401, 402, 408, 409, 410, 416, 417, 424}; |
- | const uint16_t foxy6[] = {513, 522, 530, 539, 548, 252, 557, 389, 396, 403, 404, 411, 418, 425}; | + | const uint16_t PROGMEM foxy6[] = {513, 522, 530, 539, 548, 252, 557, 389, 396, 403, 404, 411, 418, 425}; |
Copy/Paste this part in your loop(): | Copy/Paste this part in your loop(): | ||
- | //Draw foxy | + | // Draw foxy : |
- | for (int i = 0; i < 14; i++){matrix.setPixelColor(foxy0[i], 213, 90, 0);} | + | for (int i = 0; i < 14; i++){matrix.setPixelColor(pgm_read_word_near(&foxy0[i]), 213, 90, 0);} |
- | for (int i = 0; i < 94; i++){matrix.setPixelColor(foxy1[i], 240, 102, 0);} | + | for (int i = 0; i < 94; i++){matrix.setPixelColor(pgm_read_word_near(&foxy1[i]), 240, 102, 0);} |
- | for (int i = 0; i < 127; i++){matrix.setPixelColor(foxy2[i], 255, 108, 0);} | + | for (int i = 0; i < 127; i++){matrix.setPixelColor(pgm_read_word_near(&foxy2[i]), 255, 108, 0);} |
- | for (int i = 0; i < 34; i++){matrix.setPixelColor(foxy3[i], 255, 255, 255);} | + | for (int i = 0; i < 34; i++){matrix.setPixelColor(pgm_read_word_near(&foxy3[i]), 255, 255, 255);} |
- | for (int i = 0; i < 5; i++){matrix.setPixelColor(foxy4[i], 212, 171, 9);} | + | for (int i = 0; i < 5; i++){matrix.setPixelColor(pgm_read_word_near(&foxy4[i]), 212, 171, 9);} |
- | for (int i = 0; i < 35; i++){matrix.setPixelColor(foxy5[i], 255, 141, 57);} | + | for (int i = 0; i < 35; i++){matrix.setPixelColor(pgm_read_word_near(&foxy5[i]), 255, 141, 57);} |
- | for (int i = 0; i < 14; i++){matrix.setPixelColor(foxy6[i], 237, 135, 60);} | + | for (int i = 0; i < 14; i++){matrix.setPixelColor(pgm_read_word_near(&foxy6[i]), 237, 135, 60);} |
matrix.show(); | matrix.show(); | ||
delay(10000); | delay(10000); | ||
Ligne 194: | Ligne 213: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:freddy.png?200}} | {{projets:freddy.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/freddy.ppm|Freddy PPM]] | ||
++++ | ++++ | ||
- | Freddy | | + | Freddy Arduino| |
<code c> | <code c> | ||
Copy/Paste this part before your setup(): | Copy/Paste this part before your setup(): | ||
Ligne 231: | Ligne 251: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:lucarioriolu.png?200}} | {{projets:lucarioriolu.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/LucarioRiolu.ppm|LucarioRiolu PPM]] | ||
++++ | ++++ | ||
- | LucarioRiolu | | + | LucarioRiolu Arduino| |
<code c> | <code c> | ||
Ligne 270: | Ligne 291: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:mangle.png?200}} | {{projets:mangle.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/mangle.ppm|Mangle PPM]] | ||
++++ | ++++ | ||
- | Mangle A REFAIRE| | + | Mangle Arduino| |
<code c> | <code c> | ||
Copy/Paste this part before your setup(): | Copy/Paste this part before your setup(): | ||
- | //Pixels mangle | + | // Pixels mangle : |
- | const uint16_t mangle0[] = {3, 4, 5, 6, 7, 22, 23, 37, 38, 44, 45, 46, 47, 53, 54, 55, 57, 58, 61, 62, 64, 65, 69, 70, 71, 74, 75, 76, 80, 81, 82, 84, 85, 86, 87, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125, 128, 129, 130, 131, 144, 160, 161, 168, 169, 176, 177, 184, 185, 188, 189, 193, 194, 195, 196, 197, 200, 203, 204, 211, 212, 219, 220, 227, 228, 242, 243, 244, 247, 249, 250, 253, 258, 259, 260, 264, 267, 275, 283, 285, 286, 287, 291, 294, 295, 298, 299, 300, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 321, 322, 323, 324, 325, 328, 330, 331, 334, 336, 338, 339, 344, 346, 347, 354, 355, 370, 371, 372, 373, 377, 381, 382, 384, 385, 390, 392, 398, 405, 406, 412, 419, 426, 432, 433, 440, 448, 449, 450, 451, 452, 453, 454, 456, 457, 458, 459, 460, 461, 462, 465, 466, 467, 468, 469, 475, 512, 517, 518, 520, 526, 528, 529, 538, 547, 556, 565, 566}; | + | const uint16_t PROGMEM mangle0[] = {3, 4, 5, 6, 7, 22, 23, 37, 38, 44, 45, 46, 47, 53, 54, 55, 57, 58, 61, 62, 64, 65, 69, 70, 71, 74, 75, 76, 80, 81, 82, 84, 85, 86, 87, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125, 128, 129, 130, 131, 144, 160, 161, 168, 169, 176, 177, 184, 185, 188, 189, 193, 194, 195, 196, 197, 200, 203, 204, 211, 212, 219, 220, 227, 228, 242, 243, 244, 247, 249, 250, 253, 258, 259, 260, 264, 267, 275, 283, 285, 286, 287, 291, 294, 295, 298, 299, 300, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 321, 322, 323, 324, 325, 328, 330, 331, 334, 336, 338, 339, 344, 346, 347, 354, 355, 370, 371, 372, 373, 377, 381, 382, 384, 385, 390, 392, 398, 405, 406, 412, 419, 426, 432, 433, 440, 448, 449, 450, 451, 452, 453, 454, 456, 457, 458, 459, 460, 461, 462, 465, 466, 467, 468, 469, 475, 512, 517, 518, 520, 526, 528, 529, 538, 547, 556, 565, 566}; |
- | const uint16_t mangle1[] = {15, 29, 36, 43, 66, 67, 68, 72, 73, 77, 78, 79, 126, 127, 153, 162, 170, 171, 202, 210, 218, 226, 234, 235, 236, 237, 241, 248, 255, 261, 268, 276, 319, 320, 329, 332, 337, 340, 348, 356, 361, 362, 363, 364, 391, 399, 407, 413, 420, 427, 434, 441, 455, 463, 464, 470, 471, 473, 474, 476, 477, 537, 546, 555, 564, 573, 574}; | + | const uint16_t PROGMEM mangle1[] = {15, 29, 36, 43, 66, 67, 68, 72, 73, 77, 78, 79, 126, 127, 153, 162, 170, 171, 202, 210, 218, 226, 234, 235, 236, 237, 241, 248, 255, 261, 268, 276, 319, 320, 329, 332, 337, 340, 348, 356, 361, 362, 363, 364, 391, 399, 407, 413, 420, 427, 434, 441, 455, 463, 464, 470, 471, 473, 474, 476, 477, 537, 546, 555, 564, 573, 574}; |
- | const uint16_t mangle2[] = {83, 90, 91, 92}; | + | const uint16_t PROGMEM mangle2[] = {83, 90, 91, 92}; |
- | const uint16_t mangle3[] = {30, 31, 39, 88, 89, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 109, 110, 152, 221, 229, 230, 238, 239, 251, 252, 282, 284, 289, 290, 292, 293, 296, 297, 301, 302, 303, 345, 352, 353, 360, 378, 379, 380, 386, 387, 388, 389, 393, 394, 395, 396, 397, 400, 401, 402, 403, 404, 408, 409, 410, 411, 416, 417, 418, 424, 425, 513, 514, 515, 516, 521, 522, 523, 524, 525, 530, 531, 532, 533, 534, 539, 540, 541, 542, 548, 549, 550, 557, 558}; | + | const uint16_t PROGMEM mangle3[] = {30, 31, 39, 88, 89, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 109, 110, 152, 221, 229, 230, 238, 239, 251, 252, 282, 284, 289, 290, 292, 293, 296, 297, 301, 302, 303, 345, 352, 353, 360, 378, 379, 380, 386, 387, 388, 389, 393, 394, 395, 396, 397, 400, 401, 402, 403, 404, 408, 409, 410, 411, 416, 417, 418, 424, 425, 513, 514, 515, 516, 521, 522, 523, 524, 525, 530, 531, 532, 533, 534, 539, 540, 541, 542, 548, 549, 550, 557, 558}; |
- | const uint16_t mangle4[] = {51, 52, 60, 178, 179, 187}; | + | const uint16_t PROGMEM mangle4[] = {51, 52, 60, 178, 179, 187}; |
- | const uint16_t mangle5[] = {59, 186}; | + | const uint16_t PROGMEM mangle5[] = {59, 186}; |
- | const uint16_t mangle6[] = {262, 263, 269, 271, 277, 278, 279}; | + | const uint16_t PROGMEM mangle6[] = {262, 263, 269, 271, 277, 278, 279}; |
- | const uint16_t mangle7[] = {245, 246, 254, 368, 369, 376}; | + | const uint16_t PROGMEM mangle7[] = {245, 246, 254, 368, 369, 376}; |
- | const uint16_t mangle8[] = {567}; | + | const uint16_t PROGMEM mangle8[] = {567}; |
- | const uint16_t mangle9[] = {575}; | + | const uint16_t PROGMEM mangle9[] = {575}; |
Copy/Paste this part in your loop(): | Copy/Paste this part in your loop(): | ||
- | //Draw mangle | + | // Draw mangle : |
- | for (int i = 0; i < 185; i++){matrix.setPixelColor(mangle0[i], 255, 255, 255);} | + | for (int i = 0; i < 185; i++){matrix.setPixelColor(pgm_read_word_near(&mangle0[i]), 255, 255, 255);} |
- | for (int i = 0; i < 67; i++){matrix.setPixelColor(mangle1[i], 224, 224, 224);} | + | for (int i = 0; i < 67; i++){matrix.setPixelColor(pgm_read_word_near(&mangle1[i]), 224, 224, 224);} |
- | for (int i = 0; i < 4; i++){matrix.setPixelColor(mangle2[i], 255, 40, 40);} | + | for (int i = 0; i < 4; i++){matrix.setPixelColor(pgm_read_word_near(&mangle2[i]), 255, 40, 40);} |
- | for (int i = 0; i < 92; i++){matrix.setPixelColor(mangle3[i], 255, 154, 209);} | + | for (int i = 0; i < 92; i++){matrix.setPixelColor(pgm_read_word_near(&mangle3[i]), 255, 154, 209);} |
- | for (int i = 0; i < 6; i++){matrix.setPixelColor(mangle4[i], 255, 46, 46);} | + | for (int i = 0; i < 6; i++){matrix.setPixelColor(pgm_read_word_near(&mangle4[i]), 255, 46, 46);} |
- | for (int i = 0; i < 2; i++){matrix.setPixelColor(mangle5[i], 255, 126, 126);} | + | for (int i = 0; i < 2; i++){matrix.setPixelColor(pgm_read_word_near(&mangle5[i]), 255, 126, 126);} |
- | for (int i = 0; i < 7; i++){matrix.setPixelColor(mangle6[i], 215, 202, 0);} | + | for (int i = 0; i < 7; i++){matrix.setPixelColor(pgm_read_word_near(&mangle6[i]), 215, 202, 0);} |
- | for (int i = 0; i < 6; i++){matrix.setPixelColor(mangle7[i], 99, 99, 99);} | + | for (int i = 0; i < 6; i++){matrix.setPixelColor(pgm_read_word_near(&mangle7[i]), 99, 99, 99);} |
- | for (int i = 0; i < 1; i++){matrix.setPixelColor(mangle8[i], 5, 5, 5);} | + | for (int i = 0; i < 1; i++){matrix.setPixelColor(pgm_read_word_near(&mangle8[i]), 5, 5, 5);} |
- | for (int i = 0; i < 1; i++){matrix.setPixelColor(mangle9[i], 9, 9, 9);} | + | for (int i = 0; i < 1; i++){matrix.setPixelColor(pgm_read_word_near(&mangle9[i]), 9, 9, 9);} |
matrix.show(); | matrix.show(); | ||
delay(10000); | delay(10000); | ||
Ligne 313: | Ligne 335: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:mew.png?200}} | {{projets:mew.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/mew.ppm|Mew PPM]] | ||
++++ | ++++ | ||
- | Mew | | + | Mew Arduino| |
<code c> | <code c> | ||
Ligne 352: | Ligne 374: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:mewtwo.png?200}} | {{projets:mewtwo.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/mewtwo.ppm|Mew Two PPM]] | ||
++++ | ++++ | ||
- | Mew Two | | + | Mew Two Arduino| |
<code c> | <code c> | ||
Ligne 391: | Ligne 413: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:mire.png?200}} | {{projets:mire.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/mire.ppm|Mire PPM]] | ||
++++ | ++++ | ||
- | Mire A REFAIRE| | + | Mire Arduino| |
<code c> | <code c> | ||
Copy/Paste this part before your setup(): | Copy/Paste this part before your setup(): | ||
- | //Pixels mire | + | // Pixels mire : |
- | const uint16_t mire0[] = {0, 16, 32, 48, 192, 208, 224, 240, 384, 400, 416, 432}; | + | const uint16_t PROGMEM mire0[] = {0, 16, 32, 48, 192, 208, 224, 240, 384, 400, 416, 432}; |
- | const uint16_t mire1[] = {1, 519, 9, 527, 17, 535, 25, 543, 33, 551, 41, 559, 49, 567, 57, 575, 135, 143, 151, 159, 167, 175, 183, 191, 193, 201, 209, 217, 225, 233, 241, 249, 327, 335, 343, 351, 359, 367, 375, 383, 385, 393, 401, 409, 417, 425, 433, 441}; | + | const uint16_t PROGMEM mire1[] = {1, 519, 9, 527, 17, 535, 25, 543, 33, 551, 41, 559, 49, 567, 57, 575, 135, 143, 151, 159, 167, 175, 183, 191, 193, 201, 209, 217, 225, 233, 241, 249, 327, 335, 343, 351, 359, 367, 375, 383, 385, 393, 401, 409, 417, 425, 433, 441}; |
- | const uint16_t mire2[] = {3, 11, 19, 27, 35, 43, 51, 59, 195, 203, 211, 219, 227, 235, 243, 251, 387, 395, 403, 411, 419, 427, 435, 443}; | + | const uint16_t PROGMEM mire2[] = {3, 11, 19, 27, 35, 43, 51, 59, 195, 203, 211, 219, 227, 235, 243, 251, 387, 395, 403, 411, 419, 427, 435, 443}; |
- | const uint16_t mire3[] = {5, 13, 21, 29, 37, 45, 53, 61, 197, 205, 213, 221, 229, 237, 245, 253, 389, 397, 405, 413, 421, 429, 437, 445}; | + | const uint16_t PROGMEM mire3[] = {5, 13, 21, 29, 37, 45, 53, 61, 197, 205, 213, 221, 229, 237, 245, 253, 389, 397, 405, 413, 421, 429, 437, 445}; |
- | const uint16_t mire4[] = {15, 23, 39, 31, 199, 207, 215, 7, 223, 231, 239, 247, 255, 47, 55, 63, 391, 399, 407, 415, 423, 431, 439, 447}; | + | const uint16_t PROGMEM mire4[] = {15, 23, 39, 31, 199, 207, 215, 7, 223, 231, 239, 247, 255, 47, 55, 63, 391, 399, 407, 415, 423, 431, 439, 447}; |
- | const uint16_t mire5[] = {65, 73, 81, 89, 97, 105, 113, 121, 257, 265, 273, 281, 289, 297, 305, 313, 449, 457, 465, 473, 481, 489, 497, 505}; | + | const uint16_t PROGMEM mire5[] = {65, 73, 81, 89, 97, 105, 113, 121, 257, 265, 273, 281, 289, 297, 305, 313, 449, 457, 465, 473, 481, 489, 497, 505}; |
- | const uint16_t mire6[] = {67, 75, 83, 99, 107, 115, 123, 283, 91, 259, 267, 275, 291, 299, 307, 315, 451, 459, 467, 475, 483, 491, 499, 507}; | + | const uint16_t PROGMEM mire6[] = {67, 75, 83, 99, 107, 115, 123, 283, 91, 259, 267, 275, 291, 299, 307, 315, 451, 459, 467, 475, 483, 491, 499, 507}; |
- | const uint16_t mire7[] = {69, 77, 85, 93, 101, 109, 117, 125, 261, 269, 277, 285, 293, 301, 309, 317, 453, 461, 469, 477, 485, 493, 501, 509}; | + | const uint16_t PROGMEM mire7[] = {69, 77, 85, 93, 101, 109, 117, 125, 261, 269, 277, 285, 293, 301, 309, 317, 453, 461, 469, 477, 485, 493, 501, 509}; |
- | const uint16_t mire8[] = {71, 79, 87, 95, 103, 111, 119, 127, 263, 271, 279, 287, 295, 303, 311, 319, 455, 463, 471, 479, 487, 495, 503, 511}; | + | const uint16_t PROGMEM mire8[] = {71, 79, 87, 95, 103, 111, 119, 127, 263, 271, 279, 287, 295, 303, 311, 319, 455, 463, 471, 479, 487, 495, 503, 511}; |
- | const uint16_t mire9[] = {529, 513, 553, 129, 137, 145, 161, 169, 177, 185, 537, 521, 561, 321, 329, 337, 345, 353, 361, 369, 377, 545, 569, 153}; | + | const uint16_t PROGMEM mire9[] = {529, 513, 553, 129, 137, 145, 161, 169, 177, 185, 537, 521, 561, 321, 329, 337, 345, 353, 361, 369, 377, 545, 569, 153}; |
- | const uint16_t mire10[] = {531, 563, 379, 515, 131, 147, 155, 171, 179, 187, 331, 547, 571, 539, 139, 339, 347, 523, 355, 363, 371, 555, 163, 323}; | + | const uint16_t PROGMEM mire10[] = {531, 563, 379, 515, 131, 147, 155, 171, 179, 187, 331, 547, 571, 539, 139, 339, 347, 523, 355, 363, 371, 555, 163, 323}; |
- | const uint16_t mire11[] = {549, 573, 133, 533, 141, 149, 157, 165, 517, 173, 181, 189, 557, 325, 333, 341, 349, 357, 365, 373, 541, 381, 565, 525}; | + | const uint16_t PROGMEM mire11[] = {549, 573, 133, 533, 141, 149, 157, 165, 517, 173, 181, 189, 557, 325, 333, 341, 349, 357, 365, 373, 541, 381, 565, 525}; |
Copy/Paste this part in your loop(): | Copy/Paste this part in your loop(): | ||
- | //Draw mire | + | // Draw mire : |
- | for (int i = 0; i < 12; i++){matrix.setPixelColor(mire0[i], 30, 255, 0);} | + | for (int i = 0; i < 12; i++){matrix.setPixelColor(pgm_read_word_near(&mire0[i]), 30, 255, 0);} |
- | for (int i = 0; i < 48; i++){matrix.setPixelColor(mire1[i], 255, 0, 0);} | + | for (int i = 0; i < 48; i++){matrix.setPixelColor(pgm_read_word_near(&mire1[i]), 255, 0, 0);} |
- | for (int i = 0; i < 24; i++){matrix.setPixelColor(mire2[i], 255, 84, 0);} | + | for (int i = 0; i < 24; i++){matrix.setPixelColor(pgm_read_word_near(&mire2[i]), 255, 84, 0);} |
- | for (int i = 0; i < 24; i++){matrix.setPixelColor(mire3[i], 255, 174, 0);} | + | for (int i = 0; i < 24; i++){matrix.setPixelColor(pgm_read_word_near(&mire3[i]), 255, 174, 0);} |
- | for (int i = 0; i < 24; i++){matrix.setPixelColor(mire4[i], 240, 255, 0);} | + | for (int i = 0; i < 24; i++){matrix.setPixelColor(pgm_read_word_near(&mire4[i]), 240, 255, 0);} |
- | for (int i = 0; i < 24; i++){matrix.setPixelColor(mire5[i], 150, 255, 0);} | + | for (int i = 0; i < 24; i++){matrix.setPixelColor(pgm_read_word_near(&mire5[i]), 150, 255, 0);} |
- | for (int i = 0; i < 24; i++){matrix.setPixelColor(mire6[i], 0, 255, 30);} | + | for (int i = 0; i < 24; i++){matrix.setPixelColor(pgm_read_word_near(&mire6[i]), 0, 255, 30);} |
- | for (int i = 0; i < 24; i++){matrix.setPixelColor(mire7[i], 0, 255, 168);} | + | for (int i = 0; i < 24; i++){matrix.setPixelColor(pgm_read_word_near(&mire7[i]), 0, 255, 168);} |
- | for (int i = 0; i < 24; i++){matrix.setPixelColor(mire8[i], 0, 192, 255);} | + | for (int i = 0; i < 24; i++){matrix.setPixelColor(pgm_read_word_near(&mire8[i]), 0, 192, 255);} |
- | for (int i = 0; i < 24; i++){matrix.setPixelColor(mire9[i], 6, 0, 255);} | + | for (int i = 0; i < 24; i++){matrix.setPixelColor(pgm_read_word_near(&mire9[i]), 6, 0, 255);} |
- | for (int i = 0; i < 24; i++){matrix.setPixelColor(mire10[i], 174, 0, 255);} | + | for (int i = 0; i < 24; i++){matrix.setPixelColor(pgm_read_word_near(&mire10[i]), 174, 0, 255);} |
- | for (int i = 0; i < 24; i++){matrix.setPixelColor(mire11[i], 252, 0, 255);} | + | for (int i = 0; i < 24; i++){matrix.setPixelColor(pgm_read_word_near(&mire11[i]), 252, 0, 255);} |
matrix.show(); | matrix.show(); | ||
delay(10000); | delay(10000); | ||
Ligne 438: | Ligne 461: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:oneup.png?200}} | {{projets:oneup.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/oneup.ppm|One Up PPM]] | ||
++++ | ++++ | ||
- | One Up | | + | One Up Arduino| |
<code c> | <code c> | ||
Ligne 471: | Ligne 494: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:papilusion.png?200}} | {{projets:papilusion.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/Papilusion.ppm|Papilusion PPM]] | ||
++++ | ++++ | ||
- | Papilusion | | + | Papilusion Arduino| |
<code c> | <code c> | ||
Ligne 516: | Ligne 539: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:pokeball.png?200}} | {{projets:pokeball.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/pokeball.ppm|Pokeball PPM]] | ||
++++ | ++++ | ||
Pokeball | | Pokeball | | ||
Ligne 553: | Ligne 576: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:rayquaza.png?200}} | {{projets:rayquaza.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/Rayquaza.ppm|Rayquaza PPM]] | ||
++++ | ++++ | ||
Rayquaza | | Rayquaza | | ||
Ligne 596: | Ligne 619: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:salameche.png?200}} | {{projets:salameche.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/salameche.ppm|Salamèche PPM]] | ||
++++ | ++++ | ||
- | Salamèche A REFAIRE| | + | Salamèche Arduino| |
<code c> | <code c> | ||
Copy/Paste this part before your setup(): | Copy/Paste this part before your setup(): | ||
- | //Pixels salameche | + | // Pixels salameche : |
- | const uint16_t salameche0[] = {516, 523, 531, 538, 544, 545, 55, 62, 63, 89, 90, 91, 96, 100, 104, 105, 107, 108, 109, 112, 118, 119, 127, 176, 185, 197, 199, 204, 207, 212, 215, 219, 222, 227, 229, 234, 235, 237, 241, 246, 249, 254, 259, 260, 269, 272, 276, 279, 280, 289, 298, 306, 315, 320, 328, 336, 337, 346, 347, 356, 365, 373, 376, 381, 385, 390, 394, 397, 402, 405, 411, 413, 420, 451, 460, 468, 477, 486, 487}; | + | const uint16_t PROGMEM salameche0[] = {516, 523, 531, 538, 544, 545, 55, 62, 63, 89, 90, 91, 96, 100, 104, 105, 107, 108, 109, 112, 118, 119, 127, 176, 185, 197, 199, 204, 207, 212, 215, 219, 222, 227, 229, 234, 235, 237, 241, 246, 249, 254, 259, 260, 269, 272, 276, 279, 280, 289, 298, 306, 315, 320, 328, 336, 337, 346, 347, 356, 365, 373, 376, 381, 385, 390, 394, 397, 402, 405, 411, 413, 420, 451, 460, 468, 477, 486, 487}; |
- | const uint16_t salameche1[] = {512, 513, 514, 515, 520, 521, 522, 528, 529, 530, 536, 537, 98, 106, 113, 114, 115, 120, 121, 122, 123, 198, 205, 206, 213, 214, 220, 221, 228, 252, 256, 257, 258, 264, 265, 266, 267, 268, 273, 274, 275, 277, 278, 281, 282, 283, 284, 285, 286, 287, 290, 291, 292, 293, 294, 295, 299, 300, 301, 302, 307, 308, 309, 310, 316, 317, 318, 344, 345, 352, 353, 354, 355, 361, 362, 363, 364, 369, 370, 371, 372, 377, 378, 379, 380, 387, 452, 453, 454, 455, 461, 462, 463, 469, 470, 471, 478, 479}; | + | const uint16_t PROGMEM salameche1[] = {512, 513, 514, 515, 520, 521, 522, 528, 529, 530, 536, 537, 98, 106, 113, 114, 115, 120, 121, 122, 123, 198, 205, 206, 213, 214, 220, 221, 228, 252, 256, 257, 258, 264, 265, 266, 267, 268, 273, 274, 275, 277, 278, 281, 282, 283, 284, 285, 286, 287, 290, 291, 292, 293, 294, 295, 299, 300, 301, 302, 307, 308, 309, 310, 316, 317, 318, 344, 345, 352, 353, 354, 355, 361, 362, 363, 364, 369, 370, 371, 372, 377, 378, 379, 380, 387, 452, 453, 454, 455, 461, 462, 463, 469, 470, 471, 478, 479}; |
- | const uint16_t salameche2[] = {116, 117, 124, 125, 126, 236, 243, 244, 251, 261, 262, 263, 270, 271}; | + | const uint16_t PROGMEM salameche2[] = {116, 117, 124, 125, 126, 236, 243, 244, 251, 261, 262, 263, 270, 271}; |
- | const uint16_t salameche3[] = {242, 245, 250, 253, 386, 388, 389, 395, 396, 403, 404, 412}; | + | const uint16_t PROGMEM salameche3[] = {242, 245, 250, 253, 386, 388, 389, 395, 396, 403, 404, 412}; |
Copy/Paste this part in your loop(): | Copy/Paste this part in your loop(): | ||
- | //Draw salameche | + | // Draw salameche : |
- | for (int i = 0; i < 79; i++){matrix.setPixelColor(salameche0[i], 255, 255, 255);} | + | for (int i = 0; i < 79; i++){matrix.setPixelColor(pgm_read_word_near(&salameche0[i]), 255, 255, 255);} |
- | for (int i = 0; i < 98; i++){matrix.setPixelColor(salameche1[i], 255, 148, 0);} | + | for (int i = 0; i < 98; i++){matrix.setPixelColor(pgm_read_word_near(&salameche1[i]), 255, 148, 0);} |
- | for (int i = 0; i < 14; i++){matrix.setPixelColor(salameche2[i], 238, 245, 0);} | + | for (int i = 0; i < 14; i++){matrix.setPixelColor(pgm_read_word_near(&salameche2[i]), 238, 245, 0);} |
- | for (int i = 0; i < 12; i++){matrix.setPixelColor(salameche3[i], 255, 0, 0);} | + | for (int i = 0; i < 12; i++){matrix.setPixelColor(pgm_read_word_near(&salameche3[i]), 255, 0, 0);} |
matrix.show(); | matrix.show(); | ||
delay(10000); | delay(10000); | ||
Ligne 627: | Ligne 651: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:smile.png?200}} | {{projets:smile.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/smile.ppm|Smiley PPM]] (Siméon - Atelier Bidouille 2017) | ||
++++ | ++++ | ||
- | Smiley | | + | Smiley Arduino| |
<code c> | <code c> | ||
Ligne 664: | Ligne 688: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:titofortnite.png?200}} | {{projets:titofortnite.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/titofortnite.ppm|Tito Fortnite PPM]] (Tito - Atelier Bidouille 2017) | ||
++++ | ++++ | ||
- | Tito Fortnite | | + | Tito Fortnite Arduino | |
<code c> | <code c> | ||
Ligne 729: | Ligne 753: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:titopixel.png?200}} | {{projets:titopixel.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/titopixel.ppm|Tito Pixel PPM]] (Tito - Atelier Bidouille 2017) | ||
++++ | ++++ | ||
Tito Pixel | | Tito Pixel | | ||
Ligne 768: | Ligne 792: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:titopointer2.png?200}} | {{projets:titopointer2.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/titopointer2.ppm|Tito Pointer PPM]] (Tito - Atelier Bidouille 2017) | ||
++++ | ++++ | ||
Tito Pointer | | Tito Pointer | | ||
Ligne 795: | Ligne 819: | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | ---- | ||
{{projets:titosnapchat.png?200}} | {{projets:titosnapchat.png?200}} | ||
+ | [[http://poplab.maisonpop.fr/ressources/ppm/titosnapchat.ppm|Tito Snapchat PPM]] (Tito - Atelier Bidouille 2017) | ||
++++ | ++++ | ||
Tito Snapchat | | Tito Snapchat | | ||
Ligne 838: | Ligne 862: | ||
*On peut modifier le script python pour qu'il détecte combien de couleurs sont réellement utilisés et stocker ces données. Ensuite établir une correspondance entre les index de pixel et l'index de la couleur à attribuer. On manipulera plus de arrays, mais ils devraient être nettement moins volumineux que les précédents. | *On peut modifier le script python pour qu'il détecte combien de couleurs sont réellement utilisés et stocker ces données. Ensuite établir une correspondance entre les index de pixel et l'index de la couleur à attribuer. On manipulera plus de arrays, mais ils devraient être nettement moins volumineux que les précédents. | ||
*On peut essayer de reverse-engineer la manière dont l'outil qui convertit les bitmaps en hash fonctionne et utiliser une méthode similaire | *On peut essayer de reverse-engineer la manière dont l'outil qui convertit les bitmaps en hash fonctionne et utiliser une méthode similaire | ||
- | *Pour aller plus loin et rendre le code plus robuste | ||
- | *Lire l'en-tête et vérifier que l'on a bien 24x24, sinon renvoyer une erreur appropriée | ||
- | ==== Code Arduino ==== | ||
- | ++++ Déclaration de la matrice | | ||
- | <code c> | ||
- | Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(8, 8, 3, 3, PIN, | ||
- | NEO_TILE_BOTTOM + NEO_TILE_RIGHT + NEO_TILE_ROWS + NEO_TILE_PROGRESSIVE + | ||
- | NEO_MATRIX_BOTTOM + NEO_MATRIX_RIGHT + NEO_MATRIX_ROWS + NEO_MATRIX_PROGRESSIVE, | ||
- | NEO_GRB + NEO_KHZ800); | ||
- | </code> | ||
- | ++++ | ||