How to Install MPLAB Software in Windows
Hello friends, hope you all are fine and enjoying good health. Previously, we have seen Functions available in PIC18F452. In today's tutorial we are gonna have a look at How to install MPLAB software. Until now, we have seen only what is PIC Microcontroller and what is it capable of? Now we are gonna move a little further and will see how we can burn program into it and get it our slave. So in order to make the PIC our slave, we have to burn some coding into it and even before that we need some platform where we can actually write this coding and this platform is provided by Microchip itself and is called MPLAB.
MPLAB is a software in which we write a programming code for PIC Microcontroller. It is basically a compiler which compiles the code and then create its hex file, which we later uploads in our microcontroller. I have explained this thing before in Getting Started with PIC Microcontroller. Now before going any further, we will first have a look on how to install MPLAB software in Windows. So in this tutorial, I will explain the step by step the whole process of installing MPLAB. MPLAB supports assembly language, which we are not gonna learn in this class so, after installing the MPLAB software we also have to install the MPLAB C compiler, which we will install in the coming tutorial, so first install this MPLAB software and then move to the next tutorial to install C compiler.
Steps to Install MPLAB
- You can download MPLAB software quite easily from official site of MPLAB as its free of cost.
- Open the rar file and you will see there are two folders in it, open the folder named MPLAB_IDE_v8_56 and run the file setup.exe
- The next screen appears will be like that :
- Click on Modify and then on Next and the next screen will be like below image :
- Don't do any changing and again click on Next.
- On the next window,click the NEXT button again.
- The software will now begin to install and after complete installation the final window will popup simply click on FINISH.
- That's all your software has been installed.
- Now simple open the software and start programming but you can only do programming in assembly language.
The first part of this tutorial has been completed. In the next part, I will explain how to install the MPLAB C compiler so that you can also do programming in C language in MPLAB.
Till then take care ...... ALLAH HAFIZ :))
Functions Available in PIC18F452 Microcontroller
In the previous tutorial, I explained Getting Started with PIC microcontrollers and the software etc. Today, I am going to explain the hardware of PIC18F452 i.e. the functions available in PIC18F452. In other words, working of pins. We have a total of 40 pins in 18F452 microcontroller. Different PIC microcontrollers have different pins and different functions. Some of the PIC Microcontrollers lack the below functions and some of them have much more functions than these. So, here I am just discussing the PIC Microcontroller 18F452 because it is a moderate one and is mostly used in engineering projects. It's an 8-bit microcontroller. So now we are gonna have a look at the functions available in the PIC18F452 microcontroller. In the next tutorial, I have discussed How to install MPLAB software in Windows and have also discussed How to Install MPLAB C18 Compiler.
Ports
There are a total of five ports in PIC18F452. Each port is 1 byte (8 bits) and so each port has 8 pins of microcontroller except the portE which has 3 pins. These ports are named as:
- PORTA ( Pin # 2 to Pin # 10 )
- PORTB ( Pin # 33 to Pin # 40 )
- PORTC ( Pin # 15 to Pin # 18 & Pin # 23 to Pin # 26 )
- PORTD ( Pin # 19 to Pin # 22 & Pin # 27 to Pin # 30 )
- PORTE ( Pin # 8 to Pin # 10 )
You can access any pin of any port. Ports' pins are assigned as 0,1,2,3,4,5,6,7 and 7 being the most significant bit and 0 the least so suppose I want to use PIN 3 of port B then I will write RB2. We will see it in more detail in the coding section and as it's just the hardware section I am not going into detail about this.
Timers in PIC18F452
We have a total of four built-in timers in the PIC18F452. These timers are also used as counters. We can set them to count anything or to set delays etc. For example, we want to make a digital watch on LCD using PIC, in that case, we will use timers to count. Four timers used in PIC18F452 are:
- Timer0
- Timer1
- Timer2
- Timer3
Serial Port Interfacing
PIC18F452 also supports serial interfacing using TX & RX pins. Suppose we are using any sensor and want to make a graph of its output on the PC, then we will attach the sensor to any of the input pins and then send its data to the computer using TX and RX pins. In PIC18F452:
- TX pin is pin # 25
- RX pin is pin # 26
We use the TX pin of the PIC when we want to transmit data from the PIC to the computer and RX when we want to receive data into the PIC.
Some Other Functions
These are some advanced-level functions that I will explain in the advanced section but interested readers can ask in comments or can contact me. However, sooner or later, I will post about all of them in detail.
- Interrupts in PIC18F452
- A/D converter
- EEPROM storage
- CCP and ECCP Programming
- SPI Protocol
- I2C Protocol
Getting Started with PIC Microcontrollers
In the last tutorial, we discussed Getting Started with Microcontrollers and how they work and now we are gonna have a look at Getting Started with PIC Microcontrollers. PIC microcontrollers, as I mentioned before, are manufactured by Microchip. There are many types of microcontrollers but here I am concerned with PIC18F452.So let's have a small review of PIC18F452 PIC microcontrollers.
PIC18F452 is a 40-pin microcontroller each pin has its functionality, which we will see in our next classes one by one. suppose I want to create a project on LED blinking, a simple project on PIC so what do I have to do? First of all, I need the following things so that I may use them to work with PIC. I have discussed the Functions available in the PIC18F452 Microcontroller in the next post.
Important Points
- MPLAB ---> MPLAB is a software which you can download easily from the official website of Microsoft as it's an open source software. In MPLAB you will do programming in Assembly & C Language. We will learn Assembly & C Language in our next classes.
NOTE: We will learn the Assembly & C language in our next classes. This software has already been sent to all the registered users. If you need it, then Subscribe to our Email Notification and this will be forwarded to you. Thanks.
- PIC Programmer ----> There are many PIC Programmers available in the market. You have to attach this Programmer to the PC through a serial port (Parallel Port & USB Port PIC Programmer are also available). Now Put your PIC in the 40-pin socket of the Programmer.
- PICpgm Software / PICKit software ----> This software is used to burn the program in the PIC. It's just the same as burning a movie on DVD. Now open this software and browse to your program which you have made in MPLAB and then click on program PIC and your Program will be burnt on your PIC.
- PIC Basic Circuit ---->PIC alone never works, we have to add a simple circuitry to make it work Below figure shows the simple PIC circuit. It is not very difficult and you can make it on a simple vero board with soldering. I have given its circuit below :
Now remove your PIC microcontrollers from the Programmer and add them to the hardware circuit and you will check that your PIC will give you the same results as you have programmed in it. In this tutorial, we have just taken an overview of PIC Microcontrollers. Next, we will check its Ports and the purpose of these ports. Till then take care ALLAH HAFIZ .... :))
Getting Started With Microcontrollers
Hey guys hope you all are fine and healthy. Today I am going to start a new tutorial, about PIC Microcontrollers. I will start from the very basics of PIC Microcontroller so that the beginner can also learn from it and can easily work on their projects and I will also post some projects in which I will use PIC Microcontroller and will control different modules using it.
The only thing I hate about PIC Microcontroller is the designing of its basic circuit, which we will discuss in coming tutorials, that's why I prefer to work on Arduino which is way more user-friendly than PIC Microcontroller but if look at the brighter side of PIC Microcontroller than it is much more flexible in option as compared to Arduino. Let's start today's tutorial, today I will just give an overview of what actually Microcontroller is and why to use it. So, let's begin with getting started with microcontrollers.
What is Microcontroller?
Microcontrollers are used to put the brain in your projects. Let's take an example, you have seen different light patterns at weddings or different functions where it seems like lights are walking, sometimes they show some characters glowing on and off quickly, etc. Before microcontrollers such patterns of light were very difficult you need a a lot of circuitry (serial & parallel combinations of lights) and then have to decide which light to on and which to off. A big messy thing but with the invention of the microcontroller, now you just have to add a microcontroller and put in some coding and you are done. That's the benefit of the microcontroller. and second thing in order scenario if something goes wrong then you have to change the hardware connections but in the microcontroller just change the code and you are done with no need for soldering etc.
Types of Microcontrollers
There are different microcontrollers manufactured by different companies these days. A few of them are:
- PIC
- ATMEL
- AVR
- FPGa
- Arduino (Board actually, I will explain later)
- & a lot more
but all of them have the same function. Let's look at their function.
Function of Microcontroller
A microcontroller is a simple chip (IC). We are not discussing its internal architecture as it's beyond the scope of this tutorial. We are here just concerned with its output. So a microcontroller is just a simple hardware chip. Now how to operate that chip is a question. A microcontroller has different no of pins some have 8 pins some 16 and some 40 even have 80 pins. Each pin has its function and we tell the microcontroller what function each pin will perform by adding a code in the microcontroller.
PIC Microcontrollers
PIC microcontrollers are manufactured by a company named Microchip. There is a wide variety of PIC microcontrollers. They are named PIC16F877A or PIC 18F452. The first two numbers show the series like the PIC16F series and PIC18F series. Each series has its own functions and qualities and the number of pins also varies. In my tutorial, I am gonna use the PIC18 F452 which is shown in the above figure too.
That's all for right now. I will continue it after afternoon. Stay blessed .... :))
Display Serial Data on Real Time Graph in Labview
Hello friends, hope you all are fine and having fun with your life. Today's post, as the name suggests is about How to Display Serial Data on Real Time Graph in Labview. In our previous post, we have seen that how to Get Continuous Data From COM Port in Labview. Today's post is a sequel of this previous post so I would recommend that if you haven't had a look on that post then first visit it as I am gonna start today's post from where I stopped the previous one.
In the last post, we were able to get the continuous data from COM port using Labview and we have also separated the data based on a character which I have used this one "," i.e. comma. Now, suppose you are sending 3 values from your COM port and these are the sensors' values so tthe best way to display these value is by using a graph. In the last post we separated the values and displayed them in a 1D array, so today we are gonna display those values in a graph. As I have taken three values so today I am gonna plot 3 graphs. Each graph will show one of the values and display them in real time. Let's start it.
Display Serial Data on Real Time Graph in Labview
- In the last post, we have the below vi at the end. This vi get continuous data from the COM Port and then display it in the Response and the 1D array.
- In the above image, the Data 1D displays the values separately and differentiate it on the basis of a characters "," i.e. comma.
- In other words, Data 1D has a array, which consists of three values coming from the serial port.
- So if like we have sent the values 120,221,312, then the array(0) will have 120, array(1) will have 221 and finally the array(2) will have 312.
- In order to plot the values on the graph separately, what we need to do is to simply get array(0) and then plot it vs time and so on, which is shown in below figure:
- As you can see in the above figure, the logic we used is quite simple, what we did is we simply get the array just before Data 1D and then broke it into parts i.e. array(0), array(1) and array(2) and then fed it to the Graph plots.
- In this particular example I am using accelerometer IMUv2 and displaying its values on the graph.
- After adding these blocks you are done. Now press Ctrl+T and open the Front Panel. My front Panel looks like as shown in below figure:
- Now first of all select the COM port from which you are receiving the data. If you can't find yours, then click on the Referesh, you will find in the drop down.
- Now, run the vi and then click on the Start button and you will start receiving the values. The values will be displayed in the Response as it is and then in the Data 1D and will also display on these graphs separately as shown in the below figure:
- Now, you can see the data is displayed. In this vi, we have displayed the data in three formats:
- Response: It shows the complete data coming from the Serial Port.
- Data1D: It separates the data and then displays it in digital format.
- Graphs: They plot the real time graph of the coming data.
I have attached the vi below for download but I would recommend you guys to design it by yourself so that you learn the most out of it.
Download the Labview vi
Get Continuous Data From COM Port in LabView
Hello friends, hope you all are fine and enjoying good health. Today's post is my first post on LabView Software. I have worked on LabView quite a lot in past but these days I am continuously working on LabvView so I thought to write some tutorials on it. In today's tutorial, I will explain in detail How to get continuous data from COM Port in LabView software. LabView is a very handy tool for the engineers. One can easily plot graphs and can work on different hardware modules with it. One of the best feature of LabView is its extensive help desk. There are many examples present in it which are ready to run and can help a lot, moreover their online is also very extensive. I got into many problems while working on it and I never get stuck, I just searched online and got the solutions for my problems. So, my suggestion is, if you are working on LabView then give Google a chance to help you out, if you stuck in something.
Let's start today's post, in today's post we will receive data from serial port and show it in LabView software. In order to do so, first of all you need to download LabView software, you can easily download it from their official website. They offer a trial period of around 45 days for the students and after that you have to buy it. Now, follow the below steps carefully and if you find any trouble anywhere, let me know in comments and I will try my best to sort them out.
Steps to Follow
- First of all, you need to download the NI VISA driver.
- NI VISA driver is used for serial communication, without downloading this software you can't communicate with the serial port of your computer in LabView.
- LabView has extensive list of drivers, whenever you want to communicate with any hardware in LAbview then you have to download its driver, NI VISA is the driver for communicating with serial port.
- After downloading this driver, install it and now run your LabView software.
- When you run LabView, it will appear as shown in the below figure:
Note:
- I have given the complete working vi to download at the end but I suggest that you should design it by yourself so that you learn how to design.
- Now, click on the Create Project Button and the below Window will pop up.
- Now click on the Blank VI Template and click Finish.
- A blank vi will open up, we will design the complete project in this vi.
- These are two windows, one is called the Block Diagram, where we will place all the components and the second one is Front Panel, where user can interact with LabView i.e. the Serial data coming will be displayed in the Front Panel.
- Another small window will also be there, this window is used for getting blocks.
- Now design a vi as shown in the below figure:
- In this vi, we are receiving data from Serial port and then separating it on the basis of "," character and then placing it in a Data 1D and as well as in Response box.
- The Front Panel is shown in the below figure:
- Before running the vi, first of all select the COM Port from which your data is coming.
- Now click on RUN button in top toolbar, but still you won't receive anything, now hit the Start Reading button and you will start receiving the data, as shown in the below figure.
Note:
- If you don't select the correct Com Port then it will give error and won't run so select the correct COM Port name.
-
- Now, the COM Port I am using is COM5 and you can see Start Reading button is also ON.
Response is showing the complete data whatever is coming from the Serial Port, while the Data 1D is splitting the data and showing each data in each box and the separation character I selected is "," (comma).That's all for today, now play with the vi and I hope you will find it really amusing. In order to download the complete working vi click on the below button.
Download Labview Simulation
In the next post, I have discussed how to Display Serial Data on Real Time Graph in Labview.Displaying data on graph is usually required in most of the projects. So have a look at it.
Circuit Designing of LCD with Arduino in Proteus ISIS
Hello friends, I hope you all are doing great. Today, I am going to share Circuit Designing of LCD with Arduino in Proteus ISIS. In my previous tutorial, I have posted a tutorial on How to use Arduino Library in Proteus. Using that library, we can easily test Arduino code in Proteus to check whether its working or not. If you haven't read that post then before starting it, first read it, as without adding the arduino library we can't use Arduino in Proteus.
Coming to today's post, as we have done adding the Arduino Library in Proteus, so I thought to do some projects on it and the first one I chose is quite simple one i.e. Circuit Designing of LCD with Arduino in Proteus ISIS. So we will have a look on how to show some characters on LCD using Arduino in Proteus. If you are working on LCD then you should also have a look at my new post Scrolling Text on LCD using Arduino. Let's get started with Circuit Designing of LCD with Arduino in Proteus ISIS:
Circuit Designing of LCD with Arduino in Proteus ISIS
- First of all, design a circuit of LCD and Arduino in Proteus ISIS, if you have already added the Arduino Library then you won't find any problem in finding the Arduino in components library of Proteus.
- You should also download this New LCD Library for Proteus.
- Design the circuit as shown in below figure:
- Now, we need to design Arduino sketch for LCD, so open Arduino software and place below code into it.
- You should have a look at How to get Hex File from Arduino.
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{
lcd.begin(16, 2);
lcd.print("www.TheEngineer");
lcd.setCursor(0,1);
lcd.print("ingProjects.com");
}
void loop() {}
Note:
- For Arduino code, I have used Liquid Crystal Arduino Library, which you can download from the below link and add it in the libraries folder of Arduino software.
Download LiquidCrystal Arduio Library
- If you haven’t bought your Arduino UNO and LCD yet, then you can buy it from this reliable source:
- Now compile the code, and get the Arduino hex file which will be in the tmp folder, you can read Arduino Library for Proteus to know in detail how to get the hex file of Arduino sketch.
- Now double click the Arduino in Proteus ISIS and properties window will pop up.
- In properties panel, under the Program File section, browse to Arduino hex file as shown in below figure and upload it.
- Now click Ok and Run your simulation, if everything goes fine then your LCD will start showing the characters as shown in below figure:
- You should also have a look at these Arduino Projects for Beginners.
- That's all, was it difficult ??? I dont think so :) Anyways, if you got into any trouble, do ask in comments.
- In the coming posts, we will explore Arduino in Proteus ISIS more. Till then take care !!!
Training Error: Recognition Failed in EasyVR
Hello friends, hope you all are fine and enjoying life. Today's post is about removing a small error named as Recognition Failed in EasyVR, which I encountered while working with EasyVR shield with Arduino UNO. I have posted a complete project on EasyVR shield around a year ago in which I haven't mentioned this error because at that time I didn't encountered it. But today while working with EasyVR shield, I encountered this problem so I thought to share it with you guys.
EasyVR shield is a voice recognition module which is used for recognizing voices and operating accordingly. Using this module, one ca quite easily control anything using voice. In the previous project, I have controlled a robot using voice commands like when I say Forward then it starts moving forward, when I say REVERSE then it start moving backward and so on. So, its quite a cool feature to be added in projects but its not the perfect one as the efficiency of this module is not even 50%, if you are operating in a noise environment then it won't work as you want it to work.So ,let's get started with How to solve Training Error: Recognition Failed in EasyVR.
Training Error: Recognition Failed in EasyVR
- First of all, I connected my EasyVR with Arduino UNO and run the EasyVR Commander.
- I selected the Com Port of my Arduino UNO and hit Connect.
- After that, I added a new command in EasyVR Commander and hit Train Command and it asked for Phase 1.
- Everything was working perfect but when I train my command i.e. said the word which I wanted to save in the command, I got the error written as "Training Error: Recognition Failed", shown in below figure:
- I tried again and again to train the command but the error keeps on continuing, which creates quite a problem for me.
- So, below are the steps, which I have taken in order to remove this error, its kind of a troubleshooting which is quite important to learn for an engineer.
How to solve Training Error: Recognition Failed in easyvr
- First of all, what you need to check is whether your EasyVR shield is working or not, which I did exactly. So, I remove the EasyVR shield from the Arduino UNO and upload a sketch in Arduino UNO. The sketch I uploaded in Arduino UNO is the test EasyVR sketch comes with the EasyVR library.
- After uploading the sketch, I connected my EasyVR shield with Arduino UNO and check its output and I got a sigh of relief that my EasyVR shield is working fine, so there's no problem with EasyVR.
- Now I again opened the EasyVR commander and this time I placed the J12 jumper no SW instead of PC, and start the training procedure and I was like surprised, it worked great.
- I think the new versions of EasyVR shield doesn't need the jumper to be on PC for training mode.
- In the project, I have mentioned it that place the Jumper J12 on PC while working with EasyVR Commander and place it on SW while working with Arduino UNO, which is now not applicable for the new version of EasyVR.
- So, simply, place your jumper J12 on SW position and it will work smoothly.
Note:
- EasyVR shield doesn't give the 100% result, it got impressed by the noise in the surroundings very quickly so whenever you are using EasyVR shield, make sure that you use it in a calm place. I even turn off my fan in order to make it work properly.
Finally, after resolving this issue, I trained five commands into it for moving a robot, which are shown below:
- That's all for today, hope it will help you guys in some way. Thanks !!!
Send SMS with Arduino UNO and SIM900D using AT Commands
Hello friends, today's post as the name suggests is about how to send SMS with Arduino UNO and SIM900D using AT Commands. There are different types of SIM900D modules available in the market, so it doesn't matter which module you are using. All SIM900D modules work at AT commands basically so today I am going to show you how to send an SMS via AT commands without using any Arduino library. You should first read the AT commands manual which will give you an idea about AT commands. AT commands are special sets of commands which are used for communicating with SIM900 module. Using these AT commands we let our GSM work for us. Like if you want to send SMS then there's a specific AT command for sending the SMS similarly if you want to change the PIN code for your GSM module then you have a different AT command. So, there are lots of AT commands available. We can interface this GSM module with any microcontroller like PIC Microcontroller or 8051 Microcontroller but here I have interfaced it with an Arduino board. You should also check How to Send SMS with PIC Microcontroller if you wanna use PIC Microcontroller instead of Arduino board.
You must also check GSM Library for Proteus, using this library you can easily simulate your GSM module in Proteus ISIS. Moreover, also have a look at Send SMS with Sim900D in Proteus ISIS in which I have designed a simulation of SMS sending in Proteus ISIS.
Note:
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | SIM900 | Amazon | Buy Now |
2 | Arduino Uno | Amazon | Buy Now |
Components Used
I have shared the list of components used in this project. I am giving a comparison of three vendors below, you can buy from any of them:
Connect Arduino UNO with SIM900D
- First of all, connect Arduino UNO with SIM900D module, which isn't much difficult. If you have the module in hand then the first thing you need to do is to power it up and wait for the module to get connected.
- Usually, an LED is placed on the SIM900D module which keeps on blinking. If it's blinking fast, it means the modules haven't yet captured the signal. When the module captures the signal then the LED keeps on blinking but at lower speed.
- Now find the TX and RX pins of your SIM900D module and connect the TX of module with RX of Arduino UNO, which is pin # 0 and similarly RX of module with TX of Arduino UNO, which is pin # 1.
- The module, which I have used for my project is shown in the below figure, with labelled pin configurations and if you want to buy it in Pakistan then click here.
- One other thing mentioned in above figure is pKey, connect it with ground.
- Once your connections are ready, then upload the below sketch in your Arduino UNO and start sending messages.
void setup()
{
Serial.begin(9600);
}
void loop()
{
delay(1200);
Serial.print("AT");
delay(1200);
bool bOK = false;
while (Serial.available() > 0)
{
char inChar = (char)Serial.read();
bOK = true;
}
if(bOK)
{
index = 0;
Serial.println();
Serial.println("AT+CMGF=1"); // sets the SMS mode to text
delay(100);
delay(1200);
bool bOK = false;
while (Serial.available() > 0) {
//Serial.write(Serial.read());
char inChar = (char)Serial.read();
bOK = true;
}
if(bOK)
{
Serial.println();
Serial.print("AT+CMGS=""); // send the SMS number
Serial.print("+923004772379");
Serial.println(""");
delay(1000);
Serial.print("A new post is created by Zain."); // SMS body
delay(500);
Serial.write(0x1A);
Serial.write(0x0D);
Serial.write(0x0A);
}
}
}
- Change the mobile number with the number, on which you want to send the SMS, I have written mine.
- You should also change the body of the SMS and can write anything you wanna send as an SMS.
- The AT commands are required to send the SMS. I have added the comments in front of these commands but still if you get into any trouble, ask in comments.
- That's all for today, in the coming post, we will have a look how to receive SMS with SIM900 and Arduino.
Introduction to Arduino YUN
Hello everyone, I hope you all are doing great. In today's tutorial, I am going to give you a detailed
Introduction to Arduino YUN, and we will also have a look at its basic functionalities. Arduino YUN is a latest microcontroller board, manufactured by Arduino. It's the most advanced and highly stylish arduino board. The beauty of Arduino YUN lies in having two on board processors, which I haven't seen yet in any other
Microcontroller board. One of them is simple Arduino processor which is similar to that of Arduino Leonardo while the second processor is Atheros AR9331. Atheros supports Linux server, which is the new thing in Arduino YUN. Because of these two processors, one now can do anything in the world of automation as well as web servers. You can say it's kind of a replica to
Raspberry Pi 3.
Arduino YUN can be used as a server, you can also run python scripts quite easily on it, which we will cover in coming posts of this tutorial. You can run the Telnet session on it, can access the FTP servers, in short you can do anything with it quite easily. Let me give you an example, around 3 months ago I have designed a project on Arduino YUN in which the sensors data attached to the YUN were uploading directly on the web server via FTP and were saved in the sql database and I did all of it, just by using Arduino YUN alone. No computer was attached for FTP connection as python scripts in the Arduino YUN were doing this task. Now, I think you have gotten better idea of capability of Arduino YUN.Arduino YUN also have built in Wifi, Ethernet, USB host and SD card slot.
One another unique feature of Arduino YUN is that you can upload Arduino sketches in it wirelessly without any cable connection, if your computer and Arduino YUN are connected with the same Wifi connection. Now, let's have a look at how to manually connect the Arduino YUN with available wifi connection, which should be your first step after buying an Arduino YUN.
Manually Connect Arduino YUN with Available Wifi Connection
Now I suppose that you have got your Arduino YUN. After getting the Arduino YUN, open your box and plug the mini usb cable into your Arduino YUN and the other side of cable in your computer. I am also assuming that you are plugging it first time with your computer via usb cable.
Note:
- You should download the Arduino software version 1.5.5 instead of 1.0.3 because Arduino sketches will be only compiled in 1.5.5 version which is specifically designed for Arduino YUN. In this tutorial, we will not use Arduino software.
- After plugging the Arduino YUN, open your Wireless Network connections and wait for the Arduino YUN to appear as shown in below figure. It will take some time to appear so be patient.
- In the above figure, you can see YUN connection is available, now the question is why is it available?? It is available because it is not connected to any wifi connection rite now and is acting as an access point. In other words, its just similar to a Wifi router having no wifi connection.
- So, what we need to do is to connect with this YUN so click on YUN wifi connection and hit connect, so you will get disconnected with previous connection and will get connected with Arduino YUN as shown in below figure.
- After connecting with Arduino YUN, yur computer has came in the same network with YUN.
- YUN has a built-in page saved in it from where you can quite easily configure its properties.
- So, opne your browser and write http://192.168.240.1/ and hit enter, its the current IP adress of Arduino YUN, so when you hit enter, a page similar to the below figure will open up asking for the password.
- The default password for this page is "arduino" so insert this password and click on Log in as in above figure.
- After log in, you will be directed to a page similar to one shown in below figure and you can see in the below figure different properties or values of Arduino YUN like current ip address, netmask etc.
- For Wifi, it is giving connected but for Ethernet, it is showing disconnected because we haven't yet connected with Ethernet.
- Now click on the Configure button shown in the above figure.
- After clicking on the configure button, you will be directed to the configuration panel of YUN shown in below figure and you can see there are many fields which are ready for configuring.
- First one is YUN NAME, which I have gven is TEP, you can give it any name which you can easily remember.
- Second field is password, the default password as we have seen before is "arduino" so if you want to change that password then add a new password here, which I dont want, so I have left it blank.
- Next is TIMEZONE, select our time zone from drop down list.
Note:
- If your project involves time log or date, then its very important to select your time zone so that you get your local date and time.
- Next are wireless parameters, where we are gonna select the wifi connection with which we want to connect our Arduino YUN.
- Select the SSID of your network with which you wanna connect, its a drop down list which will have all the currently available networks, so you just need to connect with the one you want and also give its password and hit Configure & Restart button.
- That's all, when you hit this button, the below screen will appear which will say Configuration Saved and the YUN is restarting.
- It will take around 10 to 15 minutes to get completely restarted meanwhile, what you need to do is to connect with that wifi connection with which you have connected your Arduino YUN. In my case its SALAM so I connected my computer with SALAM.
- After restart, now your Arduino YUN will be connected to the wifi connection and you won't see it in the local wireless connections as we have seen in the start.
- So now your Arduino YUN and computer both are connected with the same network, which in my case is SALAM.
- So, now open your Arduino 1.5.5 software and click on Tools and then Port and you can see below Aduino YUN is available and named as "TEP at 192.168.1.1" , where TEP is the name of Arduino YUN board which we have given in above steps and the ip address is the current ip address of Arduino YUN.
- By selecting this 4th option shown in above figure, you can burn any sketch in your Arduino YUN wirelessly without any cable unless your computer and YUN are connected with the same wifi connection.
- I don't think it was much difficult connecting YUN with the wifi connection, but quite interesting, isn't it?
- So, give it a try and have fun. I will post more tutorials on YUN soon so stay connected and have fun. :))