Update esp32camdemo-greyscale.ino

master
Alan 2021-07-06 15:51:04 +01:00 zatwierdzone przez GitHub
rodzic 44d5adc49b
commit b9efd5d7b6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 3 usunięć

Wyświetl plik

@ -411,15 +411,13 @@ client.write("<br>Greyscale data<br>");
if (!frame)
return false;
byte pixel;
// for each pixel in image
// only shows first 3 lines of image as otherwise there is an awful lot of data
// to show all data use the line: for (size_t i = 0; i < frame->len; i++) {
for (size_t i = 0; i < (160 * 3); i++) {
const uint16_t x = i % WIDTH; // x position in image
const uint16_t y = floor(i / WIDTH); // y position in image
pixel = frame->buf[i]; // pixel value
byte pixel = frame->buf[i]; // pixel value
// show data
if (x==0) client.println("<br>"); // new line