Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Whisker (Bump) Switch control of a OneBot Robot

  • PCRduino
  • 2017-09-02
  • 1207
Whisker (Bump) Switch control of a OneBot Robot
George SchoolRoboticsPatton Roboticswhisker switchbump switchobstacle avoidanceOneBotTeensyTeensy 3.2
  • ok logo

Скачать Whisker (Bump) Switch control of a OneBot Robot бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Whisker (Bump) Switch control of a OneBot Robot или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Whisker (Bump) Switch control of a OneBot Robot бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Whisker (Bump) Switch control of a OneBot Robot

This is a simple demonstration of how the OneBot from Patton Robotics can avoid obstacles using the whisker (bump) switch. The whisker switch, which is designed by Patton Robotics, can be downloaded from Thingiverse here: https://www.thingiverse.com/thing:247.... The OneBot is controlled by a Teensy 3.2 microcontroller, which reads data from the two SPST whisker switches. This video is referenced in Chapter 22 of my textbook, "Physical Computing and Robotics Volume Two". (http://www.pcrduino.com/)

The Arduino code for this sketch is found below:

// Whisker_Navigator.ino by c.d.odom on 8.14.17
// The "servoMotionModule.ino" must be attached to the sketch!
// Power the whisker switch with 5.0V or less!

// GLOBALS
const byte leftWhiskerPin = 10; // sensor pin for left whisker switch
const byte rightWhiskerPin = 11; // sensor pin for left whisker switch
const byte leftServoPin = 0; // servo pin for LEFT wheel
const byte rightServoPin = 1; // servo pin for RIGHT wheel
const byte LEDPin = 13; // the onboard LED pin (for diagnostics)

void setup() {
pinMode(leftWhiskerPin, INPUT_PULLUP); // whisker requires internal pull-up!
pinMode(rightWhiskerPin, INPUT_PULLUP); // whisker requires internal pull-up!
pinMode(leftServoPin, OUTPUT);
pinMode(rightServoPin, OUTPUT);
pinMode(LEDPin, OUTPUT);
blinkOK(3); // a diagnostic tool to let user know all is OK
}

void loop() {
// check both whisker sensors:
int leftWhiskerValue = digitalRead(leftWhiskerPin);
int rightWhiskerValue = digitalRead(rightWhiskerPin);

// echo the sensor readings for debugging purposes:
Serial.println("Left whisker value = " + (String) leftWhiskerValue);
Serial.println("Right whisker value = " + (String) rightWhiskerValue);

// If both whiskers detect object, robot should back up then turn 180-degrees.
// If the left whisker senses an obstruction, turn robot 10-steps to the right.
// If the right whisker senses an obstruction, turn robot 10-steps to the left.
// If no obstruction is detected, have the robot take one step forward.
// Act on the whisker readings:
if ( (leftWhiskerValue == 0) && (rightWhiskerValue == 0) ) {
// if BOTH whiskers sense an object:
digitalWrite(LEDPin, HIGH); // turn ON the onboard LED
reverseFast(50); // take 50 steps backwards
rightFast(50); // turn around with 50 steps to the right
digitalWrite(LEDPin, LOW); // turn OFF the onboard LED
}

else if (leftWhiskerValue == 0) {
// if LEFT whisker senses an object:
digitalWrite(LEDPin, HIGH); // turn ON the onboard LED
rightFast(10); // turn 10 steps to the right to avoid the obstacle
digitalWrite(LEDPin, LOW); // turn OFF the onboard LED
}

else if (rightWhiskerValue == 0) {
// if RIGHT whisker senses an object:
digitalWrite(LEDPin, HIGH); // turn ON the onboard LED
leftFast(10); // turn 10 steps to the left to avoid the obstacle
digitalWrite(LEDPin, LOW); // turn OFF the onboard LED
}

else {
// if no obstacle is detected, take one step forward:
forwardStepFast(); // take one fast step forward
}
}

Комментарии

Информация по комментариям в разработке

Похожие видео

  • Pneumatic & Manual Diaphragm valves
    Pneumatic & Manual Diaphragm valves
    4 года назад
  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]