 |
By: milamber (offline) on Sunday, August 22 2010 @ 08:53 PM PDT (Read 5580 times)
|
|
|
milamber |
| milamber |
|
I am looking to build a peggy2le setup for streaming Video data. This site has a lot of good information about building this but I am seeing that alot of it is older information.
For instance, Jay Clegg's way of doing it *link Snipped* with two Arduino's was because he wanted to develop a method that didn't involve modifying the peggy board.
Building off of Jay's setup Leonard Souza created a Flash -> Java -> TWI -> Peggy interface (*link Snipped*).
Since then the Peggy2le was developed that allowed direct access to the TX/RX pins. So the TWI method is not needed.
The things that Leonard is able to do, is what I would like to accomplish (*link Snipped*). Specifically the streaming of a movie file to the Peggy display.
As far as I can understand it, with the peggy2le, you should be able to have a program load a movie and process it and stream it over serial to the peggy.
Does anyone have ANY thing like this....or a link to something that can point me into the right direction??
I have looked in the Peggy2Serial.41.zip from *link Snipped*
I understand that there is a processing sketch for sending WEBCAM video but I haven't used proccessing before and I have looked on their forums and can't see any easy way of modifying it to use a movie instead.
Am I missing something really obvious???
PS. not being able to post links is really annoying. Hope people are able to follow.
|

Apprentice
Status: offline
Registered: 08/19/10 Posts: 7
|
|
|
|
|
 |
By: Windell (offline) on Sunday, August 22 2010 @ 11:22 PM PDT
|
|
|
Windell |
| Windell |
|
First off, very sorry about the spam filter. I wish that we had more fine-grain control over it. The vast majority of links that do get posted here are still spam, even with all the filters.
 As far as I can understand it, with the peggy2le, you should be able to have a program load a movie and process it and stream it over serial to the peggy.
Yes, that's correct. When you build the Peggy 2LE, pick the "serial hack" option, and then load onto it one of the "serial receive" sketches out there-- like the one in the Peggy2Serial.41.zip library.
Processing is a *really neat* programming environment. I'd urge you to give it a try-- several people who have never programmed before took to it like fish to water when I showed them. It's easy enough to open a movie file-- in certain formats -- and use it as a video source. Look at the built-in examples for how to open a movie file.
You can also use Jay Clegg's original code, like the quartz composer version (if you have a mac) to stream data. You can also use Leonard Souza's flash and/or Java code to stream data. In all of these cases, it's the program running on the computer that takes the data, downsamples it to size, scales the brightnesses and streams the data. You can look at these different code sets to see what the data format needs to be if you want to stream data from other sources as well.
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
|

Evil Scientist
 Status: offline
Registered: 06/15/06 Posts: 1932
Sunnyvale, CA
|
|
|
|
|
 |
By: milamber (offline) on Monday, August 23 2010 @ 11:47 PM PDT
|
|
|
milamber |
| milamber |
|
First off, I would love to give Quartz Composer a go but unfortunately I don't own a mac. I am using a windows machine. Pity, Composer seems to be the easiest way to get this to work.
Processing does look interesting but the capture system and the movie system are completely different. Looks like I will be attempting to learn a new language after all. *sigh*
As for the Flash/Java of Leonard Souza, it makes my head hurt looking at what I would need to setup, just to get his projects loaded....let alone the expertise to make it actually work.
Ok so off to program I go....this could take a while.
I don't suppose anyone has made something that does this and is willing to share???
If not, when/if i get this working I will return and let you guys know how I did.....wish me luck.
|

Apprentice
Status: offline
Registered: 08/19/10 Posts: 7
|
|
|
|
|
 |
By: Windell (offline) on Monday, August 23 2010 @ 11:53 PM PDT
|
|
|
Windell |
| Windell |
|
>I don't suppose anyone has made something that does this and is willing to share???
Well, you've kind of looked at four or five different solutions that are already worked out and decided that none of them are for you. Maybe you can say what you *would* find to be acceptable?
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
|

Evil Scientist
 Status: offline
Registered: 06/15/06 Posts: 1932
Sunnyvale, CA
|
|
|
|
|
 |
By: milamber (offline) on Friday, September 03 2010 @ 12:17 AM PDT
|
|
|
milamber |
| milamber |
|
Ok I have setup GSVideo and have adapted the Pixelate example to serve as the basis of Peggy down-scaling system.
It is now automatically scanning each frame and using brightness averaging to create a 25x25 monochrome image. I have it currently just displaying this image in a window. It seems to be doing quite nicely and it is even playing the sound in sync.
I don't have all my parts to put my peggy together yet. But once I do, I will start sending test serial data to it. If everything is working I will post my code up. Its still a bit messy in there (Many left over Pixelate commands commented out).
Is there anyone familiar with the MirrorPeggy code that is provided in the Peggy2Serial.zip?
PHP Formatted Code // Linear brightness:
br2 = int((brightTot + random(-4, 4)) / 8);
idx = (j)*cols + (i-ColLo);
GrayArray[idx] = (int) br2; //inverted image
br2 = br2*8;
fill(br2,br2,br2); // 8-level with true averaging
ellipse(xDisplay+1, yDisplay+1, cellSize2-1, cellSize2-1);
img2.pixels[idx] = br2; In the above example: "br2 = int((brightTot + random(-4, 4)) / 8);"
Why would they be adding a random number between -4 and 4?
Then "GrayArray[idx] = (int) br2; //inverted image" Why is this array here? I can't find anywhere where they get data out of it?
Apart from that I will be trying to use the renderToPeggy function unchanged.
Allowing the original RecvSerial.pde to be put on the Arduino.
|

Apprentice
Status: offline
Registered: 08/19/10 Posts: 7
|
|
|
|
|
 |
By: Windell (offline) on Friday, September 03 2010 @ 12:44 AM PDT
|
|
|
Windell |
| Windell |
|
>Is there anyone familiar with the MirrorPeggy code that is provided in the Peggy2Serial.zip?
Yes. 
>Why would they be adding a random number between -4 and 4?
See this comment about our original code, which didn't have that:
http://www.evilmadscientist.com/comment.php?mode=view&cid=4309
Also, try doing it without the random, and see how different it is.
>Why is this array here? I can't find anywhere where they get data out of it?
It's quite possible that it's redundant then.
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
|

Evil Scientist
 Status: offline
Registered: 06/15/06 Posts: 1932
Sunnyvale, CA
|
|
|
|
|
 |
By: milamber (offline) on Monday, April 04 2011 @ 06:15 PM PDT
|
|
|
milamber |
| milamber |
|
Long time since last post. Christmas, family and work have sucked time away from projects but now I am getting back into it. Windell if you think this should be a separate post just let me know.
I haven't made any progress with the processing code but as of the last writing I have it processing the video frames and rendering it on screen with the correct scaling and in monochrome. So I think that part is still ok.
Now I have started on my matrix. Currently I am building a test matrix as the full project is to make a large outdoor sign, still 25 x 25 but about 3' x 3' in size. The test matrix is 24 x 24 and consists of 9 commercial 8x8 matrix's. I have connected this all up on large breadboard (Many jumper wires!!) and I am putting the driving chips on the breadboard as well.
I have been trying to source as much of this from local suppliers as I can(I am in Australia). I have had alot of difficulty in finding parts so I will run through what I have.
2 x MBI5026 LED driver chips
2 x 74HC154 4-to-16 line decoder
25 x 2N5401 Transistor
25 x 100ohm Resistors
4 x 0.1uF Capacitor
2 x 5K Trimpot
24x24 matrix as mentioned above
I am fairly sure the MBI5026 are a direct replacement for the LED drivers the peggy use. The line decoders are the same so no problem. Originally I was working from the peggy 2.0 schematic that called for 2N5401 Transistor so thats what I ordered. I am still searching for a suitable replacement for the 1.5A rated 2STX2220. I will need them for the full 3' matrix(high brightness LEDs).
I am about half way through building the test system.
Does anyone see any issues with this so far?
I can get some S8550c Transistors cheaply, these are rated at 1.5A, could these be suitable replacements for the 2STX2220's?
Any help/advice/tips would be great appreciated and I will try and keep you up to date. Once I have it built and running I will be happy to share the code for movie scaling and rendering to the Peggy.(done on a windows XP laptop)
|

Apprentice
Status: offline
Registered: 08/19/10 Posts: 7
|
|
|
|
|
 |
By: Windell (offline) on Tuesday, April 05 2011 @ 02:18 AM PDT
|
|
|
Windell |
| Windell |
|
>Long time since last post.
Looks like a little less than two hours since your last post?
>I have been trying to source as much of this from local suppliers as I can(I am in Australia)
Our web store does ship to Australia-- just about every day --and the Peggy 2LE is specifically aimed at people doing off-board hacks. Also, it comes with all those parts. 
> 2N5401
Don't use these. Saturation voltage is too high, performance is significantly better with the 2STX2220.
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
|

Evil Scientist
 Status: offline
Registered: 06/15/06 Posts: 1932
Sunnyvale, CA
|
|
|
|
|
 |
By: milamber (offline) on Sunday, April 10 2011 @ 12:32 AM PDT
|
|
|
milamber |
| milamber |
|
I have looked on your store but I couldn't find a transistor pack. The only thing I found was the full Peggy kit that metioned them.
Is there another kit or product that contains the transistors?
|

Apprentice
Status: offline
Registered: 08/19/10 Posts: 7
|
|
|
|
|
 |
By: Windell (offline) on Sunday, April 10 2011 @ 12:32 PM PDT
|
|
|
Windell |
| Windell |
|
>I have looked on your store but I couldn't find a transistor pack.
It's not a standard product that we sell on its own.
A good substitute, though more expensive, is the STX790A-AP. Fairchild has several of good substitute transistors, ones with high current capacity and low saturation voltage, but not the same pinout as needed for the Peggy boards. If you're not using the Peggy itself, you could use some of those.
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
|

Evil Scientist
 Status: offline
Registered: 06/15/06 Posts: 1932
Sunnyvale, CA
|
|
|
|
|
 |
By: milamber (offline) on Monday, April 11 2011 @ 07:25 AM PDT
|
|
|
milamber |
| milamber |
|
I have ordered some transistors, now I just have to wait for them to get here.
As I said earlier, I have the above components connected on a breadboard for testing and it is now functioning with peggy2serial code. (Yes I will swap out the transistors as soon as I get the new ones)
For now I wanted to concentrate on getting the Processing code working. So I copied in the Render2peggy function. Made adjustments to the setup routine to start the serial connection. Added the variables needed to the start and Called the function within my draw loop.
Now I must say I didn't expect it to work. I was very surprised therefore when I saw the peggy respond and then start to display the video. This is still using GSvideo with an adapted pixelate example.
So I will be working on refining it. But now that I have proof that I can get it to work on windows I will definitely be building the 3' x 3' matrix. I see alot of soldering in my spare time over the next few weeks.
|

Apprentice
Status: offline
Registered: 08/19/10 Posts: 7
|
|
|
|
|