How to make wall/obstacle avoiding robot with arduino uno atmega 328

Gee, I don't think anyone has ever done that.

LOL.

Hi genius
I'm going to build (assemble) ultrasonic obstacle avoiding robot and I have Arduino Uno - Atmel Atmega 328-PU board and Arduino Compatible H-Bridge Motor Driver board (photo's attached) and Ultrasonic Module HC-SR04 Arduino. I'm looking for a way to attach cable from motor,ultrasonic module and within uno and motor control board and also suitable program/code for it...

1st off pictures are of little value. Give us links to data sheet or the products page… I don't plan on hunting them down. You bought the stuff!

  1. No body is going to wright your code for you… you would never learn. However, I will give you some examples.

Analog read example… chances are your sensor is analog… now way to tell with out data sheet.

/*
  AnalogReadSerial
  Reads an analog input on pin 0, prints the result to the serial monitor.
  Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
 
 This example code is in the public domain.
 */

// the setup routine runs once when you press reset:
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // print out the value you read:
  Serial.println(sensorValue);
  delay(700);        // delay in between reads for stability
}

Thats it for now until you post the data sheets or product page. No point wasting my time giving you code that might/might not apply.

Best of luck!