





Imani
3901 Westfield Ave.
Camden, NJ 08105
Mailing Address:
242 N 37th St
Camden, NJ 08105
info@imanicamden.com

Imani Community Development is grounded in a shared conviction that Camden's people, especially its children and youth, deserve nothing less than the fullest expressions of dignity, sustainability, and agency. We lead not from abstraction, but from proximity: listening carefully to neighbors, walking alongside families, and shaping programs that arise from the lived realities of our community rather than imposed solutions.
Since February 2023, the Imani Hope Center has been steadily building a space where leadership is cultivated, community bonds are strengthened, and cultural treasures are uplifted. Our vision is rooted in a belief that dignity, sustainability, and agency are not luxuries but essentials for our neighbors in Camden.
At Imani, we understand that transformation happens when people are not merely served, but empowered. We are committed to cultivating dignified, welcoming spaces where community life can fully unfold, environments that honor the worth of every person and invite children, youth, and families to see themselves as thinkers, leaders, and creators. Through education, mentorship, the arts, and community gathering, we labor to ensure young people encounter spaces that say clearly and consistently: you matter, and your future matters.
With a long view shaped by faith and responsibility, we invest in initiatives that strengthen families, stabilize neighborhoods, and nurture resilience from the ground up. Imani is not simply a gathering place; it is a living, breathing hub where creativity, resilience, and purpose converge, a steady, hopeful presence committed to Camden and accountable to its people.
A Code for You!
Paste the Following Code into Your IDE and See What Happen to Your Bot.
// ============================================================
// OBSTACLE AVOIDING ROBOT — Imani Genius Lab
// Hardware: Arduino Nano | L298N | HC-SR04 | 2x DC Motor
// Power: 9V Battery → L298N +12V terminal
// ============================================================
// ── PIN DEFINITIONS ─────────────────────────────────────────
// L298N Motor Driver — Motor A (Left Motor)
const int IN1 = 2; // Motor A direction pin 1
const int IN2 = 3; // Motor A direction pin 2
const int ENA = 6; // Motor A speed (PWM)
// L298N Motor Driver — Motor B (Right Motor)
const int IN3 = 4; // Motor B direction pin 1
const int IN4 = 5; // Motor B direction pin 2
const int ENB = 9; // Motor B speed (PWM)
// HC-SR04 Ultrasonic Sensor
const int TRIG = 10; // Trigger pin — sends sound pulse OUT
const int ECHO = 11; // Echo pin — receives bounce back IN
// ── SETTINGS ────────────────────────────────────────────────
const int MOTOR_SPEED = 180; // 0–255 (try 150–200 for 9V)
const int TURN_SPEED = 160; // Speed during turns
const int SAFE_DISTANCE = 20; // Stop if obstacle within 20 cm
const int STOP_DISTANCE = 12; // Reverse if obstacle under 12 cm
// ── SETUP ───────────────────────────────────────────────────
void setup() {
// Motor control pins — all OUTPUT
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
pinMode(ENA, OUTPUT);
pinMode(ENB, OUTPUT);
// Ultrasonic sensor pins
pinMode(TRIG, OUTPUT);
pinMode(ECHO, INPUT);
Serial.begin(9600);
Serial.println("=== Obstacle Avoiding Robot Ready! ===");
stopMotors();
delay(2000); // 2-second pause before starting
}
// ── MAIN LOOP ───────────────────────────────────────────────
void loop() {
int distance = getDistance();
// Print distance to Serial Monitor for debugging
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
if (distance > SAFE_DISTANCE) {
// ✅ Path is clear — move forward
moveForward();
} else if (distance <= STOP_DISTANCE) {
// 🚨 Too close! Reverse, then decide which way to turn
stopMotors();
delay(300);
moveBackward();
delay(400);
stopMotors();
delay(300);
decideDirection(); // Look left/right and pick clearer side
} else {
// ⚠️ Obstacle detected within safe zone — stop and turn
stopMotors();
delay(300);
decideDirection(); // Look left/right and pick clearer side
}
}
// ── OBSTACLE AVOIDANCE DECISION ─────────────────────────────
// Without a servo, we swing the robot body left & right to
// "look" with the front-facing sensor, then pick the clear side.
void decideDirection() {
// Look RIGHT — turn right briefly and measure
turnRight();
delay(400);
stopMotors();
delay(200);
int distRight = getDistance();
Serial.print("Right distance: ");
Serial.println(distRight);
// Return to center
turnLeft();
delay(400);
stopMotors();
delay(200);
// Look LEFT — turn left briefly and measure
turnLeft();
delay(400);
stopMotors();
delay(200);
int distLeft = getDistance();
Serial.print("Left distance: ");
Serial.println(distLeft);
// Return to center
turnRight();
delay(400);
stopMotors();
delay(200);
// ── Choose the clearer direction ──
if (distRight >= distLeft && distRight > SAFE_DISTANCE) {
Serial.println("→ Turning RIGHT (more space)");
turnRight();
delay(500);
} else if (distLeft > distRight && distLeft > SAFE_DISTANCE) {
Serial.println("← Turning LEFT (more space)");
turnLeft();
delay(500);
} else {
// Both sides blocked — do a U-turn
Serial.println("↩ Both sides blocked — U-Turn!");
turnRight();
delay(900);
}
stopMotors();
delay(200);
}
// ── DISTANCE MEASUREMENT ────────────────────────────────────
// Sends a 10µs pulse, measures how long echo takes to return.
// Formula: distance (cm) = pulse duration (µs) ÷ 58
int getDistance() {
// Clear trigger pin
digitalWrite(TRIG, LOW);
delayMicroseconds(2);
// Send 10-microsecond pulse
digitalWrite(TRIG, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG, LOW);
// Read echo pulse duration (timeout = 30 ms = 510 cm max range)
long duration = pulseIn(ECHO, HIGH, 30000);
// Convert to centimeters
int distance = duration / 58;
// Safety check — if reading is 0 or out of range, treat as far
if (distance == 0 || distance > 400) {
distance = 400;
}
return distance;
}
// ── MOTOR CONTROL FUNCTIONS ─────────────────────────────────
// ▶ Move FORWARD — both motors spin forward
void moveForward() {
analogWrite(ENA, MOTOR_SPEED);
analogWrite(ENB, MOTOR_SPEED);
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW); // Motor A forward
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW); // Motor B forward
}
// ◀ Move BACKWARD — both motors spin in reverse
void moveBackward() {
analogWrite(ENA, MOTOR_SPEED);
analogWrite(ENB, MOTOR_SPEED);
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH); // Motor A backward
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH); // Motor B backward
}
// ↻ Turn RIGHT — left motor forward, right motor backward
void turnRight() {
analogWrite(ENA, TURN_SPEED);
analogWrite(ENB, TURN_SPEED);
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW); // Left motor forward
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH); // Right motor backward
}
// ↺ Turn LEFT — right motor forward, left motor backward
void turnLeft() {
analogWrite(ENA, TURN_SPEED);
analogWrite(ENB, TURN_SPEED);
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH); // Left motor backward
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW); // Right motor forward
}
// ■ STOP — cut power to both motors
void stopMotors() {
analogWrite(ENA, 0);
analogWrite(ENB, 0);
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, LOW);
}
// ============================================================
// QUICK FIXES:
// • Robot drifts left/right → adjust MOTOR_SPEED values per motor
// • Motors too slow on 9V → increase MOTOR_SPEED toward 220
// • Robot hits walls → increase SAFE_DISTANCE (e.g. 25 or 30)
// • False obstacle alerts → place sensor flat, not angled down
// ============================================================
Resistor
Challenge





