
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Develop your own driverless car by learning Python and the OpenCV computer vision library, and mastering the Jetson Nano board to enable lane tracking.
Equip your Jetson Nano for development by performing setup and updates, installing Python and the necessary environments and libraries to remotely control the device.
Format the SD card on the Jetson Nano using the SD card formatter, following windows/mac steps, select quick format, and confirm completion.
Download the Jetson Nano SD card image from the Nvidia developer site, then flash it to an SD card with Balena Etcher to install the operating system.
Connect the Wi-Fi module and SD card to the Jetson Nano, secure the processor, install Wi‑Fi scripts, and prepare the board for the operating system.
Mount the cooler fan on the cooler, secure it with two machine screws and hex nuts, and connect red to Vdd and black to GND on the Jetson Nano.
Initiate the first boot of the Jetson Nano by configuring peripherals, language, wifi, and region; then set the computer name, password, auto-login, and memory and performance options to complete setup.
Set up remote access to a Jetson Nano with VNC, paste setup codes in the terminal, set a password, reboot, and locate the IP with ifconfig for remote connection.
Learn to install and use VNC viewer on Windows to remotely connect to a Jetson Nano via IP 192.168.1.21 with password 123456.
Launch and install Visual Studio Code on the NVIDIA Jetson Nano via VNC, enabling remote Python and OpenCV coding in the VSCode IDE.
Edit the xorg.conf to create a virtual screen on the Jetson Nano, set 1280 by 720, then reboot and verify via the VNC viewer.
Install Python in Visual Studio Code on Jetson Nano via VNC, then install the Microsoft Python extension, create a project folder, and run a hello world script.
Install and verify the OpenCV library on the Jetson Nano using Visual Studio Code and Python. Confirm the OpenCV version (4.1.1) by importing cv2 and printing its version.
Explore the basics of the Python programming language in this new section for autonomous vehicle development, including Python and C plus plus.
Explore Python basics by learning variables, naming rules, and how to assign values. Understand data types like integers, floats, strings, and booleans, and how dynamic typing works.
Master Python variables by applying naming rules, such as starting with a letter or underscore, avoiding reserved words like for, and using quotes for strings, with hands-on VS Code exercises.
Explore Python operators, including arithmetic, assignment, comparison, and logical operators, with practical examples of x and y demonstrating addition, subtraction, multiplication, division (float and int), modulus, and exponentiation.
Practice arithmetic, assignment, and comparison operators in Python basics using variables x and y. Explore operations like addition, subtraction, division, modulus, and equality checks.
Explore how logical operators and, or, and not guide an autonomous vehicle in prioritizing objects and controlling engine states using Python.
Practice Python boolean logic, building and evaluating expressions with and, or, not. Create a Python file like operators 2.py to test true and false values and basic comparisons on Jetson.
Learn how standard input and output functions in Python let users enter data and display results via the console, using input() and print() and basic prompts.
Practice using Python's print function to display strings, integers, floats, and booleans by creating variables and printing them, including formatting with commas for multiple outputs.
Learn to use the Python input function on a Jetson Nano with VSCode, create variables and prompts, print results, and verify inputs are strings via the type function.
Learn conditional statements in Python, using if, else, and elif to control program flow based on conditions; understand indentation and practical examples with comparing numbers and lane-following decisions.
Master conditional structures in Python by building if and else statements in VS Code, evaluating true or false conditions, and printing outcomes with variable comparisons between x and y.
Explore Python loops, including for and while, to automate repetitive tasks and iterate over sequences, with emphasis on indentation, for opening the camera and lane following on a Jetson Nano.
Learn Python loops with hands-on exercises: use a for loop to print even numbers from 1 to 10, then build a while loop counter from 0 to 9.
Learn how Python functions organize code with def, parameters and arguments, and how return values enable reuse. Call functions to perform tasks like greetings or adding numbers.
Master Python functions with Jetson Nano, VS Code, and basic concepts like parameters, return values, and printing. Learn to iterate lists, count elements, and call functions.
Explore how Python modules simplify code reuse and organization, and learn to import and use modules like math and OpenCV for lane tracking.
Explore ready-made Python modules, such as math, DateTime, random, JSON, and Tkinter, and learn to create and use your own modules with functions like grid and square.
Learn to use the math and time modules on the Jetson Nano to perform factorials, exponentiation, and square roots, and introduce delays with sleep, dir, and help.
Create and use custom Python modules by defining functions in my_module.py, importing them in main.py, and executing greetings and exponentiation operations.
Learn to read an image with cv2.imread and display it using cv2.imshow, then control how long it stays on screen with cv2.waitKey, illustrating with a sample OpenCV basics project image.
Learn to resize images using OpenCV's cv2.resize in Python, reading with imread, specifying width and height (320x240), and displaying results with imshow and waitKey.
Change image color formats with OpenCV by converting from BGR to gray or RGB, using cv2.cvtColor to support lane-tracking tasks.
learn to draw a line on an image with OpenCV using the line function, setting start and end points, color, and thickness, then display the result with imshow and waitKey.
Learn how to draw a circle on an image using OpenCV's cv2.circle function, including setting the center, radius, color, and thickness, and display the result with imread and show.
Learn to draw a green rectangle on an image with OpenCV using cv2.rectangle for lane-tracking visualization, including imread, imshow, and waitKey.
Discover how to print text on an image with OpenCV using cv2.putText, including loading an image, choosing font Hershey simplex, blue color, and coordinates for placement, then displaying the result.
Learn to use the CSI camera on Jetson Nano with OpenCV, capture frames via cv2.VideoCapture, adjust frame size, apply vertical flip, and display results in Python.
Learn how external dc motor drivers power a four-motor autonomous vehicle to follow lanes, adjusting speeds for left and right turns with Jetson Nano and L298n and PCA 9685 modules.
Learn how to use the L298n motor driver to control dc motor direction and speed with PWM, including external battery connections and essential wiring with the PCA 9685.
Discover how the PCA9685 motor driver enables I2C control of DC motors, servos, and steppers with Jetson Nano, controlling motor speed via the L298N module and a Python library.
Explore the dc motor circuit diagram for an autonomous vehicle with Jetson Nano, featuring the L298N driver, four dc motors, a nine-volt battery, ground connections, and PCA9685 motor driver integration.
Examine the wiring between the L293d and PCA9685 motor drivers, including enable and input pins, and connect Jetson Nano via I2C (gnd, sda, scl, 3.3v) for DC motor speed control.
Control the speed of DC motors on the Jetson Nano using the PCA 9685 I2C module, with setup of I2C lines, SDA/SCL pins, and Adafruit libraries.
Create an i2c instance from the bus io module using SCL and SDA, instantiate the PCA9685 class with that i2c and address (0x40 or 0x60), and set frequency to 100.
Adjust the PCA 9685 circuit to control a dc motor with pwm, and set channel duty cycles to 0XFF and 0XFFFF for out one and out two.
Master dc motor speed control via a throttle structure for two motors, using values 0–1 for forward motion and negative values for reverse in a continuous loop.
Assemble the -1 module for a self-driving car project, using Jetson Nano hardware fundamentals to explore lane tracking and OpenCV workflows.
Assembling -2 reveals basic assembly concepts through a playful caption about beetles and bills for learners.
Explore canny edge detection for lane tracking on highways, including grayscale conversion and threshold parameters, using Python on Jetson Nano to detect edges in images.
Learn to implement canny edge detection in OpenCV with Python, processing highway images in grayscale, tuning thresholds, and visualizing original and edge-detected results.
Explore contours in OpenCV to detect object boundaries for lane tracking. Use find contours on edge images from canny detection, retrieve contours, and apply chain approx to simplify contour points.
Draw contours in OpenCV with Draw Contours function, using image, contours, and -1 to draw all contours in green with thickness two after finding contours with cv2.findContours for lane detection.
Learn to perform contouring with OpenCV on a highway image by converting to gray, applying canny edge detection, finding and drawing contours, then displaying results.
Learn thresholding to distinguish road lines by applying a threshold function to a grayscale image, producing a binary image (black and white) for lane tracking in autonomous driving.
Learn to implement thresholding in Python with OpenCV by converting images to grayscale, applying cv2.threshold, and displaying binary results on a Jetson Nano.
Learn to combine edge detection and binary threshold results using OpenCV's add function to enhance lane tracking in a self-driving car project.
Define a region of interest to target analysis on images, boosting efficiency in image processing. Use OpenCV and numpy slicing to select ROI coordinates in Python.
Discover how ROI enhances image processing and analysis by enabling targeted operations that improve processing time and accuracy in image processing projects.
Create a polygon for a region of interest using OpenCV and NumPy, defining four image coordinates (upper left, upper right, lower left, lower right) and the image height.
Create a mask from a polygon using OpenCV by generating a zero matrix, filling the polygon with fill poly, and applying bitwise and to obtain the masked image.
Develop a lane-tracking self-driving vehicle using Jetson Nano and OpenCV that can drive itself and follow the road; test on a white-tape road with 80 cm segments.
Define and explain the core modules used in the project, including OpenCV cv2 for contouring and white line detection, numpy for region of interest, and PCA 9685 motor control modules.
Initialize I2C and the PCA9685 PWM driver on a Jetson Nano, configure address 0x40, set frequency to 100 Hz, and apply a 100% duty cycle to two motor channels.
Learn to configure a Jetson Nano webcam feed with OpenCV, adjust brightness and resolution, and define a region of interest with polygons and a mask for reliable lane tracking.
Read frames from the video stream, convert to grayscale, apply canny edge detection and thresholding, then use a region of interest and OpenCV contours to identify lane edges.
Process the main loop by analyzing contours, filtering by area, drawing bounding rectangles, computing centers, and adjusting motor throttles to steer left, right, or forward, and stop for large contours.
Conclude the self-driving car project with Jetson Nano, exploring lane tracking and OpenCV techniques.
Welcome to the course on developing an autonomous vehicle using Jetson Nano! This course will guide you step-by-step on how to build your own self-driving car using Jetson Nano. Starting from the basics, you will acquire the necessary hardware and software knowledge, and then reinforce these skills through practical projects.
Course Content:
Introduction to Jetson Nano setup and key features
Overview and installation of essential hardware components (Webcam, L298n motor driver, PCA9685 PWM driver)
Image processing techniques with Python and OpenCV
Developing contour-based lane detection algorithms
Lane tracking and vehicle control
Materials Used:
Webcam: For capturing image data
L298n: For driving motors
PCA9685: For generating PWM signals
Jetson Nano: For performing AI and image processing tasks
Course Objectives:
Learn how to effectively use the Jetson Nano platform
Develop lane detection algorithms using image processing techniques
Correctly connect and program hardware components
Achieve autonomous vehicle control through lane tracking
By the end of this course, you will have the skills to develop your own autonomous vehicle and advance your knowledge in this exciting field. Whether you are pursuing it as a hobby or aiming for a professional career, this course will provide you with a solid foundation.
Join us and take a step into the future of technology!
No previous programming or electronics knowledge is required.
"You are never too old to set another goal or to dream a new dream." - C.S.Lewis
"Do the difficult things while they are easy and do the great things while they are small. A journey of a thousand miles begins with a single step" - Lao Tzu
You get the best information that I have compiled over years of trial and error and experience!
Best wishes,
Yılmaz ALACA