Page 2 of 2

Re: Touch with AnnexCam

Posted: Sat Oct 02, 2021 3:08 pm
by AndyGadget
Thanks for the offer Peter but I'll be doing this from scratch and transferring images to a local server with FTP.
Another area of Annex I haven't explored before.

Re: Touch with AnnexCam

Posted: Sat Oct 02, 2021 3:11 pm
by PeterN
good luck and have a nice weekend

Re: Touch with AnnexCam

Posted: Sat Oct 02, 2021 3:35 pm
by AndyGadget
Likewise to yourself, Peter.

Off to a good start - I've got Annex sending images to FileZilla on my PC.

Re: Touch with AnnexCam

Posted: Sat Oct 02, 2021 8:06 pm
by Fernando Perez
Andy, why not try this program from Cicciocb's help on how to use a TFT screen connected to an ESP32 to receive the image from your ESP32CAM?

Code: [Local Link Removed for Guests]

timer0 1000, count
tft.init 1
tft.fill tft.color(red)
tft.brightness 255
a$= ""
c = 0 : z = 0
while 1
  'Read from the camera using the given login:password
  a$ = tft.camera$("http://mylogin:mypassword@192.168.1.101/picture")
  'Check inside the answer is a face has been detected / recognised
  p = instr(a$, "Detected:")
  if  p <> 0 then
    d$ = mid$(a$, p + 9)
    x1 = val(word$(d$, 1, ",")) : y1 = val(word$(d$, 2, ","))
    x2 = val(word$(d$, 3, ",")) : y2 = val(word$(d$, 4, ","))
    r = instr(a$, "Recognition:")
    if r = 0 then
      tft.rect x1, y1, x2-x1, y2-y1, 65504 '(yellow)
    else
      if instr(d$, "No Match") <> 0 then
        tft.rect x1, y1, x2-x1, y2-y1, 63488 '(red)
      else
        tft.rect x1, y1, x2-x1, y2-y1, 2016 '(green)
      end if
    end if
  end if
wend
end

count:
  wlog "frames / sec ", z-c, ramfree
  c = z
return
Logically, you must change the IP 192.168.1.101 for the IP of your camera.
Reduced to the minimum, it would be:

Code: [Local Link Removed for Guests]

tft.init 1
while 1
  a$ = tft.camera$("http://mylogin:mypassword@192.168.1.101/picture")
  ' wlog a$
wend

Re: Touch with AnnexCam

Posted: Sat Oct 02, 2021 8:15 pm
by AndyGadget
Thanks Fernando.
I wrote my own version of that idea when I first connected up the ESP32-CAM and considered controlling it via a separate ESP32 with a screen but have decided to go the web interface route rather than add an additional device into the mix.