how can Arduino save data to a file?
Arduino HEX file compile
Burning a Bootloader Using a Tinyusb device for Atmega IC's
Xloader for windows, flas the Arduino with a Hex file using a Windows GUI
VB 2010 USB port programing
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.
Visual C# is a free IDE provided by Microsoft, and is probably the best way to program the Arduino, you will find lots of literature on the web for using this language and the language is more flexible making it possible to do much more with it.
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)
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
The download location may change.
Python is also a very popular programming language and is cross platform, it's a great language to learn and is ver flexable, like C# it's a suggested programming language to use for development of the Arduino
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.
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 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!
By clicking on the image to the right you can view or download a simple Servo Motor Sketch.
the sketch is written in C# and easy to understand. It is intended to be a simple example and will help with setting a motor speed.
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.
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.
With the Ethernet sheild for Arduino you can use Twitter to control things, or setup a web-server with the Arduino.
By clicking on the image to the right you can find out how to use Twitter with any Arduino.
By clicking on the image on the right you will find instructions for making a Tweetable Coffee Pot.
On your way into work and have some coffee to brew? Just tweet your Coffee maker and have it brew a pot of coffee.
The Atmel AVR:
Atmega 168 related links
Sketches and data:
http://www.instructables.com/id/ServDuino-Arduino-Webserver/step7/Programming/ web server programming samples
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.
http://www.instructables.com/id/Tweet-a-Pot-Twitter-Enabled-Coffee-Pot/ Tweet a pot of coffee