Cool Links:
how can Arduino save data to a file?
http://timewitharduino.blogspot.ca/2009/05/getting-arduino-to-write-to-or-read.html
Arduino HEX file compile
http://arduino.cc/en/Hacking/BuildProcess
Burning a Bootloader Using a Tinyusb device for Atmega IC's
http://arduino.cc/en/Hacking/BuildProcess
Xloader for windows, flas the Arduino with a Hex file using a Windows GUI
http://russemotto.com/xloader/#comment-3976
VB 2010 USB port programing
http://www.me.umn.edu/courses/me2011/smartprodcourse/technotes/docs/serial-port-vb.pdf
So I'm starting with the GUI because the GUI is what you're using right now to view this web-page and this information.
So what is a GUI (graphical user interface)?
In simple terms the GUI is the screen you're using to view this text, it's the Windows, OSX, or Linux operating system you use, in simplest terms it's the interface between you and the computer code.
In the case of this web page the User Interface is the Browser, and in the case of Windows the interface is Explorer.
Behind all interfaces you'll find a database or file with the extension .INI or .XML, those files or database hold some pre-defined values, all you do with the GUI is make accessing that data simple to navigate and understand, the AVR is no different.
That's important to note because the Mico-Controller (in this case Arduino) works by calling "pre-defined values", the computer program you write, or the IDE you use accesses that information.
For example, if I write a program in C++ for Arduino that controls a servo motor, I'd probably tell Arduino that the command #2 turns the motor one way and the command #3 reverses it; the GUI would have a button or picture that when clicked sends a #2 or #3 to the USB port.
To make a GUI we can use a number of programming languages, each has its strong and weak points and some are only good for certain operating systems, no one language is the proper language.
The Arduino is programmed by calling the pin number you defined in the sketch (The C++ language stored on the Arduino), below are a few examples of programming languages that you can use to write a simple user interface.
Only a few languages are noted here, the ones on this page are the more frequently used, however the GUI (Graphical User Interface) can be one of or a combination of many other languages; any programming language that can communicate with a USB port will work.
PHP :
PHP is a lanuguage used in Web-Development and is a Server-Side language, using PHP a person could interface with the Arduino by calling pins already specified on the Arduino, the Language on the Arduino is always C++ or HEX. The PHP and HTML is the GUI.
For some great tutorials and a very simple guide programming in PHP check out these websites:
PHP Class Index (A class is used to define options, use "php include" to use them)
VB-2010 :
Visual Basic is another way to interface with the Arduino, it looks a little more professional when used with Windows however it is a programming language restricted to the same operating system.
Visual Studio offers other compilers, including VB.NET, C, C#, C++ just to name a couple, and now the "Microsoft Code-Plex" is offering a free install for Visual Studio and Arduino. The install can be found at
http://visualmicro.codeplex.com
http://www.dotnetperls.com/sort-vbnet
The download location may change.
Getting familiar with Arduino:
Below are a few really cool Arduino Projects, along with more details on how to use specific things with the Arduino, including that smart phone. Most of the "Sketches" below are usefull, or at the very least fun to try.
You can start with something complex or simple, however I sugges that you jump in with both feet. Don't be shy, all you're going to do is learn regardless of where you're at, if you start out too complicated and start over with something a little easier you'll still retain some of the information from the complex project.
Here is something interesting... The Arduino Clock
.
Attached is a simple sketch to use with a LCD screen and six buttons.
You can view or download the code by clicking on the image, it's open source so you can change it in any way you like. If you choose to Download the sketch, simply Highlight the text and past it into the Arduino GUI.
The "Sketch" is for the 1602 LCD Keypad Shield and Arduino. It works with the Arduino Duemilanove, UNO, MEGA2560, and the MEGA1280.
What is a sketch?
A sketch is a document written in C# for Arduino. The document is compiled by using the GUI (Graphical User Interface), and can be uploaded to the "AVR" Intergrated Circuit the same way.
Uploading information to an Intergrated Circuit like the AVR on the Arduino is known as "Flashing". Arduino has provided a great program for anyone new to programming and anyone without "ISP" installers. The tool allows you to Flash the device by inserting C# language.
This sketch is for a 6-Axis Robotic Arm and Gripper.
Control 6-Servos using this sketch and the Arduino IDE.
Step-1) Connect the Arduino to your computers USB Port.
Step-2) Wire the servos motors by connecting the "Orange" wire to the I/O's specified in the Sketch.
Step-3) Load the sketch using the Arduino software found free on the Arduino Website.
Step-4) Click on the "Debug" button.
Step-5) Click on the "Upload" button.
Step-6) Open the Arduino "Serial Monitor" under the "tools" tab.
Step-7) Enter the number of the servo you want to move.
That's it!
A fully operational and programmable 6-axis Robot Arm and Gripper, customize to suit your desires.
Click on the image for a sketch that uses a "momentary button or switch" and the "8 relay Joy-To-The-World" sketch together.
The objective:
The sketches used to acheive the objective:
Click on the image to see the result!
The nice thing about this sketch is that any sketch can be launched by tripping a sensor or by pressing a button.
Click on the image to download a free Arduino 8-Relay "Joy to the world" Sketch.
The Sketch switches 8 relays on and off as if playing "Joy to the world", simply use the Arduino GUI and past the contents of the text file into it, click on the "Compile" button, then "Upload".
That's it, if your relays are connected to the proper pins, in this case pin numbers:
"2 3 4 5 6 7 8 9"
you will hear the relays click on and off.
Have fun and be safe!
Another source for the Joy To The World Sketch can be found here
.
Click on the image to the right to visit a website that describes how to use your smart phone with your Arduino of choice and a Android Smart Phone.
Android is an Open-Source Operating System for smart phones, it's owned by Google and is free for anyone to install and use unlike its competition. because anyone can use Android lost of people hack it and change the operating system to do crazy cool things with a Smart Phone and Arduino.
Thanks Google!!!
.
A christmas tree sketch, Automate a Christmas tree using this Sketch.
You can turn a tree into a robot, have lights turn on and off, switch on a servo or two and have the mouth and ears move, even connect it to the web with the help of the Twitter. Arduino is great fun for everyone.
Try it out and see what you can come up with, the code is pretty self explanitory.
.
.
The Atmel AVR:
Atmega 168 related links
http://wanderr.com/jay/controlling-arduino-via-serial-usb-php/2010/12/28/
http://www.arduinoprojects.com/node/10
http://hackaday.com/2011/03/17/the-basics-of-controlling-an-arduino-with-php/
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1222740686
Common IC's:
Atmega168:
Atmega328:
Atmega2560:
Atmega2980:
Sketches and data:
http://www.instructables.com/id/ServDuino-Arduino-Webserver/step7/Programming/ web server programming samples
http://code.google.com/p/opengauge/wiki/OBDuinoInterface
http://www.arduinotutorials.com/
http://arduino.cc/playground/Code/SimpleMessageSystem
http://www.arduino.cc/en/Tutorial/Tone
Some of the obove examples can also be found under examples in the free Arduino GUI, for more complicated ideas remember the importance of a flow-chart.
Other Links:
http://blog.notdot.net/2011/11/Introducing-iZac-the-Android-Bartender work project
http://www.instructables.com/id/Tweet-a-Pot-Twitter-Enabled-Coffee-Pot/ Tweet a pot of coffee
http://blog.notdot.net/2011/11/Introducing-iZac-the-Android-Bartender
More Tuts: