const byte width=10, height=10; byte bitmapArray[width][height]; byte xCnt=0, yCnt=0; byte startX, startY, endX, endY; void setup() { Serial.begin(115200); clearBitmap(); } void loop() { for(startY=0; startY fabs(x2 - x1)); float tempVal=0; if(steep) { tempVal = x1; x1 = y1; y1 = tempVal; tempVal = x2; x2 = y2; x2 = tempVal; } if(x1 > x2) { tempVal = x1; x1 = x2; x2 = tempVal; tempVal = y1; y1 = y2; y2 = tempVal; } const float dx = x2 - x1; const float dy = fabs(y2 - y1); float error = dx / 2.0f; const int ystep = (y1 < y2) ? 1 : -1; int y = (int)y1; const int maxX = (int)x2; for(int x=(int)x1; x=0 && x=0 && y