New Release 2.00.9

Here you'll find the updated available
Post Reply
User avatar
cicciocb
Site Admin
Posts: 3237
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 645 times
Been thanked: 2281 times
Contact:

Re: New Release 2.00.9

Post by cicciocb »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Mon May 19, 2025 8:05 am Hmm, the serial connection is missing with the more powerful power supply, but I'll try it today with an ESP32 without a camera.
I don't have the time right now, so thanks for that.
Obviously, I was referring to a USB hub with a stronger power supply, one that is externally powered.
I have one of these because most recent modules-especially those with LCDs-require a significant amount of power.
User avatar
karlkloss
Posts: 359
Joined: Fri Aug 18, 2023 12:21 pm
Location: Local group
Has thanked: 62 times
Been thanked: 86 times

Re: New Release 2.00.9

Post by karlkloss »

My typical setup at the moment is this one:

grafik.png

External (switching) regulators for 5V and 3.3V, with reverse voltage protection diodes.
The ESP32 module already contains internal diodes, so you can use either an external voltage, or USB to supply everything.
And as cicciob said, some displays need more power than the internal (linear) regulators can provide.
I also often add a varistor a the external supply input. Long supply lines have inductivity, that can cause overvoltage, and you never know how good or bad a mains power supply may behave.
You do not have the required permissions to view the files attached to this post.
These users thanked the author karlkloss for the post:
cicciocb
Rating: 3.85%
 
mynewesp36
Posts: 32
Joined: Sat Mar 08, 2025 4:01 pm
Location: germany/Achim near Bremen
Has thanked: 17 times
Been thanked: 12 times

Re: New Release 2.00.9

Post by mynewesp36 »

Hello community,

my first attempts with Annex are based on Francesco's recently published of the smallest possible program version using with ESP32-Cam, which photos can be sent by email as well as saved on a SD- card.
Based on this and with the help of many example files here in the forum, thanks to PeterN too, I have tried to create a small program extension, let me call it “Photo Trap”.

This program version can be triggered either by an external signal via interrupt, or by internal timer0. My intention with this program is to be able to operate a variety of applications, such as
----- Recordings at fixed time intervals for time-lapse videos, whereby the time intervals can be specified in advance in the program
----- Photos triggered by external sensors such as radar, IR or even light barriers

I tested the sending of emails and the simultaneous storage of these photos on an SD card with the internal timer, whereby a transmission takes place every minute. I have noticed that sometimes photos are not completely saved on the SD card, the error rate is about 5%.

Maybe someone knows this problem and has a solution.

I have not yet published a program text in this forum and will attempt to do so next.
mynewesp36
Posts: 32
Joined: Sat Mar 08, 2025 4:01 pm
Location: germany/Achim near Bremen
Has thanked: 17 times
Been thanked: 12 times

Re: New Release 2.00.9

Post by mynewesp36 »

Here the "Photo-Trap" program

Code: [Local Link Removed for Guests]

'Resolution of the image as per table below
'
'0 96 x 96
'1 160 x 120
'2 176 x 144
'3 192 x 128
'4 240 x 176
'5 240 x 240
'6 320 x 240
'7 400 x 296
'8 480 x 320
'9 640 x 480
'10 800 x 600
'11 1024 x 768
'12 1280 x 720
'13 1280 x 1024
'14 1600 x 1200

'
FRAMESIZE = 11


'minimalist example that takes a picture and send
'by email when the pin PIN_TO_USE is set to ground
' fastest picture storage is 10sec, given bei external Timersignal on GPIO 3
Pic_num_max = 8000 'chosen SD-Card capacity limit
Pic_num     = 1000 'Picture Start-Number
up_activ   = 0  ' for enabling interrupt 

''
wlog "============Prog-Start========================================"
'--------email_setup-start----------------------------------
m_konto$    = "my mail.de"
m_passwort$ = "password"
m_server$   = "securesmtp......de"
m_port      = 465          '465 für securesmtp required!!
m_to$       = "receiver.de"'
m_subject$  = "Attention" '+ date$ +  "  " + time$
m_text$ = "Sensors"
m_message$  = "ALARM " + DATE$ + " " + TIME$ + " "+ m_text$
wlog "email.setup"
EMAIL.SETUP m_server$, m_port, m_konto$, m_passwort$,1
'--------email_setup-end------------------------------------


'--------camsetup-start----------------------------------
' set the max resolution in terms of memory
print camera.setup(FRAMESIZE)
print camera.params("vflip", 0)
print camera.params("hmirror", 0)
pin(4)=1 'little flash in the white led
Pause 200
pin(4)=0

print camera.params("framesize", FRAMESIZE)
'--------camsetup-end------------------------------------

'-----Startnumber for picture-Index----------------
if file.exists("/pic_num.txt") then
  pic_num= val(file.read$("/pic_num.txt"))
  wlog time$; "This number was read from file /pic_num.txt : ";str$(pic_num)
else
  file.write "/pic_num.txt", str$(pic_num)            'first numbered picture  PIC_1000.JPG
endif
'------------------------------------------------
'Remark:
'delete file /pic_num.txt manually, if new counting shall begin at 1000
'--------------------------------------------------
PIN_TO_USE = 3 ' GPIO3 = RX0 pin
PIN_LED = 4

'Interrupt PIN_TO_USE, take_picture, 2   'external trigger when pin goes to 0
gosub take_picture

Timer0  60000, take_picture    'internal trigger, all 1 minute

wait
END


'-------------------------------------------------------------
take_picture:
wlog "--------------------------"
WLOG TIME$ , "TAKE_PICTURE_START"
pin(RED_LED)=0
If up_activ = 0 then    ' after first interrupt..... 
  up_activ = 1          '.... disable false interrupt in case of bouncing 
  if pic_num < pic_num_max then   'until selected SD-capacity limit
    pic_num = pic_num + 1
    foto$="/images/PIC_"+STR$(Pic_num)+".JPG"
    
    
    '############## SAVE FOTO ##############################
    WLOG time$,"--- camera.picture(";foto$;") start"
    if ( camera.picture(foto$)  = 1) then '##### save pictures #####
      WLOG time$,"FOTO SAVED"
    else
      WLOG time$,"FOTO NOT SAVED! so once more ... "
      wlog camera.picture(foto$)
    ENDIF
    WLOG time$,"--- camera.picture(";foto$;") end"
    
    '##############  SAVE PIC_NUM  ##############################
    file.write "/pic_num.txt", STR$(pic_num) 'save last used pic_num
    wlog time$, "This number was saved in file /pic_num.txt  ";STR$(pic_num)
        
    r=ping(" ") 'Clean up IP stack
    pause 200
    
    '############## Transmitting eMail with Foto ##############################
    WLOG time$,"--- Start EMAIL transmitting"
    if ( email(m_konto$, m_to$, "Foto at "+time$,"new Image "+foto$, foto$) = 1) then
      wlog time$,"email sent OK"
    else
      wlog time$,"email sent OK. Once more ..."
      wlog email(m_konto$, m_to$, "Foto at "+time$,"new Image "+foto$, foto$)
    endif
    WLOG time$,"--- EMAIL transmitting finished"
    
    up_activ = 0  'enable further interrupts
  endif'
else
  wlog "take_picture its still running !!!!!!!"
endif
WLOG TIME$ , "TAKE_PICTURE_END"
wlog "--------------------------"
wlog " "

RETURN
These users thanked the author mynewesp36 for the post (total 6):
cicciocb, lyizb, videobelu, BeanieBots, PeterN, RonS
Rating: 23.08%
 
ville56
Posts: 4
Joined: Fri May 23, 2025 8:10 pm

Re: New Release 2.00.9

Post by ville56 »

deleted ....
User avatar
PeterN
Posts: 805
Joined: Mon Feb 08, 2021 7:56 pm
Location: Krefeld, Germany
Has thanked: 387 times
Been thanked: 447 times
Contact:

Re: New Release 2.00.9

Post by PeterN »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Sat May 24, 2025 2:49 pm
I tested the sending of emails and the simultaneous storage of these photos on an SD card with the internal timer, whereby a transmission takes place every minute. I have noticed that sometimes photos are not completely saved on the SD card, the error rate is about 5%.

Maybe someone knows this problem and has a solution.
There is a good solution for that issue now by means of AnnexCam 2.00.93
[Local Link Removed for Guests]
Post Reply