|
大家好目前在做陣列的研究,遇到了一些麻煩,在關於陣列要編譯時,沒辦法編譯,想請問大家那裡有問題 謝謝
#include <Wire.h>
#include <Adafruit_AMG88xx.h>
Adafruit_AMG88xx amg;
float pixels[AMG88xx_PIXEL_ARRAY_SIZE];
float pixels[8][8];
void setup()
{
Serial.begin(115200);
bool status;
status = amg.begin();
if (!status) {}
delay(100);
}
void loop()
{
amg.readPixels(pixels);
for (int i=1; i<=AMG88xx_PIXEL_ARRAY_SIZE; i++)
{
Serial.print('C');
Serial.print(pixels[i-1]);
while (Serial.available()<=0) {}
Serial.read();
}
amg.readPixels(&pixels[0][0]);
//第一列
Serial.print("ab");
Serial.print(abs(pixels[0][0] - pixels[0][0])); Serial.print("ab");
Serial.print(abs(pixels[0][0] - pixels[0][1])/sqrt(2),2); Serial.print("ab");
Serial.print(abs(pixels[0][0] - pixels[0][1])); Serial.print("ab");
Serial.print(abs(pixels[0][0] - pixels[1][1])/sqrt(2),2); Serial.print("ab");
Serial.print(abs(pixels[0][0] - pixels[1][0])); Serial.print("ab");
Serial.print(abs(pixels[0][0] - pixels[1][0])/sqrt(2),2); Serial.print("ab");
Serial.print(abs(pixels[0][0] - pixels[0][0])); Serial.print("ab");
Serial.print(abs(pixels[0][0] - pixels[0][0])/sqrt(2),2); Serial.print("ab");
Serial.print(abs(pixels[0][0] - pixels[0][0]));
for (int i = 0; i < 1; i++) {
for (int j = 1; j < 7; j++) {
Serial.print("ab");
Serial.print(abs(pixels[i][j] - pixels[i][j])); Serial.print("ab");
Serial.print(abs(pixels[i][j] - pixels[i][j+1])/sqrt(2),2); Serial.print("ab");
Serial.print(abs(pixels[i][j] - pixels[i][j+1])); Serial.print("ab");
Serial.print(abs(pixels[i][j] - pixels[i+1][j+1])/sqrt(2),2); Serial.print("ab");
Serial.print(abs(pixels[i][j] - pixels[i+1][j])); Serial.print("ab");
Serial.print(abs(pixels[i][j] - pixels[i+1][j-1])/sqrt(2),2); Serial.print("ab");
Serial.print(abs(pixels[i][j] - pixels[i][j-1])); Serial.print("ab");
Serial.print(abs(pixels[i][j] - pixels[i][j-1])/sqrt(2),2); Serial.print("ab");
Serial.print(abs(pixels[i][j] - pixels[i][j]));
}
}
Serial.print("ab");
Serial.print(abs(pixels[0][7] - pixels[0][7])); Serial.print("ab");
Serial.print(abs(pixels[0][7] - pixels[0][7])/sqrt(2),2); Serial.print("ab");
Serial.print(abs(pixels[0][7] - pixels[0][7])); Serial.print("ab");
Serial.print(abs(pixels[0][7] - pixels[1][7])/sqrt(2),2); Serial.print("ab");
Serial.print(abs(pixels[0][7] - pixels[1][6])); Serial.print("ab");
Serial.print(abs(pixels[0][7] - pixels[0][7])/sqrt(2),2); Serial.print("ab");
Serial.print(abs(pixels[0][7] - pixels[0][6])); Serial.print("ab");
Serial.print(abs(pixels[0][7] - pixels[0][6])/sqrt(2),2); Serial.print("ab");
Serial.print(abs(pixels[0][7] - pixels[0][7]));
} |
|