Since no one seems able to answer this question on sqt or otherwise for the last few hours ill make a thread...

since no one seems able to answer this question on sqt or otherwise for the last few hours ill make a thread. What do I need to do to get an image from a microcontroller (arduino suite) to the cloud? I need my internet of stings super powered. thanks in advance retards

Attached: esp32cam.jpg (225x225, 7K)

Other urls found in this thread:

youtube.com/watch?v=LBoM_Uoq_nA
randomnerdtutorials.com/esp32-cam-pir-motion-detector-photo-capture/
github.com/espressif/arduino-esp32/blob/51a4432ca8e71be202358ceb068f3047bb8ad762/libraries/HTTPClient/src/HTTPClient.h
php.net/manual/en/features.file-upload.php
randomnerdtutorials.com/display-images-esp32-esp8266-web-server/
twitter.com/SFWRedditVideos

>thanks in advance retards
Yes this is a board for retards, but I was willing to help you, until I seen that, idiot.
1. what microcontroller
2. what camera
3. there are libraries for almost everything arduino that are idiot proof
4. use sd + ftp server? esp8266 might not be powerful enough for that
go to /diy/ if they'll tolerate your awful attitude and you seem both underage and clueless. Make your homeworks or your own or drop out and sign up for something like white people's history major.

is this stackoverflow you fuck. this is a personal project. I have just come to my wits end of searching you pajeet.

anyway, its an ov2460 camera on an esp32. from what I understand there is not much difference between esp32 and esp8266.. so yeah.. toss me a downvote i guess bro

>white people's history major
yeah you'll stop laughing when this unironically becomes reality

do you really expect an answer that won't brick your chink board after insulting me AFTER I posted what you have to do?

>guys help me
>btw i'm an asshole
yeah fuck right off

I've never used esp mcus but I hear they have good library support. so, first thing: how do you connect to the internet? wifi-AP? did you manage to get an IP or even TCP/IP working? if yes: are there any HTTP libraries available for your esp? if yes: rent a virtual machine, configure apache and write a php-script that accepts images via HTTP-Post. you'll be able to fill in the blanks by then.

oh wow an asshole on Jow Forums. asshole is the currency for exchange on this board.

I can get the picture to an sd card but I dont know nothing about ftp or if that is even the ideal solution. I just want to do like this spanish fellow youtube.com/watch?v=LBoM_Uoq_nA except with an upload thing

Attached: 1566005729736.jpg (880x916, 201K)

alright thanks.
I have no interest in php but if thats what I have to do I will do it..

well, you have two choices:
>1 save data locally
>2 push data to somewhere else

for 1, you're probably too limited on space for images, so you'll have to use an sd-card like others said. so you're down to manually getting your images from your device every now and then. how to copy them from sd to somewhere else is hopefully not something you need to ask, or should ask on this website.

for 2, pushing images to a server naturally requires a server to accept these images. you could use any protocol, the easiest would be HTTP or FTP as both are probably available on esp-mcus. for FTP you need to setup a server and username/password, no scripting on the server side. however FTP is plaint-text data, so if your images are supposed to be private, better use HTTP-over-SSL aka HTTPS. for that you could use existing services like imgur.com, again not a good choice for private or even incriminating data/images. so you'll to run a script somewhere (server or your wifi-AP) that accepts the images from the device and saves them, preferably via HTTPS as this should be available on your esp and is the easiest to setup on server side. if you dont like php, theres a million of alternatives to server-side scripting.

do you know anything about spiffs or encoding an image as base64 and then transfering it. Im not worried about speed so much. but I would like to just see an image pop up on a website hosted in the cloud. thanks for the reply big brain friend

Attached: 1566019707388.jpg (223x226, 10K)

yes i do know something about that, but you will need to be a little more specific.
for general advice, try (though I myself would never recommend or watch video-tutorials, except maybe for cooking)

randomnerdtutorials.com/esp32-cam-pir-motion-detector-photo-capture/

yeah I have talked with Rui he is a cool man. although he is on vacation for 2 weeks and he doesnt know how to do what I am trying to do or if its even possible with the little amount of ram on the esp32. So i came here for help

well, if thats your starting point (you got the setup from the tutorial working, lets call it sd-card-project), it shouldn't be too hard. your mcu can do tcp/ip and has some form of http-library aswell it seems. google finds i.e. this:
github.com/espressif/arduino-esp32/blob/51a4432ca8e71be202358ceb068f3047bb8ad762/libraries/HTTPClient/src/HTTPClient.h

so a rough list:
- set up an apache server with php on your PC (using i.e. xampp for windows)
- learn a bit of php and modify this script to your needs php.net/manual/en/features.file-upload.php
- set up a wifi-AP if you dont have one (use WPA2 with password)
- connect your PC to this wifi-AP (so it gets a local IP in the same network as your esp32 later)
- disable firewalls
- find a esp32 tutorial on connecting to wifi-APs
- integrate wifi-connection code into startup-code of the sd-card-project
- find and read the manual regarding the HTTPClient library for esp32
- modify the "save to sd-card" function, so it uses the HTTPClient with a "POST"-request instead of writing to sd-card
- once everything works you could move your "server-script" to an actual server with a routable internet-IP so your PC doesnt need to be in the same network as your esp32 anymore

I would like to use it as a programming club project at my college. problem is that sounds very difficult to set up on school computers and such. So it may work for my personal hobby it wont work for a demonstration of IoT data and the cloud for school... Why doesnt microsoft azure or amazon web services offer some sort of integration with IoT devices like the esp32?

> problem is that sounds very difficult to set up on school computers and such.
why?
need a "cloud-server" for demonstration or development? raspberry pi's are very cheap and their performance as "server" is acceptable as long as you dont have >500 clients. (of course as a wifi-AP, you cant connect 500 wifi-clients to a raspberry, or any other singular device)

we get azure IoT hub for free through the school. I thought that would be more practical example. I have done RPi demos in the past and got paid for them through the school. I will try today to get my project going today. I have done all the stuff to get an AP set up and posting is an issue as Rui seems to want to use spiffs and that requires an encoded image in base64... all of that is explained here. randomnerdtutorials.com/display-images-esp32-esp8266-web-server/

thanks for your input btw

>randomnerdtutorials.com/display-images-esp32-esp8266-web-server/
well that tutorial does something different: it doesnt upload the images to any server, it IS the server. so you would have to enter the esp32's IP in your browser and get the images. but thats not what you wanted to do right?

because in your case, you do not necessarily need the SPI FS. you would upload directly to an external webserver. you would only need to use the SPI FS as a buffer, in case you need to take more images than you can upload.
also I believe that if the wifi signal is not too bad, HTTP-Uploads will even be faster then writing to SPI FS, so you dont need SPI FS at all. just upload directly to the server.

PS: you *probably* still need to encode your image to base64. I imagine that in your code you have your imagedata as "(unsigned) char *", and esp32 surely has some library support to convert this into a base64-encoded version.

PPS: I'm doing firmware for embedded devices, take from this what you will.

Any commercial IoT-platform (microsoft, amazon or whatever) is a scam. Using these will not make your life easier, it will lock you into their platform and their approved devices. Everything they offer can be re-implemented within a short time for any microcontroller, minus the vendor lock-in. And the benefits of using them? Very little. Compared to a lot of work to get everything set up and working if it's your first project. A lot of reading tutorials to do. For what? Your next project, if there is one, might not be supported by microsoft. Do the same thing again for amazon? And then again?

>I imagine that in your code you have your imagedata as "(unsigned) char *"

I will look at the code now. but this is what im working with as far as saving the image. it may be too high level.. idk how to get the char data associated with an image. im pretty dumb

like i said ive just done demos with rpi this is my first real venture into the microcontroller world and C programming etc.

this stackoverflow comment is getting too long we need to take our convo elsewhere ;) my email is [email protected] that is if you want.

>idk how to get the char data associated with an image.
the char data IS the image. every byte of it. the format (PNG, BMP, JPG?) should be mentioned in one of the tutorials you used. but you dont need to do anything with these data, except pass them (or the pointer that is your "unsigned char*") to a function that converts it to base64. and the result then needs to be passed to the HTTPClient-Upload function.

once this data is saved into a file with correct the file-extension, the web-browser will interpret this data as image and display it. so the "association" is done by the client program.

>advance retards
>insulting the people that are supposed to help you
I'm sure that will work out for you

you cant be serious. you didnt read. we already had these comments

see
and
;)

Attached: brainlets.jpg (300x168, 11K)

Ok