This repository contains Arduino code for a variety of sensor modules used in the ops course. Each folder includes code for each sensor module for replication.
- Distance Sensor Module
- GPS & IMU Sensor Module
- Line Sensor Module
- Environment Sensor Module
- Camera Module
- Lidar Module
- License
This module demonstrates how to read distance data using various types of sensors:
-
Ultrasonic Sensor Component: SparkFun Ultrasonic Sensor Uses sound waves to measure the distance to an object.
-
Infrared Sensor Component: GP2Y0A41SK0F Short-range analog IR sensor ideal for precise detection of nearby objects.
-
Micro LiDAR Module Component: TFMini Plus A compact time-of-flight distance sensor for higher accuracy and longer range.
This module combines GPS positioning with motion and orientation sensing.
-
GPS Module Component: SparkFun GPS Module Provides latitude, longitude, altitude, and timestamp data via serial connection.
-
IMU (Inertial Measurement Unit) Component: Adafruit 9-DOF Absolute Orientation IMU Fusion Breakout Combines accelerometer, gyroscope, and magnetometer with onboard sensor fusion to provide orientation data (yaw, pitch, roll).
Used for line-following robots and navigation over predefined paths.
-
Line Follower Array Component: SparkFun Line Follower Array 8-channel reflectance sensor array to detect line position with high precision.
-
Industrial Scale Line Follower Component: Industrial Grade Line Sensor (Insert your specific model here.) Designed for robust line tracking in factory environments.
Collects environmental data and detects physical interactions.
-
Gas, Temperature, Humidity, Pressure Sensor Component: Adafruit BME688 A powerful sensor for collecting air quality, gas levels, temperature, humidity, and pressure data.
-
Collision Detection Component: Roller Microswitch Simple mechanical switch for detecting contact/collisions with objects.
Coming Soon Includes Arduino-based interface for image or video capture. (Details and code will be added.)
Coming Soon Standalone Lidar module with real-time 2D/3D scanning support. (Details and code will be added.)
This module demonstrates different ways to measure rotational position using incremental, absolute, and analog position sensors.
-
Quadrature Incremental Encoder
Component: Rotary Encoder 1024 P/R Quadrature
Outputs two digital signals, Channel A and Channel B, that are offset from each other. The Arduino reads these signals to determine rotation direction and count position changes. This encoder is useful for measuring relative motion, wheel rotation, and speed feedback. -
Absolute SPI Encoder
Component: Same Sky AMT22
Uses SPI communication to report the shaft’s absolute angular position. Unlike an incremental encoder, it can provide the current position immediately after startup without needing to return to a home position. -
Multi-Turn Potentiometer
Component: Bourns 3590S-2-201L
A 10-turn analog position sensor that changes resistance as the shaft rotates. The Arduino reads the wiper voltage through an analog input and maps it to position. It is simple to use and useful for manual position feedback over a limited range.