Automatic Gas Valve Control System Using
Automatic Gas Valve Control System Using
3, September 2012 18
DOI: 10.9756/BIJPSIC.10001
functionality; exploitation of 12 to 23 motors will Arduino software and selecting the Preferences window.
immobilize PWM on pins 11 and 12. Adjacent to the editor language there is a dropdown menu of
currently supported languages. The desired language can be
chosen from the menu and restart the software to make use
of the preferred language. If the desired language is not
supported, the IDE will default to English.
The Arduino can return to its normal setting depending
on the operating system by selecting System Default from
the Editor Language drop-down. This setting will
commence only after restarting the Arduino software. In the
same way, after changing the operating system’s settings,
the Arduino software must be restarted to update it to the
latest default language.
B. Writing Sketches
Software is written using Arduino which are called as
sketches. These sketches are written in the text editor.
Sketches are saved with the file extension as .ino. It has
options for cutting/pasting and for searching/replacing text.
The message area provides feedback at the time of saving
and exporting and also displays errors. The console shows
text output by the Arduino environment together with
complete error messages and additional information. The
Figure 3: Servo motor interfacing using arduino bottom right-hand corner of the window shows the existing
board and serial port. The toolbar button permits to confirm
Servo motors consists of three wires: power, ground and and upload programs, create, open and save sketches and
signal. In general, the power wire is red in colour and open the serial monitor.
supposed to be connected to the 5V pin on the Arduino
board. The ground wire is characteristically black or brown C. Sketchbook
and must be connected to a ground pin on the Arduino The Arduino environment employs the idea of a
board. The signal pin is normally yellow or orange and sketchbook - a standard place to accumulate the programs
should be connected to pin 9 on the Arduino board. (or sketches). The sketches in sketchbook can be initialized
The potentiometer is supposed to be wired in order that from the File > Sketchbook menu or from the Open button
its two outer pins are connected to power (+5V) and ground, on the toolbar. The initial time while running the Arduino
and its center pin is connected to analog input 0 on the software, it will automatically generate a directory for the
Arduino. sketchbook. The location of the sketchbook can be viewed
or modified with the assistance of Preferences dialog.
D. Libraries
Libraries offer additional functionality for use in
sketches, for instance, working with hardware or
manipulating data. In order to use a library in sketch, it is
necessary to select it from the Sketch > Import Library
menu. This will introduce one or more #include statements
at the beginning of the sketch and compile the library with
the sketch. Since the libraries are uploaded to the board with
the sketch, they enhance the quantity of space it takes up.
When a sketch no longer requires a library, just remove its
#include statements from the top of the code.