hi every one
i am very new to this forum.i want to do some projects with the arduino boards. i have some basic doubts.
My Aim: i want to do a project on interfacing Arduino with GPS and GPRS and get the co ordinates and send the details to the user.
-> which Arduino board suits for this project ??
-> which shields i need to use ??
-> "if i am using the shields on top of the Arduino board is it possible to use the digital pins for connecting any sensors" ???
can i use the pins of the board for multi purpose??? means can i use the pins of board for connecting the digital input after inserting the shield also???
because i want to get the data from sensors and store it in the data base and this data also i want send along with the GPS data. so along with the GPS/GPRS shields i have to connect the sensors to the digital pins of the board is it possible ??
start with your shield(s)
google gps shield arduino and read what capabilities they have.
read the requirements for the GPS shield you want to use. they will advise the required Arduino that has the capabilities to interface with that shield.
one warning about low cost boards. there are some really low cost boards that have zero documentation. some even have the chip label removed. so, for the hours you will need to take to trace all the pins and reverse engineer what the designer did, you may very well wind up with a board that you cannot use. once you found a blog or a how-to or a tutorial, get that board.
as for the pins, the idea of stackable is that all the pins are brought up to the next level. whatever pins are dedicated to the board, well, they are used, but all the rest are still accessible and available. so, you have full access to all pins when using a shield.
hi dave-in-nj,
thanks for the reply. the info. you shared is useful and encouraging.
finally i brought the Arduino Uno board. i have some doubts about the board. when i am searching for the tutorials of the board i found that the concepts of bootloader. i gone through some web pages for this but i am confused.
my question is , i brought a new board Arduino Uno
-> the boot loader will come along with the board??? (or)
-> do i need to burn a boot loader onto the microcontroller ??? if yes give me some suggestions..
any one who is reading this post , please help me out......
ysrinivas:
my question is , i brought a new board Arduino Uno
-> the boot loader will come along with the board??? (or)
-> do i need to burn a boot loader onto the microcontroller ??? if yes give me some suggestions..
Assuming you bought an official Arduino Uno R3, it comes with the boot loader installed on it. In theory, all you need to do is:
Install the 1.0.5 Arduino IDE for your system;
Set the board type to Arduino Uno (Tools -> Board -> Arduino Uno);
Open up the first example, blink (Files -> Examples -> 0.1 Basics -> Blink);
Connect your Uno to the computer, using a cable with the B port on one end (typically used for printers), and the standard USB A male port on the other end;
Download the example to the board (using the Upload button, which is the 2nd button from the left on the menu bar).
I don't have experience with the R2 Uno, so I don't know if there are any differences. Hopefully if you got a clone, that it will behave the same as the official Uno.
Burning bootloaders is more of an advanced task. You need some sort of programmer (either a hardware programmer, or an Uno that has been set up to work as a hardware programmer). You use this if you have a raw chip that does not have a bootloader installed. The Uno is a development board, that has it installed, and has things like clock crystal, USB serial connection, power regulators. If you are going with a raw chip, then you need to do this other stuff.
If for instance, you were making some device that was going to be doing something, you might prototype it on a breadboard. When it does what you want, you can then burn a raw chip to do the application, and use your Uno for the next task. Given you can get the raw chips for $5-10 in single unit quantities, but Uno development boards are $25-30, it is cheaper to go with a raw chip, but it is less friendly. Many of us never go past the breadboard stage, and that is fine also.
i am doing a small project to count the no.of persons getting IN and OUT of the single door(Assume like a bus door with steps).
this is my code..
// program to find out the occupancy of the Bus
int b1 = 2; //sensor1 for boarding checking
int a1 = 3; //sensor2 for boarding checking
int b2 = 4; //sensor3 for alighting checking
int a2 = 5; //sensor4 for alighting checking
volatile int count = 0; //variable to store the count
void setup()
{
pinMode(b1,INPUT);
pinMode(b2,INPUT);
pinMode(a1,INPUT);
pinMode(a2,INPUT);
attachInterrupt(0, Board, LOW);
attachInterrupt(1, Alight, LOW);
Serial.begin(9600);
Serial.println("The occupancy Module is ready");
}
void loop()
{
}
void Board()
{
for(int i=0; i < 1500; i++)
{
if(digitalRead(b2) == LOW)
{
count++;
Serial.print("count = ");
Serial.println(count);
}
}
}
void Alight()
{
for(int j=0; j< 1500; j++)
{
if(digitalRead(a2) == LOW)
{
count--;
Serial.print("count = ");
Serial.println(count);
}
}
}
i wrote a simple code using 4 sensors, and i am using the combination of 2 sensors to make sure the person has get IN or OUT
b1,b2 are for counting the boarded persons,
a1,a2 are for counting the alighted persons,
a1,b1, sensors i am using as interrupt purpose and in the sub routine i am checking for a2 & b2 respectively
i think this code will work for single person boarding and alighting cases..
i have some doubts about this code...
when we are considering the public buses
-> what if two persons (1 boarding and another alighting at same time) passing through the door???
-> how the ISR's will behave????
any one reading post please help me out , give any suggestions to improve my code and which others cases i need to take into consideration...
i have Arduino Uno board with me, i want to do project with GSM shield and GPS shield. but i am totally confused which shields i have to buy. please any one reading this post please suggest me which shields i can use and where can i buy them..