๐ค Gyani Rover
Gyani = Gyanodaya ยท Rover = Remotely Operated Vehicle
Built by students of Gyanodaya Secondary School, Bafal.
Won multiple accolades โ from school level to district competition.
1st Place โ Kathmandu Municipality
2nd Place โ MechTRIX 2079
3D Model
Tinkercad design โ click to explore in 3D.
Materials Used
| Component | Qty / Spec |
|---|---|
| Arduino | NANO / UNO ร 1 |
| DC Motors | 6V ร 4 |
| Motor Driver | H-Bridge (L293D / L298N) |
| Temp & Humidity Sensor | DHT11 ร 1 |
| Servo Motor | Standard ร 1 |
| Ultrasonic Sensor | HC-SR04 ร 1 |
| Breadboards | Small ร 2 |
| Jumper Cables | As needed |
| Battery | 3.7V ร 6 |
| Bluetooth Module | HC-05 ร 2 |
| Arduino Nano (for calls) | ร 1 |
| Old Phone | ร 1 |
| NPN Transistor | ร 1 |
Presentation Slide
Virtual Circuit
Image Gallery
Click any image to expand (lightbox coming soon).
RONB Post
Code
// Gyani Rover โ Arduino Code (modified)
// fb.com/shaambhavbhandari21 ยท fb.com/Bishow420
#include <Servo.h>
#include <NewPing.h>
int in1 = 7, in2 = 8, in3 = 9, in4 = 10;
int enA = 5, enB = 6;
#define TRIGGER_PIN 11
#define ECHO_PIN 12
#define MAX_DISTANCE 250
Servo servo_motor;
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);
bool goesForward = false;
int distance = 100;
void setup() {
pinMode(in1, OUTPUT); pinMode(in2, OUTPUT);
pinMode(in3, OUTPUT); pinMode(in4, OUTPUT);
pinMode(enA, OUTPUT); pinMode(enB, OUTPUT);
servo_motor.attach(3);
servo_motor.write(90);
delay(2000);
for (int i = 0; i < 4; i++) {
distance = readPing();
delay(100);
}
Serial.begin(9600);
}
void loop() {
if (Serial.available()) {
BLUETOOTH();
}
}
int lookRight() {
servo_motor.write(15);
delay(500);
int d = readPing();
delay(100);
servo_motor.write(90);
return d;
}
int lookLeft() {
servo_motor.write(180);
delay(500);
int d = readPing();
delay(100);
servo_motor.write(90);
return d;
}
int readPing() {
delay(100);
int cm = sonar.ping_cm();
return (cm == 0) ? 250 : cm;
}
void forward() {
analogWrite(enA, 220); analogWrite(enB, 220);
digitalWrite(in1, HIGH); digitalWrite(in2, LOW);
digitalWrite(in3, HIGH); digitalWrite(in4, LOW);
}
void backward() {
analogWrite(enA, 220); analogWrite(enB, 220);
digitalWrite(in1, LOW); digitalWrite(in2, HIGH);
digitalWrite(in3, LOW); digitalWrite(in4, HIGH);
}
void turn_right() {
analogWrite(enA, 220); analogWrite(enB, 220);
digitalWrite(in1, HIGH); digitalWrite(in2, LOW);
digitalWrite(in3, LOW); digitalWrite(in4, HIGH);
}
void turn_left() {
analogWrite(enA, 220); analogWrite(enB, 220);
digitalWrite(in1, LOW); digitalWrite(in2, HIGH);
digitalWrite(in3, HIGH); digitalWrite(in4, LOW);
}
void st() {
analogWrite(enA, 190); analogWrite(enB, 190);
digitalWrite(in1, LOW); digitalWrite(in2, LOW);
digitalWrite(in3, LOW); digitalWrite(in4, LOW);
}
void BLUETOOTH() {
char data = Serial.read();
Serial.println(data);
switch (data) {
case 'F': forward(); break;
case 'B': backward(); break;
case 'L': turn_left(); break;
case 'R': turn_right(); break;
case 'S': st(); break;
case 'I': AUTO(); break;
}
}
void AUTO() {
Serial.println("AUTO MODE");
int distanceRight = 0, distanceLeft = 0;
delay(50);
if (distance <= 40) {
st(); delay(300);
backward(); delay(400);
st(); delay(300);
distanceRight = lookRight();
delay(300);
distanceLeft = lookLeft();
delay(300);
if (distanceRight >= distanceLeft) {
turn_right(); delay(800);
} else {
turn_left(); delay(800);
}
st();
} else {
forward();
}
distance = readPing();
}
Connect with Developer
Bishowdeep & Team
Open source ยท Contributions welcome