Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Interfacing / Re: Reading in user input over USB? on: June 16, 2009, 10:36:02 pm
It would take both a PC based language program and a uploaded Arduino program. The Arduino AVR processor chip's I/O pins cannot be controlled without some kind of uploaded program to read the serial communications commands, interpret them and perform the wanted functions.

Hm, alright. So would you do this, by like... having a switch() statement and interpreting the inputs like that? For example, if I have the Java send a capital A, the switch will read that and know that it needs to, say, raise the brightness from 0 to 255 on a certain light? I guess it would basically have to be some sort of way of wrapping the pinMode and digitalWrite functions. Does that sound at all right?


Wouldn't Firmata allow him to control the Arduino directly from JAVA?

I saw Firmata before but didn't really read into it. Looking at it now, something like sendDigitalPortPair(byte pin, int value) might be what I'm looking for..
2  Forum 2005-2010 (read only) / Interfacing / Re: Reading in user input over USB? on: June 16, 2009, 09:59:04 pm
Ahh, okay, I see. Thanks for the quick responses!

I've done a bunch of serial programming in Java before using a class I found somewhere (I'm a developer by trade, BTW) so I was thinking of using Java. Or maybe I'll take a look at Processing.

But... if I want everything that happens to be controlled by user input, then it seems like maybe I wouldn't even need to push any sketches to the Arduino..? Or maybe I'd need to write a simple sketch to just loop and wait for input?

Like, let's say I have a bunch of RGBLEDs attached to the Arduino, and I want to dynamically change their color based on user input. Couldn't all that be done through an outside language?
3  Forum 2005-2010 (read only) / Interfacing / Reading in user input over USB? on: June 16, 2009, 09:18:52 pm
Hey all. I've never worked with an Arduino or other MCU stuff before, but I've been reading a whole lot and I have an idea for a project. (Sorry if this post turns out a little tangential; my mind is racing right now.)

Basically, I'm wondering what it would take to read in a user's input. I was envisioning a program with a command prompt-like window open and a person could hit a key and the unit would respond immediately. Or maybe I have some sort of sequence loaded into a file, and then the program reads the file in and executes it on my keystroke.

I'm going to use the default IDE and everything like that. But I watched a basic video on the Arduino, and in it, they said that you push code to it, and after ten seconds it puts the code into effect. But if that's true, then how would you take input over USB? Do you use the Serial class? And is possible to build that sort of prompt in the Arduino language?

Is this sort of thing possible, or am I thinking too far ahead? Could I do this over the default USB interface built onto the board (I've got the new Duemilanove in mind) or would I have to add another USB adapter onto the RxTx and toss a keyboard on there?

Any help or ideas are much appreciated. Thanks~
4  Forum 2005-2010 (read only) / Exhibition / Re: 112 RGB LED Coffee Table on: February 23, 2010, 08:46:28 am
Hey Joe. First, that is awesome. Seriously well done.

Still a noob to this stuff, but I was wondering if you could talk a bit more about multiplexing the anode. I looked at your schematic but it's not fully clicking for me.
Pages: [1]