I have been messing with this idea today and I would like opinions before I spend any more time on it.
I have a remote vehicle with Arduino motor shield working 2 x motors and 8 x IR sensors managed by PIC18 interfaced with the Fez via Serial Port. I also have a WiFly module which allows remote serial data between my desktop application and the vehicle so I can see real-time feedback when the vehicle hits an obstacle.
Would it be possible to plug a Web Camera into the Fez Domino USB host and feed a Bitmap to the web server which the web server in turn serves to my page?
As a proof of concept I will hold the web page open (e.g. forever loading) in order to update the Bitmap.
Am I nuts?
What do you think?
Hi VIPX1, welcome to the forums
You’re not nuts, but it’s just not going to do what you want I’m afraid. All the web server stuff, outputting settings from sensors as content onto your webpage, should work fine (I do the same with info). But Domino has not very much memory so you’ll struggle to store a bitmap from the camera and you’ll struggle to buffer it out in a HTTP response, all without getting into memory problems. Your best solution would be a serial camera that outputs a jpeg because of it’s smaller size, but even then you’ll have to be real careful to manage your memory.
Nice One, Thanks Brett.
I’ll do that with the sensors for the experience.
Yep, sensors are a good way to start. Don’t let me put you off trying to get the graphics going though, you might be a gun coder and can work around those limitations (and we’ll all apreciate the sample code :))
I agree with Brett. Serving web pages with status info is no problem but streaming bitmaps can cause memory problems and won’t be very efficient. Remember that when you start the webserver you will end up having aprox. 30 KB of free RAM. In order to avoid memory problems you have to read a bitmap in chunks of, lets say 128 bytes, and send them to the client. Since this is done in managed code the delay will be noticable. Try it with a static image saved on a sd card for a start in order to see it for your self.
Also one advice for you. I have recently discovered this and it helped me in implementing a responsive and memory issue free webserver: