Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:iot:examples:matrix [2021/03/05 00:31] heiko.pikneren:iot:examples:matrix [Unknown date] (current) – external edit (Unknown date) 127.0.0.1
Line 4: Line 4:
  
 Needed libraries: Needed libraries:
-<code>lib_deps = WEMOS Matrix Adafruit GFX@1.3, Adafruit GFX Library@1.7.2</code>+<code>lib_deps = WEMOS Matrix Adafruit GFX@1.3, Adafruit GFX Library@1.7.2, adafruit/Adafruit BusIO@^1.6.0</code>
  
 For learning how to use the IoT Matrix you can try out the example and tasks. For learning how to use the IoT Matrix you can try out the example and tasks.
Line 16: Line 16:
 #include <WEMOS_Matrix_GFX.h> #include <WEMOS_Matrix_GFX.h>
 #include <SPI.h> #include <SPI.h>
 +#include <Adafruit_I2CDevice.h>
  
 MLED matrix(7); //set intensity=7 (maximum) MLED matrix(7); //set intensity=7 (maximum)
Line 40: Line 41:
 {{:en:iot:examples:kastid1.png?200|}} {{:en:iot:examples:kastid2.png?200|}} {{:en:iot:examples:kastid1.png?200|}} {{:en:iot:examples:kastid2.png?200|}}
  
-Tic-Tac-Toe+Trips-traps-trull
  
 <code c> <code c>
Line 47: Line 48:
 #include <WEMOS_Matrix_GFX.h> #include <WEMOS_Matrix_GFX.h>
 #include <SPI.h> #include <SPI.h>
 +#include <Adafruit_I2CDevice.h>
  
 MLED matrix(7); MLED matrix(7);
Line 83: Line 85:
 {{:en:iot:examples:tripstraps.png?200|}} {{:en:iot:examples:tripstraps.png?200|}}
  
-Make everything covered one by one in a circular way+Ringiratast ekraani täitmine
  
 <code c> <code c>
Line 90: Line 92:
 #include <WEMOS_Matrix_GFX.h> #include <WEMOS_Matrix_GFX.h>
 #include <SPI.h> #include <SPI.h>
 +#include <Adafruit_I2CDevice.h>
  
 MLED matrix(7); MLED matrix(7);
Line 98: Line 101:
 } }
  
-int drawRight(int a, int b, int c) {+void drawRight(int a, int b, int c) {
   for (int i = c; i <= a+c; i++) {   for (int i = c; i <= a+c; i++) {
     matrix.drawRect(i,b,1,1, LED_ON);     matrix.drawRect(i,b,1,1, LED_ON);
Line 106: Line 109:
 } }
  
-int drawDown(int a, int b) {+void drawDown(int a, int b) {
   for (int i = b; i <= a; i++) {   for (int i = b; i <= a; i++) {
     matrix.drawRect(a,i,1,1, LED_ON);     matrix.drawRect(a,i,1,1, LED_ON);
Line 114: Line 117:
 } }
  
-int drawLeft(int a, int b) {+void drawLeft(int a, int b) {
   int e = 0;   int e = 0;
   for (int i = 0; i <= a; i++) {   for (int i = 0; i <= a; i++) {
Line 124: Line 127:
 } }
  
-int drawUp(int a, int b, int c) {+void drawUp(int a, int b, int c) {
   for (int i = 0; i <= a; i++) {   for (int i = 0; i <= a; i++) {
     matrix.drawRect(c,b-i,1,1, LED_ON);     matrix.drawRect(c,b-i,1,1, LED_ON);
en/iot/examples/matrix.1614904276.txt.gz · Last modified: 2021/03/05 10:00 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0