Hello,
I want to “print” the gray scale magnitude for pixel (7,9) to the serial terminal. The line “gs=—” returns a syntax error.
My code below does not work.
import sensor, image, time
sensor.reset() # Reset and initialize the sensor.
sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to GRAYSCALE.
sensor.set_framesize(sensor.VGA) # Set frame size to QVGA (640x480)
sensor.skip_frames(time = 2000) # Wait for settings take effect.
img = sensor.snapshot() # Take a picture and return the image.
gs = in img.(image.get_pixel(7,9)) # Read pixel value of returned image.
print(gs) # print pixel value to the serial terminal