Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
USA
Asked — Edited

Ez-Bv4 And Camera With Surface Pro

I'd like to use the 160x120 resolution in my project running ARC (the latest version) for Windows on a Windows 10 Surface Pro 2 but I get the following error:

11/3/2018 11:37:43 AM - Error Camera.SetCaptureImage: AForge.Imaging.UnsupportedImageFormatException: Source pixel format is not supported by the filter.
at AForge.Imaging.Filters.BaseTransformationFilter.CheckSourceFormat(PixelFormat pixelFormat)
at AForge.Imaging.Filters.BaseTransformationFilter.Apply(BitmapData imageData)
at AForge.Imaging.Filters.BaseTransformationFilter.Apply(Bitmap image)
at EZ_B.Camera.eihiq5ToKN(Object )

It runs at 320x240 okay but uses a lot of CPU and the image tends to hang or stutter and falls behind when face tracking. Anyone else have issues with the surface pro? The exact same builder file works fine on my laptop (with Windows 7).
Thanks:)


ARC Pro

Upgrade to ARC Pro

Synthiam ARC Pro is a cool new tool that will help unleash your creativity with programming robots in just seconds!

PRO
Synthiam
#88  
That happens when the tcp connection to the ezb disconnects mid command. That’s usually from the WiFi disconnecting.

I created a program for you earlier in this thread that logged icmp. Have you identified the icmp stops responding OR gets very slow at the time of disconnect?

Post some logs
#89  
Hey DJ, I'll post the logs tomorrow. Are you still thinking interference? There were some pretty big spikes but I haven't time-correlated them.
It did finally disconnect today without the camera connected, just a few minutes shy of 12 hours, but I wasn't running the logger.
I think the next step is to use one of the loop commands.
PRO
Synthiam
#90  
Your next step should be hard wiring the ez-b with USB:D:D
#91  
@Dave , do you ever leave B9 running for a day or two? Does it ever disconnect unexpectedly? I guess I'm looking for more company, lol.

I used vertigo's wifi analyzer to look for a quiet place to to move iRobot to but I must have a pretty good router. It even reaches out to the detached metal garage! I don't think I could go without internet for more than one day. Is that bad? *blush*

I installed Richard's check camera loop. Now we wait.
#92  

Quote:

Your next step should be hard wiring the ez-b with USB Grin Grin


I know, I know. But tonight I hid around the corner and used speech synth to mess with my brother-in-law. It was hilarious! I'd love to have this ability at an art show opening reception. I'm not giving up yet.
#93  
@DJ someone mentioned using an Arduino USB cord for the hard wiring. I have a few laying around with some USB extenders. Will that work?
#95  
@Mac, I have left him running a full day with no disconnect. The only time i have gotten a disconnect (after I got my original issue worked through of old and outdated router and a weak signal) is when I send a improper command to a device through the Uart port or don't have the Uart port initiated before sending a command through it.
#96  
@Richard Thanks for the link. I've read through that article a few times but it seems incomplete so I have a couple of questions:
1. I understand the connections from the EZB to the serial adapter (pictured on the left?) but what happens after that? What are the two adapters on the right in the picture?
2. If I use a USB splitter in the single port on the Surface (one for the EZB and one for the camera), will the EZB and camera use the same Com address (Com 6 in the article)?

@Dave I'd forgotten that you use client mode. Right now I'm testing the Loop command to keep the camera awake (so far, so good) but after this I'll test client mode again, using my home internet/wifi router. That should be one way to eliminate interference, right? At least, wifi interference.
Have you ever used an online AI chatbot?
Belgium
#97  

Quote:

I understand the connections from the EZB to the serial adapter (pictured on the left?) but what happens after that? What are the two adapters on the right in the picture?


They are all different "FTDI" adapters that do the same thing. You only need one and you just plug it in a USB port, done.

Quote:

If I use a USB splitter in the single port on the Surface (one for the EZB and one for the camera), will the EZB and camera use the same Com address (Com 6 in the article)?



No. USB and com ports are very different things. The com port numbering is done in software and it doesnt matter how you plug the USB devices, directly or using a hub. And you wrote earlier about needing a powered hub elsewhere, I doubt thats really needed here.
#98  
Thanks vertigo. And the USB cable with the four female connectors on one end? I don't see that referred to in the article.
As always, thanks for your help, dude.:)
#99  

Quote:

@Mac, I have left him running a full day with no disconnect. The only time i have gotten a disconnect (after I got my original issue worked through of old and outdated router and a weak signal) is when I send a improper command to a device through the Uart port or don't have the Uart port initiated before sending a command through it.


@Dave And when it disconnects after an improper command, do you have to power cycle the EZB(s) before you can hook up again?
#100  
@mac, yes after I get disconnected because of anything not right with the command going through the Uart or the device on the other side I do have to power cycle to get the ezb to function again.

Sorry, I've never used an AI.
#101  
@Dave Yeah man, after giving it more thought, you would lose consistency in the voice. Unless we could convince your voice actor to voice a chatbot:D

So, the EZB disconnected again today, after almost exactly 12 hours; which seems to be the magic number of hours. The camera was still connected, or at I thought it was. But checking the debug showed the camera was disconnecting and reconnecting over an over, due to Richard's code. It would appear that the camera started this dance before the EZB disconnected.

Still waiting on the new hardware.
Belgium
#102  

Quote:

Thanks vertigo. And the USB cable with the four female connectors on one end? I don't see that referred to in the article.


Its all the same thing, just with a plastic enclosure and female pins on a wire rather than male pins on the PCB. All of these devices have a USB connector on one end (one that plugs in a PC or one that needs a USB cable), and 4/6 pins for serial on the other end.
#103  
Ah, okay vertigo, I get it now. Like three different "kits" in the picture. My new hardware shipped yesterday, yay! But your $10 cameras are out of stock or I would have grabbed a backup.
#105  
Lol, so there is.
Thanks for checking on the other warehouse.
#106  
UPDATE:

iRobot has been running for more than 40 hours now. I think I have it solved. Or, more accurately, DJ had it solved on page 1 of this thread:

Quote:

when you’re in a public place, the WiFi may cause interference with the camera.


If the shortest distance between two points is a straight line, I did the exact opposite. It's been quite a convoluted journey but I did learn a lot bout EZ-stuff along the way.

So, here it is: last night I took vertigo's wifi analyzer around the house (with my phone) looking for the weakest house/internet-wifi signal so as to reduce the amount of interference with the EZB. I couldn't find anywhere, upstairs nor down, that didn't have a decent signal. I thought "man, that TP-Link is a great router. I should get one for iRobot!" And then it dawned on me (finally). I should just use the home internet/wifi for hooking to the EZB in client mode. Voila, no interference because I'm using what was causing the interference. It hasn't missed a beat in almost two days. I most certainly underestimated just how much interference can be caused, and the effects.
Now, this does beg the question: when iRobot is in the show in January at NIU, will their wifi do the same thing? Even if they allow me to use their wifi, I know at my school, wireless devices are booted off after something like 20 minutes of inactivity. I'll talk the the IT folks at NIU and find out what the deal is.

Anyway, thanks everyone for all the suggestions and help. I'm thinking of eventually implementing a chatbot so I'm sure I'll have more questions. For now though, I have some final details to attend to before the show.
#107  
Okay, after running about 50 hours, I pulled the Surface and deleted the script box I had in Builder (since I wasn't running the loop script that was in there) and about 5 minutes later it disconnected with a comm error (rather than the usual camera error). This time I'm not going to touch it for a week and see what happens. It's going to be tough not touching it for that long. I'm a tinkerer. :D