Need help Sending jpeg/bytes to the Webserver with Linksprite serial ttl camera

Have you ever found a way to do this? I’m also very interested in this, but so far can’t find much helpful information on it.

So far I think this camera and library would be the best way to go about it since it has a nice up to date library for creating small or large images.

https://www.4dsystems.com.au/product/uCAM_III/

I did find a few ways to upload images from an SD card that worked so all we need to do have this camera save the pictures to an SD card and then push that image file to an FTP server using the code we already have.

You should buy the camera and do some testing for us :slight_smile:

Also, 4D Systems has a good forum with product engineers on there to help with questions or issues should they come up which is always a good thing.

I just ordered one of those, so I will be able to do some testing soon hopefully :slight_smile:

In addition, I will use an 8GB SanDisk MicroSD for it.

1 Like

Sweet!

I had it on my list of things I would like to try to get working.

They have good forum support so that should help us get this working quickly.

You can start asking them questions now about how to best interface with the Electron if you want.

Got the camera now, and tests are going to commence shortly :stuck_out_tongue_closed_eyes:

That was quick :speedboat:

Do you have an idea of how you’re going to try to attack this? Saving images to a memory card first? Then uploading?

I think that makes the most sense yet.

(1) Take a single picture
(2) Possibly downsize it (the lowest resolution that is still visible, for reduction of data upload time)
(3) Store it on the memory card
(4) Upload the data from the memory card to a server

Pictures will be taken at pre-set times (probably 1 in the morning, and 1 in the afternoon)

I have @rickkas7 FTP server code that works so all you will need to do write code that knows which file name to upload to the FTP server.

Uploading a file to a FTP server is easy with his library.

Focus on steps 1,2,3 and then we can start on the FTP stuff.

@rickkas7 Do you have any special ways you would work with this camera that would be different than needing an SD card attached? Like saving low res images in memory without the need for an SD card? Not sure if the memory is there to do that but figured I would ask.

Just quickly looking through the work that people did previously, there do seem to be a few projects that involve the uCAM III and Arduino-based hardware. I’m going to dig more into this tomorrow and collect as much information as I can…

1 Like

I looked around a bit this morning, and came across some interesting links, such as this, this and this

Note that all use-cases I found so far involve an Arduino, so some porting may be needed (which I don’t exactly know how to). Also, they seem to use uCAM II instead, but there should be backward compatibility for the code anyway.

To start off with, I’m fine with relying on RAW imagery, which goes up to 128x128 and should only be around 16kb in size (I assume the Electron has sufficient SRAM to not require an SD card for this?). It’s a bit small, but for my use case even a very limited level of detail is fine, and cutting out the SD card of the project makes things a bit more straightforward now.

So right now, I have my Electron, microUSB, uCAM III and a 5V Step-up. Not sure yet how I will approach this; I’ve seen a few examples of snapping pictures and visualizing it on-screen, but it either involved their 4Duino 24 or programming cable, neither which are going to be of use in my use-case. My plan now is to first find a working piece of code for the Particle Electron, so that it can take pictures at all.

So first question, what makes Arduino and Particle code different? I know that the pins and includes are different (as the platforms pre-support different files) and I read somewhere that int size differs between Arduino and the STM32…anything else? With working Arduino code such as in one of the links above, what would be the main challenges to port it be?

Why are you trying to use uCam 2 libraries with the uCam 3 camera?

I was able to use the 4D Systems LCD display library with the Photon without any real changes which was nice.

Have you tried to load the uCam 3 library into the Particle Desktop IDE to see if it loads or what errors it throws?

You should be able to use one of their example programs to get running with the uCam 3 specifically.

Which library did you use? Could you link it?

I don’t have an LCD module right to display it on. Did you manage to get your data visualized on a PC?

I’m using their LCD displays along with their latest library on Github.

I have not tried to use this uCam 3 camera so it’s all new to both of us.

Actually, I can’t find a dedicated Arduino library for this camera either :confused: Could have sworn it existed, no idea why they wouldn’t provide one.

I came across this but it will not help you much: https://www.4dmakers.net/projects/details/ucam-iii-demo

Looking at your 3 links I think they may be the best option for now.

I would start with this library https://github.com/9circuits/uCam/blob/master/README.md and trying to get the picture data pumping out through the serial port first and then we can ask for help on how to push this serial data into a file that can be uploaded.

Post any errors you get when trying to compile this library and let us see if we can work through it and get this simple example working.

This person tried to do something similarly (but with the Spark Core). Would be interested to hear how things went for him. He doesn’t seem to be so active anymore on this forum, but could touch base with him to see what progress he made with that same library.

I would get the library working so it’s spitting out picture data over serial.

We have an FTP upload library that works, we just need to get the picture data into a file that the FTP library can choose to upload. People smarter than us on here can probably help out with that.

@Vitesze still active, just lurking! I ended up abandoning that project shortly after that post, never got the transfer working :frowning:

Ah I see! Unfortunate to hear it didn’t quite work out, any particular issues that were hard to overcome? Do you think things would be easier with the uCAM III (I assume you used the original uCAM?)

Any luck with that library?

Will start working on it the coming week! :wink:

I'm not sure what to do with the GM862 include in UCAM529.h. It's some cellular module, and I assume it's meant to control the uCam remotely (or something like it). At the beginning of both the .h and .cpp files the following line is called:

UCAM529(HardwareSerial *camPort, GM862 *dataDevice, byte onOffPin, byte quality);

and further, in the .cpp file dataDevice is called a couple of times. Rest of the code has several compile errors as well, e.g.

Serial2.print(_INITIAL[i], BYTE);

generates ''BYTE was not declared in this scope

However, since it is explicitly stated the uCAM III has backward compatibility with the uCAM II, I'm also trying this code now, which seems more straight to the point and easier to understand/work with.

EDIT: This second code creates an error when including SoftwareSerial.h. When I remove it, and the related commands (just 1 or 2 throughout the code) it compiles fine in the IDE. Not sure what to do here? A lot of the commands in .cpp seem to depend on it though.