กลับไปหน้ารวมไฟล์
serial-sensor-app-a-boring-line-follower-62f09a-en.md

So I wanted to get into Java, later some image processing. I started to do so with my Android phone and things quickly got out of hand. After billions of hours spent, there is a free app which allows you to build fast and simple applications with your Arduino:

  • Stream camera-based sensors, currently a line- and a position sensor
  • Built-in, simple camera calibration
  • Send data via USB, Bluetooth (HC-Modules) or to CSV file
  • Stream phone internal sensors (accelerometer and so on)

What's different to already available stuff? Utilizes the camera and it looks like a real app.

Here's how it looks:

The "fast" line follower

App overview

Camera calibration assistant

Technical Implementation: Camera and Pathfinding

The project reveals the hidden layers of simple smartphone-to-robot integration:

  • Identification layer: The Serial Sensor App on your smartphone uses the camera to detect and identify a black line on a white surface in real-time.
  • Processing Logic layer: The app performs several high-performance computations to determine the "Line Position" and sends it to the Arduino as a numerical value.
  • Communication layer: Data is sent rhythmically from the phone to the Arduino using either a USB-OTG Cable or a wireless HC-05 Bluetooth Module.
  • Actuation layer: An L298N Motor Driver Module provides the high current needed to drive the DC motors based on the line's position.
  • Sequential Steering Loop: The Arduino code adjusts the speed and direction of the motors to keep the camera centered over the line.

Hardware Infrastructure

  • Arduino Uno: The "brain" of the project, managing the serial data inputs and coordinating the locomotion and steering tasks.
  • Smartphone with Camera: Providing the high-resolution image processing and path monitoring for each your robot's travels.
  • L298N Motor Driver: Effectively handles the 12V power required to drive the motor coils while protecting the Arduino.
  • DC Motors: Providing the physical movement and orientation for each of your robot's travels.
  • 2WD Robot Chassis: The physical frame that houses the Arduino, smartphone, and battery pack.
  • 7.4V Li-Po Battery: Essential for providing the power needed to keep your robot portable and self-sufficient.

Locomotion and Feedback Loop

The camera-controlled robot is designed to be very efficient:

  1. Initialize Hardware: Correctly seat your smartphone and motor driver on your 2WD chassis and prepare the Serial Sensor App for action.
  2. Setup High-Power Sync: Ensure the motor driver is powered directly by the 7.4V battery pack.
  3. Execution Loop: Start the path-following "Choreo" in the app and watch as your robot begins its journey.
  4. Visual and Audio Feedback: Watch the movement update on the floor in real-time, with a celebrating buzzer sound for each point of the path.

Future Expansion

  • OLED Identity Dashboard Integration: Add a small OLED display on the robot to show a larger life bar and the "Path Reliability" score for the line follower.
  • Cloud Interface Registration Support: Add a specialized cloud dashboard to precisely control and track your robot's progress from your smartphone via WiFi.
  • Advanced Velocity Profile Customization Support: Use several sensors (e.g., an ultrasonic sensor) to have the robot automatically "dodge" obstacles while following the line.
  • Multi-sensor Bio-Security Integration Support: Connect several sensors (e.g., PIR motion sensor) to have the robot only "wake up" and start following the line when someone enters its view.

Checkout my GitHub repo for instructions and sample code!

https://github.com/SerialSensor/ABoringLineFollower

ข้อมูล Frontmatter ดั้งเดิม

apps:
  - "1x Arduino IDE"
  - "1x Serial Sensor App (Android)"
author: "shassandanish1"
category: "Fun & Games"
components:
  - "1x Arduino UNO"
  - "1x L298N Motor Driver Module"
  - "2x DC Motors with Gearbox"
  - "1x Smartphone with Camera (Android)"
  - "1x USB-OTG Cable or HC-05 Bluetooth Module"
  - "1x 2WD Robot Chassis"
  - "1x 7.4V Li-Po or 12V Battery Pack"
  - "10x Jumper wires (generic)"
  - "1x Micro-USB Cable"
description: "Free android app using your camera to do fun stuff. For starters, I'll show you a simple line follower"
difficulty: "Easy"
documentationLinks: []
downloadableFiles:
  - "https://github.com/SerialSensor/ABoringLineFollower"
encryptedPayload: "U2FsdGVkX19CZNoaWi5JizicoHCtciB3cNCCPvLi1ccE22XSc3zhAfGd8gqZlkolde1zs7LcTMSkaxkqqnFZ/xex1rlmzl2IdauDApy+IcWJA0M0DqeIoJDI5XMsgYds"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/serial-sensor-app-a-boring-line-follower-62f09a_cover.jpg"
lang: "en"
likes: 0
passwordHash: "3b9a46f94a9edbc066bfceb254f458c1ee5ea30178a2a6ee3b25149e4c7ade39"
price: 699
seoDescription: "An intuitive and simple line-following robot for beginners interested in Arduino smartphone-camera integration."
tags:
  - "robot"
  - "line-follower"
  - "smartphone"
  - "camera"
  - "arduino"
  - "beginners"
title: "Serial Sensor App: A boring line follower"
tools: []
videoLinks:
  - "https://www.youtube.com/embed/yorxUHchpSI"
views: 3125