Working with Arduino Software
Arduino software is a common program to write your code that will be deployed to the Arduino oard; it supports multiple Arduino boards with lots of functionalists.
You can easily use it and it can run on different operating systems ( Windows, Mac OS, Linux)
To use it,
1) Download Arduino Software from Here
2) Run Arduino Software on your machine, the below screen will appear
3) Select the board you use as below
4) Get The COM number in which the connecting board uses.
5) Set the COM port the board uses in the Arduino software "Tools->SerialPort-> Choose the COM"
6) Write your own code, verify it, then deploy it.
Hello World exercise
In our first Arduino xercise, we are going to build a simple program to blink one led in the board. The example exists in the examples list with the Arduino software "File->Sketchbook->Blink"
int led = 13; // led number that will be blinked
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
No comments:
Post a Comment