Did you ever get this worked out?
I cannot figure out how to add anything to the form data to go along with the image.
Seems like it would be common and simple, but I am not finding any information RE “client.write” to populate form fields or otherwise get data to the receiver php file.
you might be aware the TimerCam-F is not often specifically referenced in randomnerdtutorials. I try to adapt as far as possible the nice sample provided for the Typ F Cam. But even with simplest
example ‘capture.ino’ accessible at ‘https://github.com/m5stack/TimerCam-arduino/tree/master’
it fails for larger pic size configurations as denoted below. Could you probably give me a hint
how that might be addressed to be solved?
I would like to increase pix size of the picture as denoted below, but up on the size and higher resolution than:
FRAMESIZE_SVGA, // 800×600
the function ‘TimerCAM.Camera.get()’ gives any no response at all.
Remark: I have the latest TimerCam-arduino-master.zip 1.0.0 installed, but
I don’t have much experience with the right memory settings/management (that’s all taken by default in my case).
I expect the size FRAMESIZE_UXGA, // 1600×1200 should also work as max. resolution.
Many thanks for your help and answer in advance!
Minu
]]>Thank you so much, I had the same issue and tried to understand what was happening. This comment helped so much.
]]>I have the same problem. Has anyone here already found a solution?
]]>You save my life. Thank you a lot.
]]>Hello – I was able to add a section to the PHP to insert a tag in the image — here is a code clip (you need to have a font available to the script) —
// Check if $uploadOk is set to 0 by an error
if ($uploadOk == 0) {
echo “Sorry, your file was not uploaded.”;
// if everything is ok, try to upload file
}
else {
$jpg_image = imagecreatefromjpeg($filedata);
// Allocate A Color For The Text
$white = imagecolorallocate($jpg_image, 255, 255, 255);
$blue = imagecolorallocate($jpg_image, 0, 0, 255);
//$font_path = ‘http://your_web_host_url/fonts/DejaVuSans-Bold.ttf’;
$font_path = ‘/fonts/DejaVuSans-Bold.ttf’;
//$img_date = date(“m-d-Y H:i:s”);
$img_date = new DateTime(‘now’, new DateTimeZone(‘America/New_York’));
$imdt2 = $img_date->format(‘Y-m-d H:i:s’);
imagefilledrectangle($jpg_image, 0, 0, 285, 30, $white);
imagettftext($jpg_image, 16, 0, 10, 20, $blue, $font_path, $imdt2);
// imagejpeg($jpg_image); //– output to browser
imagejpeg($jpg_image,$target_file);
//if (move_uploaded_file($_FILES[“photo”][“tmp_name”], $target_file)) {
echo “The file “. basename($_FILES[“photo”][“name”]). ” has been uploaded.”;
// Clear Memory
imagedestroy($jpg_image);
}
Thank you for this code example. It works just great.
I have a question regarding the upload.php. There is this section which checks the submit- value:
// Check if image file is a actual image or fake image
if(isset($_POST[“submit”])) {
To me it looks that there is no such value in the sending part of the example, as none of the echoed values regarding image type are shown. So is this section totally unnecessary?
I also would like to know if there is any method to add a parameter to the sent post message, like the number or name of the sending camera (1, 2 etc.)
Thanks again and keep up the good work.
Petri
You could use a raspberry pi with a program called “motion” or MotionEye OS , with a minor mod to count detected Bee motion events. I use a pi 3b to watch my driveway. A PiZero would probably work.
]]>Hi.
Thanks for your suggestion.
Unfortuantely, I don’t have a sketch to detect motion based on video/pictures.
Regards,
Sara