Pages: [1]   Go Down
Author Topic: Help needed in interfacing XL- MaxSonar®- AEL0™ (MB1360) to Atmega168  (Read 1045 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm on a project to determine the distance between two vehicles and i have used XL- MaxSonar®- AEL0™ (MB1360) (an ultrasonic device) to do it. But i'm having trouble in interfacing it to Atmega168. Can someone please help me with it. ?

I also need the codes to be burnt using an Arduino board.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12482
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
and i have used XL- MaxSonar®- AEL0™ (MB1360) (an ultrasonic device)
Do you have a link to the datasheet of the sensor?

Can you post the code you have so far?

Quote
But i'm having trouble in interfacing it to Atmega168
What did you try? What did you expect, what did you get? Can you be more specific? i'm having trouble understanding smiley-wink

Quote
I also need the codes to be burnt using an Arduino board.
What do you mean?

I'm asking these questions to get a better understanding of your problem. The more info you can give the better help you can expect.



Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

datasheet ==> http://www.maxbotix.com/documents/MB1260-MB1360_Datasheet.pdf

Trouble ==> if i check the output from the second pin of the sensor using a multimeter i get random readings
                 but, when i connect it to the 'analog pin 0' it does not display any values.  smiley-confuse  smiley-confuse  smiley-confuse

codes so far ==> #inclide<LiquidCrystal.h>
                       int analogPin = A0; //pin connected to analog out on maxsonar sensor
                       int distance; // inches away from the maxsonar sensor

                        void setup()
{
                         lcd.begin(16, 2);
                         pinMode(analogPin, INPUT);
}

                        void loop()
{
                        distance = analogRead(analogPin);
                         lcd.print("distance= ");
                         lcd.print(distance);

}
}

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

and.....about the codes......
if u hav any codes that work, pls help......
Logged

Pages: [1]   Go Up
Jump to: