Skip to content
Snippets Groups Projects
Commit 3db40d5f authored by Jannis Nicolas Kampmann's avatar Jannis Nicolas Kampmann
Browse files

BITS1

parents
Branches master
Tags 4.22.1
No related merge requests found
/***************************************************
________ ___ _________ ________ _____
|\ __ \|\ \|\___ ___\\ ____\ / __ \
\ \ \|\ /\ \ \|___ \ \_\ \ \___|_|\/_|\ \
\ \ __ \ \ \ \ \ \ \ \_____ \|/ \ \ \
\ \ \|\ \ \ \ \ \ \ \|____|\ \ \ \ \
\ \_______\ \__\ \ \__\ ____\_\ \ \ \__\
\|_______|\|__| \|__| |\_________\ \|__|
\|_________|
Name:
BitS1 v2
Author:
Prof. Kamau
Jannis Kampmann
IFK TH Köln
**************************************************/
#include <FastLED.h>
#include <thk_imu.h>
#include <thk_motor_driver.h>
#include <thk_motor_driver_tb6612fng.h>
#include "Robotcar_functions.h"
Robotcar_functions Robotcar_functions_object;
//Definieren von Variablen
float turn_factor = 1.0;
const float distance_one = 0;
const float distance_two = 0;
int acceleration_increment = 0;
int total_velocity = 0;
int white_surface_reflection = 150;
void setup()
{ //Innerhalb dieser Funktion wird alles einmal bei Start des Arduinos aufgerufen
Robotcar_functions_object.initialise();
search_time = 1.5 * total_velocity;
}
void loop()
{ //Alles innerhalb dieser Funktion wird so lange wiederholt, wie der Arduino eingeschaltet ist
Robotcar_functions_object.serial_sensor_data_output();
Robotcar_functions_object.mode_selection();
Robotcar_functions_object.check_standby();
Robotcar_functions_object.car_on_ground();
Robotcar_functions_object.check_voltage();
Robotcar_functions_object.obstacle_avoidance();
Robotcar_functions_object.line_follow();
}
# Base Packages
Code und Bibliotheken für das Bits1 Fahrzeug
# Beschreibung
"Robotcar-BitS1"-Code angepasst auf thk-Bibliotheken.
Bibliotheken "DeviceDriverSet_xxx0" und "MPU6050_getdata" nicht mehr notwendig.
# Vorraussetzung
- Bits1 Fahrzeug
- [thk-BITS1-Bibliotheken](https://git-ce.rwth-aachen.de/bits_libs/bits1-libraries) Bibliothek
# Installation
1. Kopiere die Bibliotheken aus base-package in den Arduino libraries Ordner.
2. Umbennen der .ino Datei analog zu dem des Verzeichnisses.
3. Hochladen der .ino Datei auf das Arduino Uno Board des Bits1 Fahrzeugs.
# Anwendung
1. Bits Fahrzeug einschalten
2. Fahrzeug auf der Teststrecke platzieren
3. Fahrmodi wählen: LED Fahrmodi: grün = Line Follow, blau = Obstacle Avoidance
# Anmerkungen
- Bibliotheks Ordnerstruktur: Arduino\libaries
- Programm Ordnerstruktur: Arduino\Robotcar-BitS1
**Achtet darauf, dass der Ordner in dem sich die .ino Datei befindet den selben Namen hat wie die .ino Datei**
- Das Fahrzeug stoppt wenn es angehoben wird.
This diff is collapsed.
#!/bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
NOCOLOR='\033[0m'
bold=$(tput bold)
normal=$(tput sgr0)
echo -e "$GREEN"
echo -e "Automatischer download der Bibliotheken wird vorbereitet..."
sleep 2
echo -e "$NOCOLOR"
mkdir BITS1_Bibliotheken
echo -e "$GREEN"
echo -e "Ordner BITS1_Bibliotheken wurde erfolgreich erstellt."
echo -e " "
sleep 1
cd BITS1_Bibliotheken
echo -e "Starte download..."
sleep 1
echo -e "$NOCOLOR"
# BITS-i Bibliotheken
git clone https://git-ce.rwth-aachen.de/bits_libs/bits1-libraries.git
echo -e "$GREEN"
echo -e "Alle Bibliotheken wurden erfolgreich "
echo -e "in den Ordner BITS-i_Bibliotheken gedownloadet."
echo -e "$RED"
echo -e "__________________________________________________________________"
echo -e "__________________________________________________________________"
echo -e " "
echo -e "\033[31;7m${bold} !!!WICHTIG!!! \033[0m"
echo -e " "
echo -e "\033[31;7m${bold}Bitte kopiert alle Ordner aus BITS1_Bibliotheken in den\033[0m"
echo -e "\033[31;7m${bold}Arduino Libraries Ordner!\033[0m"
echo -e "$RED"
echo -e "__________________________________________________________________"
echo -e "__________________________________________________________________"
echo -e " "
echo -e "$GREEN"
echo -e "Wenn die Bibliotheken erfolgreich in den Arduino Libraries Ordner"
echo -n "kopiert wurden,"
read -p " mit beliebiger Taste fortfahren" x
echo -e " "
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment