Sale!

for Obstacle Avoidance Function in robot

15

Description

There are a lot of robot design that is capable of obstacle avoidance function which means such function is a general necessary, in other word, a must that helps the robot motion function to work more consistently and without being interrupted.

Programming of the ultrasonic sensors becomes pretty easy if the NewPing Library is applied. The NewPing Library integrates all the basic functions of the ultrasonic sensors and convert them to be simpler functions for user’s application. Thus, for my project, I only need to use the function NewPing(trigger[i],echo[i],distance) to do the assignment of trigger pins, echo pins and the effective distance of certain working ultrasonic sensors. For this project, trigger pins are assigned to be 8, 9, 10 and echo pins are assigned to be 11, 12, 13 for all three sensors arranged in a 360 degree space. In the code, those pins are defined as arrays: int trigger[ ] = {8,9,10} and int echo[ ] = {11,12,13}. Thus, for the sensor works with trigger pin 8 and echo pin 11 and work within 500 cm, it can be simply expressed as NewPing(trigger[0], echo[0], 500); And for all sensors, it can further be put in an array, named NewPing sonar[3] = {NewPing(trigger[0],echo[0],500),NewPing(trigger[1],echo[1],500),NewPing(trigger[2] , echo[2], 500)}, that finish the assignment of all pin numbers and effective distance at the same time, very efficiently.

Arduino code for wearable Sensor System

Arduino code for a programmable mask positioning system

 

 

Reviews

There are no reviews yet.

Be the first to review “for Obstacle Avoidance Function in robot”

Your email address will not be published. Required fields are marked *