Touch with AnnexCam

If doesn't fit into any other category ....
AndyGadget
Posts: 86
Joined: Mon Feb 15, 2021 1:44 pm
Has thanked: 34 times
Been thanked: 62 times

Re: Touch with AnnexCam

Post 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.
User avatar
PeterN
Posts: 126
Joined: Mon Feb 08, 2021 7:56 pm
Location: Krefeld, Germany
Has thanked: 50 times
Been thanked: 65 times
Contact:

Re: Touch with AnnexCam

Post by PeterN »

good luck and have a nice weekend
AndyGadget
Posts: 86
Joined: Mon Feb 15, 2021 1:44 pm
Has thanked: 34 times
Been thanked: 62 times

Re: Touch with AnnexCam

Post by AndyGadget »

Likewise to yourself, Peter.

Off to a good start - I've got Annex sending images to FileZilla on my PC.
User avatar
Fernando Perez
Posts: 118
Joined: Mon Feb 15, 2021 10:09 pm
Location: Santander (Spain)
Has thanked: 62 times
Been thanked: 67 times

Re: Touch with AnnexCam

Post 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
Last edited by Fernando Perez on Sat Oct 02, 2021 8:18 pm, edited 1 time in total.
AndyGadget
Posts: 86
Joined: Mon Feb 15, 2021 1:44 pm
Has thanked: 34 times
Been thanked: 62 times

Re: Touch with AnnexCam

Post 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.
Post Reply