ICSE Class9 Robotics Experiments and Programs
ICSE Class9 Robotics Experiments and Programs
Materials: IR sensors, Arduino Uno, motor driver (L298N), DC motors, chassis, wheels, jumper wires.
Procedure:
5. Place the robot on a track with a black line and observe its movement.
Expected Output: The robot detects the black line using IR sensors and adjusts its motors to follow the path
accurately.
Objective: Create a robot that detects and avoids obstacles using ultrasonic sensors.
Materials: Ultrasonic sensor (HC-SR04), Arduino Uno, motor driver, DC motors, chassis, wheels.
Procedure:
Expected Output: The robot moves forward and, upon detecting an obstacle, changes direction to avoid it.
Code:
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)
while True:
GPIO.output(18, GPIO.HIGH)
time.sleep(1)
GPIO.output(18, GPIO.LOW)
time.sleep(1)
Expected Output: The LED connected to GPIO pin 18 turns on and off every second.
Code:
import Adafruit_DHT
sensor = Adafruit_DHT.DHT11
pin = 4
Expected Output: Displays the current temperature and humidity readings from the DHT11 sensor.