From PC Console programming to Arduino Programming.

From PC Console programming to Arduino Programming. Also known as just about the silliest thing you can do with an Arduino: Exactly the same thing you would do on a PC console/terminal.

We're gonna play the Randomized Number Guessing Game!

Anyways, just recently, I got my first Arduino! I've been wanting one or at least reading about Arduino for a couple years now. I'm a college student living with my parents. I finally got a job so that I can be not broke. Anyways, I still haven't gotten my first paycheck, but I had some Amazon "Gift Points" I got from selling off one of my textbooks. So I got me an Arduino UNO. However, I don't have any hardware, not even LEDs. But I do have extensive programming experience.

So, I did the obvious (only?) thing I can do at the moment. To get myself acquainted with the nuances of Arduino programming, I wrote a command line program that runs over serial. I then ported the game over to plain C to test my two characters to byte routine (I caught some other bugs before I had to debug on the arduino). Then I realized this might be helpful to other people who are relatively novice at Arduino programming, but have a basic understanding of general programming.

Sources are attached. The ".pde" is the sketch. The ".c" is the normal PC program.

Also, as a warning, the guessing game asks you to input a number from 0-255 in hexadecimal. There's a short Hexadecimal tutorial in each of the sources.

random.c (5.94 KB)

serialrandom.pde (6.91 KB)

Hi, Cool idea and a good example...

For beginning the Hardware Trek, this may be helpful: http://arduino-info.wikispaces.com/GettingStarted-Software

Connections: http://arduino-info.wikispaces.com/Cables

Few tutorials: http://arduino-info.wikispaces.com/TUTORIALS

Have fun, and the good people here can help with questions....

Cool. Yourduino.com has tons of reasonbly priced components and kits. This is definitely bookmarked. Thanks for showing it to me.

Have a look at my blinkenlight project http://www.blinkenlight.net. The experiments range from trivial to advanced :slight_smile: