Here is the project with which I'd like to generate simple line-graphics video with an Arduino and Processing code:
At the battleship New Jersey museum ship, we'd like to create an interactive radar display. The graphics should be fairly simplistic: One color (green), a rotating vector, and some 'return' behind it.
At some point we'd like to have a 'bogey' appear on the radar - the ship is being attacked!
This can be a simple closed circle - color isn't critical. The bogey will move towards the center of the radar display.
A joystick control (original equipment) will be operated by a visitor to move a circle (cursor) over the bogey to mark it as a target for missile defense.
My main concern now is:
How to get the Processing-created graphics over to a standard 17" LCD monitor?
Would this require a VGA interface? Is it too much for an Arduino?
Robin2:
If the PC can connect to the Monitor I can't see any problem displaying the image on it. The monitor and the PC need to have compatible interfaces.
Most of the hard work will take place in Processing. Any Arduino should be well able to read a joystick and send the data to the PC.
...R
.
Big "Ah-ha" Moment! The Processing code runs on a PC - not on the Arduino. The arduino is there Just to send over joystick and button data. So - would a Raspberry Pi be suitable for BOTH hardware inputs AND running Processing? Or is a "real" PC needed to create the video?
A Pi should be sufficient for your project. The bottleneck is the graphical display code for the continuously moving radar beam. Start simple, with a beam without afterglow, and fade out only the target. Then add more effects until you hit time limits - what hopefully won't happen.
So it sounds like you're basically making a computer game ...er simulation, yeah that's it.
I know there have been a lot of game development discussions in the past on the Pi forums. That might be a great place to start.
Since the display you describe is fairly simplistic, the Raspberry Pi SHOULD be able to handle it. I don't think the Pi has analog inputs, so you would probably have to add some custom, incompatible joystick interface. The Pi has USB so you could use the HID Joystick interface. You could even use a gamer joystick during development. When you want to hook up your "original equipment" joystick, you could use a Leonardo or (my favorite) a Teensy. The Teensy can be programmed using the Arduino IDE (with something called Teesyduino), has a joystick module that is pretty easy to configure, and includes buttons.
The Pi has a HDMI out, so it would probably be easiest to hook up to a LCD with a HDMI input (pretty common).
The Pi should be able to display your graphics, but if Processing lags too much, you may have to move to C/openGL. I haven't used Processing much, so I'm just assuming it would be slower because of Java. The controlling factor will also depend on what you call "return" (on how much detail is on the screen), and how much you want to simulate an old radar screen (old phosphor screens faded as the vector rotated).
Thanks to all for the great info. Regarding Procesing being Java-based, I may take a longer look at openFoundation. It is a c++ based alternative to Processing - but is a bit tricky to get onto a Pi. May just get PC and do the joystick/buttons via Arduino.