Software DocumentationArduino Motor Control
To upload code to Duemilanove Arduino:
- Download and extract Arduino programming environment
- It will upzip to a folder arduino-00XX where XX is the version number.
- The executable will be in this main directory
- Arduino IDE link
- Download Latest Arduino Code
- Startup Arduino IDE program by running the executable file
- Open source code
- File > Open > Motor11552.pde
- Connect arduino to computer using standard USB cable
- Change board and serial port
- Tools > Board > Arduino Duemilanove or Nano W/ ATMega328
- Tools > Serial Port > COM8
- Verify and compile source code
- Sketch > Verify/Compile
- Upload to Arduino board
- File > Upload to I/O Board
To modify code:
The Arduino programming environment was built using Java. However, source code is basically written in C/C++. There are a few built-in Arduino libraries you will utilize, such as serial port communications, writing/reading pin values, and stepper motor commands.
There are two main functions that are required for an Arduino program, setup() and loop(). The setup function is used to initialize digital pins, motor speeds, serial communication, etc. The loop function will begin after setup and loop forever. For this particular project, the serial port is monitored for new commands.
If you never programmed before, it would be beneficial to take a look at tutorials first.
To test code:
Open serial monitor (Tools > Serial Monitor) and send commands. Commands for this project range from 1 to 9 currently. Refer to source code.
Graphical User Interface
To run code:
- Download and install Microsoft Visual Studio C++
- The FREE express version will also work.
- Download and extract the source code
- Startup Visual Studio
- Open project
- Open Existing Project
- Navigate to extracted file
- Choose Artie.sln
- Choose the serial port of the Arduino
- Click on motor movement buttons
To modify code:
Everything is written in C++. This project utilizes the limited functionality of the Windows Forms. To adjust components (buttons, textboxes, menus), open Form1.h, which will immediately bring up the user interface. Properties can be toggled by the drag-and-drop method or through the properties window.
This user interface setup is unnecessary. However, the user interface must be able to communicate with the serial port in order to send commands to the Arduino.
If you have any questions or comments regarding the software for this project, please feel free to email me.