XL-MaxSonar MB7070

Por favor me pueden indicar cuales son los pines que debo usar en el Ultrasonic sensor (MB7070) para conectarlo a un Arduino Mega.

Slds,
Luis

Deberías haber posteado el enlace del MB7070
Si no leíste las normas, mejor hazlo y luego me dirás si no debiste postear lo que yo hice

Las normas dicen que debes presentar la información debidamente.
Una consulta como la tuya para alguien que la lee, debe ser clara, y permitir que rapidamente te pueda dar una respuesta.
Esto lo repito 100 veces al mes y cae en saco roto.

Asi que te respondo. Tu sensor según la hoja de datos tiene 3 salidas.

  1. Analogo, una simple salida analogica 0 a 5v
  2. PWM
  3. RS232

Elige el método que desees pero los mas cómodos son 1 y 3.
El método 1 es fácil y el 3 tmb.

Pin 4 y 5 son RX y TX mas GND tienes una conexión Serial que puedes conectar a tu MEGA en el puerto 1, Serial1

Pin 4- RX- This pin is internally pulled high. If Pin-4 is left unconnected or held high, the sensor will continually measure the range. If Pin-4 is held low the sensor will stop ranging. Bring high 20uS or more to command a range reading. Pin 5- TX- When Pin 1 is open or held high, the Pin 5 output delivers asynchronous serial data in an RS232 format, except the voltages are 0-Vcc. The output is an ASCII capital “R”, followed by ASCII character digits representing the range in centimeters up to a maximum of 765 (select models) or 1068 (select models), followed by a carriage return (ASCII 13). The baud rate is 9600, 8 bits, no parity, with one stop bit. Although the voltages of 0V to Vcc are outside the RS232 standard, most RS232 devices have sufficient margin to read the 0V to Vcc serial data. If standard voltage level RS232 is desired, invert, and connect an RS232 converter such as a MAX232.When Pin 1 is held low, the Pin 5 output sends a single pulse, suitable for low noise chaining (no serial data).