Pages: [1]   Go Down
Author Topic: From PC Console programming to Arduino Programming.  (Read 1664 times)
0 Members and 1 Guest are viewing this topic.
Missouri, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 - downloaded 9 times.)
* serialrandom.pde (6.91 KB - downloaded 4 times.)
« Last Edit: October 25, 2011, 04:35:09 pm by Jorh » Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1906
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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....
Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Missouri, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Faraday Member
**
Karma: 23
Posts: 3480
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Check out my experiments http://blog.blinkenlight.net

Pages: [1]   Go Up
Jump to: