Added lib and Doxyfile
|
@ -1,141 +1,241 @@
|
|||
#include "Arduino.h"
|
||||
#include <algorithm> //// std::swap
|
||||
#include <ESP32Servo.h>
|
||||
#include "esp32-hal-ledc.h"
|
||||
#include <algorithm> // std::swap
|
||||
#include <ESP32Servo.h> // Servo drive support for ESP32
|
||||
#include "esp32-hal-ledc.h" // Part of ESP32 board files - Analog output
|
||||
|
||||
#ifndef __CodeRacer_H__
|
||||
#define __CodeRacer_H__
|
||||
|
||||
//----- Taster ------------
|
||||
#define H_TASTERPIN 17
|
||||
//----- Fun stuff ---------
|
||||
#define FUN_MIN_PAUSE_MS 120000 // minimum and maximum pause between to rounds fun
|
||||
#define FUN_MAX_PAUSE_MS 300000
|
||||
#define LED_SWITCH_MS 50 // speed of knight rider lights
|
||||
//----- Button ------------
|
||||
#define H_BUTTON_PIN 17
|
||||
#define BUTTON_BOUNCING_TIME_MS 200 // bouncing delay
|
||||
//----- Servo -----
|
||||
#define H_SERVOPIN 16 // Pin an dem der Servomotor angeschlossen ist. 'GPIO' muss man weglassen -> also z.B. nicht GPIO88 sondern nur 88.
|
||||
#define H_SERVO_LINKS 145 // Wert um den Servo 45 Grad nach links zu drehen ... der kann je nach Servo anders sein
|
||||
#define H_SERVO_MITTE_LINKS 100 // Bis hier geht die Entfernungsmessung im Stand links
|
||||
#define H_SERVO_RECHTS 35 // Wert um den Servo 45 Grad nach rechtss zu drehen ... der kann je nach Servo anders sein
|
||||
#define H_SERVO_MITTE_RECHTS 80 // Bis hier geht die Entfernungsmessung im Stand rechts
|
||||
#define H_SERVO_MITTE 90 // Wert um den Servo in die Mitte zu drehen ... der kann je nach Servo anders sein
|
||||
#define H_SERVO_SCHWENK_LINKS 140
|
||||
#define H_SERVO_SCHWENK_RECHTS 40
|
||||
#define H_SERVO_PIN 16
|
||||
#define H_SERVO_LEFT_POS 145 // left position of the servo
|
||||
#define H_SERVO_CENTER_LEFT 100 // left-center position of the servo
|
||||
#define H_SERVO_RIGHT_POS 35 // right position of the servo
|
||||
#define H_SERVO_CENTER_RIGHT 80 // right-center position of the servo
|
||||
#define H_SERVO_CENTER_POS 90 // center position of the servo
|
||||
#define H_SERVO_SWEEP_LEFT_POS 140 // most left sweep position of the servo
|
||||
#define H_SERVO_SWEEP_RIGHT_POS 40 // most right sweep position of the servo
|
||||
#define SERVO_SWEEP_TO_LEFT_STEP 5 // sweep step to the left
|
||||
#define SERVO_SWEEP_TO_RIGHT_STEP -5 // sweep step to the right
|
||||
#define SERVO_SWEEP_MS 10 // duration of time betwee to sweep steps
|
||||
#define SERVO_MAX_POSITION 170 // maximum servo position
|
||||
#define SERVO_MIN_POSITION 10 // minimum servo position
|
||||
#define SERVO_SET_1TICK_POSITION_DELAY_MS 3 // minimum duration of time between two servo steps
|
||||
|
||||
#define SERVO_SCHWENK_LI 5
|
||||
#define SERVO_SCHWENK_RE -5
|
||||
#define SERVO_SCHWENK_MS 10
|
||||
//----- Ultrasonic sensor -----
|
||||
#define H_US_TRIG_PIN 12
|
||||
#define H_US_ECHO_PIN 14
|
||||
#define H_US_STOP_DISTANCE_CM 25 // if the measured distance is smaller the racer maybe stopped
|
||||
#define US_MAX_ECHO_TIME_US 6000 // timeout for ultrasonic sensor measurements - this is about 100cm
|
||||
|
||||
//----- Ultraschallsensor -----
|
||||
#define H_US_TRIG 12 // Pin an dem der TRIG Pin des Ultraschallsensor angeschlossen ist. 'GPIO' muss man weglassen -> also z.B. nicht GPIO88 sondern nur 88.
|
||||
#define H_US_ECHO 14 // Pin an dem der ECHO Pin des Ultraschallsensor angeschlossen ist. 'GPIO' muss man weglassen -> also z.B. nicht GPIO88 sondern nur 88.
|
||||
#define H_US_STOP_ABSTAND_CM 5 // Wenn der gemessene Abstand kleiner ist, hält der CodeRacer an
|
||||
#define US_MAX_ECHO_TIME_US 6000 // Wenn die Zeit für das Echo länger dauert als diese Zeit, ist der Racer weit genug weg und wir müssen nicht weiter warten.
|
||||
//----- Drives -----
|
||||
#define H_DRIVE_RIGHT_SPEED 255 // default speed of right side drive. 0 ...255
|
||||
#define H_DRIVE_LEFT_SPEED 255 // default speed of left side drive. 0 ...255
|
||||
#define H_DRIVE_RIGHT_ENABLE_PIN 2
|
||||
#define H_DRIVE_RIGHT_FWRD_PIN 4
|
||||
#define H_DRIVE_RIGHT_BACK_PIN 15
|
||||
#define H_DRIVE_LEFT_ENABLE_PIN 21
|
||||
#define H_DRIVE_LEFT_FWRD_PIN 22
|
||||
#define H_DRIVE_LEFT_BACK_PIN 23
|
||||
#define H_RACER_TURN_LEFT_FOR_MS 400 // duration of time the racer will turn to left
|
||||
#define H_RACER_TURN_RIGHT_FOR_MS 400 // duration of time the racer will turn to right
|
||||
|
||||
//----- Motoren -----
|
||||
#define H_MOTORRE_TEMPO 215 // Geschwindigkeit Motor1 ... ein Wert zwischen 0 und 255
|
||||
#define H_MOTORLI_TEMPO 212 // Geschwindigkeit Motor1 ... ein Wert zwischen 0 und 255
|
||||
#define H_MOTORRE_SPEED 2 // Pin an dem der SPEED/ENABLE Pin des rechten Motors angeschlossen ist. 'GPIO' muss man weglassen -> also z.B. nicht GPIO88 sondern nur 88.
|
||||
#define H_MOTORRE_FWRD 4 // Pin an dem der FORWÄRTS Pin des rechten Motors angeschlossen ist. Was vorwärts und rückwärts ist, muss probiert und vielleicht umgesteckt werden.'GPIO' muss man weglassen -> also z.B. nicht GPIO88 sondern nur 88.
|
||||
#define H_MOTORRE_BACK 15 // Pin an dem der RÜCKWÄRTS Pin des rechten Motors angeschlossen ist. Was vorwärts und rückwärts ist, muss probiert und vielleicht umgesteckt werden.'GPIO' muss man weglassen -> also z.B. nicht GPIO88 sondern nur 88.
|
||||
#define H_MOTORLI_SPEED 21 // Pin an dem der SPEED/ENABLE Pin des linken Motors angeschlossen ist. 'GPIO' muss man weglassen -> also z.B. nicht GPIO88 sondern nur 88.
|
||||
#define H_MOTORLI_FWRD 22 // Pin an dem der FORWÄRTS Pin des linken Motors angeschlossen ist. Was vorwärts und rückwärts ist, muss probiert und vielleicht umgesteckt werden.'GPIO' muss man weglassen -> also z.B. nicht GPIO88 sondern nur 88.
|
||||
#define H_MOTORLI_BACK 23 // Pin an dem der RÜCKWÄRTS Pin des linken Motors angeschlossen ist. Was vorwärts und rückwärts ist, muss probiert und vielleicht umgesteckt werden.'GPIO' muss man weglassen -> also z.B. nicht GPIO88 sondern nur 88.
|
||||
#define H_RACER_LINKS_MS 200 // Die Zeit in Millisekunden, die der Racer braucht um sich 45 Grad nach links zu drehen
|
||||
#define H_RACER_RECHTS_MS 200 // Die Zeit in Millisekunden, die der Racer braucht um sich 45 Grad nach rechts zu drehen
|
||||
#define DRIVE_PWM_LEFT_CHANNEL 5 // PWM-channel for left side drive
|
||||
#define DRIVE_PWM_RIGHT_CHANNEL 6 // PWM-channel for right side drive
|
||||
|
||||
#define MOTORPWM_LINKS 5 // PWM-Kanal für linken Motor
|
||||
#define MOTORPWM_RECHTS 6 // PWM-Kanal für rechten Motor
|
||||
#define MOTORRE_MAX_TEMPO 244 // Geschwindigkeit Motor1 ... ein Wert zwischen 0 und 255
|
||||
#define MOTORLI_MAX_TEMPO 240 // Geschwindigkeit Motor1 ... ein Wert zwischen 0 und 255
|
||||
//----- LEDs -----
|
||||
#define H_LED_FRWD_PIN 26
|
||||
#define H_LED_STOP_PIN 25
|
||||
#define H_LED_LEFT_PIN 33
|
||||
#define H_LED_RIGHT_PIN 27
|
||||
|
||||
#define MOTOR_MAX_SPEED_START_MS 10
|
||||
static volatile bool coderracer_activ = false;;
|
||||
static volatile unsigned long button_last_pressed_at_ms = millis();
|
||||
|
||||
//----- Werte für die LEDs -----
|
||||
#define H_LED_VORWAERTS 26 // Pin an dem die VORWÄRTS LED angeschlossen ist. 'GPIO' muss man weglassen -> also z.B. nicht GPIO88 sondern nur 88.
|
||||
#define H_LED_STOP 25 // Pin an dem die STOP LED angeschlossen ist. 'GPIO' muss man weglassen -> also z.B. nicht GPIO88 sondern nur 88.
|
||||
#define H_LED_LINKS 33 // Pin an dem die LINKS LED angeschlossen ist. 'GPIO' muss man weglassen -> also z.B. nicht GPIO88 sondern nur 88.
|
||||
#define H_LED_RECHTS 27 // Pin an dem die RECHTS LED angeschlossen ist. 'GPIO' muss man weglassen -> also z.B. nicht GPIO88 sondern nur 88.
|
||||
enum ledstate {
|
||||
LEDOFF,
|
||||
LEDON
|
||||
};
|
||||
|
||||
#define LED_SWITCH_MS 50
|
||||
|
||||
static volatile bool coderracer_activ;
|
||||
static volatile unsigned long taster_last_pressed_ms;
|
||||
enum drivestate {
|
||||
DRIVESTOP,
|
||||
DRIVEFRWD,
|
||||
DRIVEBACK
|
||||
};
|
||||
|
||||
//--- this is as preparation of the class creation
|
||||
class CodeRacer {
|
||||
|
||||
private:
|
||||
int _taster_pin;
|
||||
int _servopin;
|
||||
int _us_trigger_pin;
|
||||
int _us_echo_pin;
|
||||
int _motor_links_frwd_pin;
|
||||
int _motor_links_back_pin;
|
||||
int _motor_links_enable_pin;
|
||||
int _motor_rechts_frwd_pin;
|
||||
int _motor_rechts_back_pin;
|
||||
int _motor_rechts_enable_pin;
|
||||
int _led_frwd_pin;
|
||||
int _led_stop_pin;
|
||||
int _led_links_pin;
|
||||
int _led_rechts_pin;
|
||||
|
||||
int _servo_mitte;
|
||||
int _servo_links;
|
||||
int _servo_rechts;
|
||||
int _schwenk_links;
|
||||
int _schwenk_rechts;
|
||||
//pins
|
||||
uint8_t _button_pin;
|
||||
uint8_t _servo_pin;
|
||||
uint8_t _us_trigger_pin;
|
||||
uint8_t _us_echo_pin;
|
||||
uint8_t _drive_left_frwd_pin;
|
||||
uint8_t _drive_left_back_pin;
|
||||
uint8_t _drive_left_enable_pin;
|
||||
uint8_t _drive_right_frwd_pin;
|
||||
uint8_t _drive_right_back_pin;
|
||||
uint8_t _drive_right_enable_pin;
|
||||
uint8_t _led_frwd_pin;
|
||||
uint8_t _led_stop_pin;
|
||||
uint8_t _led_left_pin;
|
||||
uint8_t _led_right_pin;
|
||||
|
||||
int _schwenk_position;
|
||||
int _schwenk_richtung;
|
||||
long _schwenk_millis;
|
||||
//servo variables
|
||||
int8_t _servo_sweep_step;
|
||||
uint8_t _servo_position;
|
||||
unsigned long _servo_position_set_at_ms;
|
||||
unsigned long _servo_position_eta_in_ms;
|
||||
|
||||
int _motor_links_tempo;
|
||||
int _motor_rechts_tempo;
|
||||
int _drehung_links_ms;
|
||||
int _drehung_rechts_ms;
|
||||
//drives variables
|
||||
uint8_t _drive_left_speed;
|
||||
uint8_t _drive_right_speed;
|
||||
unsigned long _turn_left_for_ms;
|
||||
unsigned long _turn_right_for_ms;
|
||||
|
||||
bool _drive_forward;
|
||||
long _drive_forward_ms;
|
||||
bool _drive_normal_forward;
|
||||
bool _schwenk;
|
||||
// ultrasonic variables
|
||||
bool _coderacer_stopped_at_min_distance;
|
||||
bool _coderacer_stop_at_distance_enabled;
|
||||
unsigned long _usonic_stop_distance_cm;
|
||||
unsigned long _usonic_stop_distance_us;
|
||||
unsigned long _usonic_distance_us;
|
||||
unsigned long _usonic_distance_cm;
|
||||
|
||||
long _min_abstand_cm;
|
||||
//fun stuff variables
|
||||
unsigned long _last_led_switched_at_ms;
|
||||
uint8_t _led_count;
|
||||
uint8_t _last_led_on;
|
||||
unsigned long _servo_look_around_at_ms;
|
||||
|
||||
|
||||
static void set_taster_state();
|
||||
unsigned long _min_distance_cm;
|
||||
bool _drive;
|
||||
unsigned long _drive_set_at_ms;
|
||||
bool _servo_sweep;
|
||||
bool _coderracer_activ;
|
||||
|
||||
//objects
|
||||
Servo* _servo;
|
||||
Servo* _servo_dummy;
|
||||
|
||||
void analog_write(int pin, int speed);
|
||||
int _coderracer_activ;
|
||||
|
||||
long abstand_messen_intern();
|
||||
|
||||
long _last_ledswitch_ms;
|
||||
int _led_count;
|
||||
int _last_led_on;
|
||||
|
||||
long _servo_look_around_ms;
|
||||
static void _set_button_state();
|
||||
void _analog_write(uint8_t pin, uint8_t speed);
|
||||
unsigned long _servo_set_position(uint8_t position);
|
||||
|
||||
public:
|
||||
//properties
|
||||
bool coderacer_fun_enabled;
|
||||
|
||||
uint8_t servo_center_pos; /**< The position the servo is looking straight forward. Default is 90 . Allowed are values 10<=pos<=170 */
|
||||
uint8_t servo_left_pos; /**< The position the servo is looking to the left. Default is 170 . Allowed are values 10<=pos<=170 */
|
||||
uint8_t servo_right_pos; /**< The position the servo is looking to the right. Default is 0 . Allowed are values 10<=pos<=170 */
|
||||
uint8_t servo_sweep_left_pos; /**< When the servo is sweeping this is the left most position */
|
||||
uint8_t servo_sweep_right_pos; /**< When the servo is sweeping this is the right most position */
|
||||
|
||||
//methods
|
||||
CodeRacer();
|
||||
|
||||
CodeRacer(int tasterpin, int servopin,
|
||||
int us_trigger_pin, int us_echo_pin,
|
||||
int motor_links_frwd_pin, int motor_links_back_pin, int motor_links_enable_pin,
|
||||
int motor_rechts_frwd_pin, int motor_rechts_back_pin, int motor_rechts_enable_pin,
|
||||
int led_frwd, int led_stop, int led_links, int led_rechts
|
||||
);
|
||||
CodeRacer(uint8_t button_pin, uint8_t servo_pin,
|
||||
uint8_t us_trigger_pin, uint8_t us_echo_pin,
|
||||
uint8_t drive_left_frwd_pin, uint8_t drive_left_back_pin, uint8_t drive_left_enable_pin,
|
||||
uint8_t drive_right_frwd_pin, uint8_t drive_right_back_pin, uint8_t drive_right_enable_pin,
|
||||
uint8_t led_frwd_pin, uint8_t led_stop_pin, uint8_t led_left_pin, uint8_t led_right_pin);
|
||||
|
||||
void set_inactive();
|
||||
void set_active();
|
||||
|
||||
void begin();
|
||||
|
||||
void servo_einstellungen(int winkel_mitte, int winkel_links, int winkel_rechts, int schwenk_links, int schwenk_rechts);
|
||||
void motor_einstellungen(int motor_links_tempo, int motor_rechts_tempo, int drehung_links_ms, int drehung_rechts_ms);
|
||||
// getters
|
||||
bool is_active();
|
||||
bool is_driving();
|
||||
bool stopped_at_min_distance();
|
||||
unsigned long usonic_distance_cm();
|
||||
unsigned long usonic_distance_us();
|
||||
uint8_t servo_position();
|
||||
unsigned long servo_position_set_at_ms();
|
||||
unsigned long servo_position_eta_in_ms();
|
||||
uint8_t drive_left_speed();
|
||||
uint8_t drive_right_speed();
|
||||
unsigned long turn_left_for_ms();
|
||||
unsigned long turn_right_for_ms();
|
||||
|
||||
// higher level {code}racer services
|
||||
void stop_driving();
|
||||
void drive_forward();
|
||||
void drive_forward(uint8_t left_speed, uint8_t right_speed);
|
||||
void drive_backward();
|
||||
void drive_backward(uint8_t left_speed, uint8_t right_speed);
|
||||
void turn_left();
|
||||
void turn_left(unsigned long turn_for_ms);
|
||||
void turn_left(unsigned long turn_for_ms, uint8_t left_speed, uint8_t right_speed);
|
||||
void turn_right();
|
||||
void turn_right(unsigned long turn_for_ms);
|
||||
void turn_right(unsigned long turn_for_ms, uint8_t left_speed, uint8_t right_speed);
|
||||
|
||||
void start_stop_at_min_distance();
|
||||
void start_stop_at_min_distance(unsigned long min_distance_cm);
|
||||
void stop_stop_at_min_distance();
|
||||
|
||||
|
||||
// LEDs
|
||||
void set_leds_left_stop_frwd_right(ledstate leftled, ledstate stopled, ledstate frwdled, ledstate rightled);
|
||||
void set_leds_all(ledstate alleds);
|
||||
void set_leds_all_off();
|
||||
void set_leds_all_on();
|
||||
|
||||
// Drives
|
||||
void drives_settings(uint8_t drive_left_speed, uint8_t drive_right_speed, unsigned long turn_left_ms, unsigned long turn_right_ms);
|
||||
void set_drives_states_left_right(drivestate stateleft, drivestate stateright);
|
||||
void set_drive_left_state(drivestate state);
|
||||
void set_drive_right_state(drivestate state);
|
||||
void set_drive_state(drivestate state, uint8_t frwdpin, uint8_t backpin);
|
||||
void set_drives_speed_left_right(uint8_t speedleft, uint8_t speedright);
|
||||
void set_drive_left_speed(uint8_t speed);
|
||||
void set_drive_right_speed(uint8_t speed);
|
||||
void set_drive_speed(uint8_t speed, uint8_t enablepin);
|
||||
void set_drives_stop_left_right();
|
||||
|
||||
// Ultrasonic sensor
|
||||
unsigned long usonic_measure_cm();
|
||||
unsigned long usonic_measure_us();
|
||||
unsigned long usonic_measure_cm(unsigned long max_echo_run_time_us);
|
||||
unsigned long usonic_measure_us(unsigned long max_echo_run_time_us);
|
||||
unsigned long usonic_measure_single_shot_cm();
|
||||
unsigned long usonic_measure_single_shot_us();
|
||||
unsigned long usonic_measure_single_shot_cm(unsigned long max_echo_run_time_us);
|
||||
unsigned long usonic_measure_single_shot_us(unsigned long max_echo_run_time_us);
|
||||
void usonic_set_stop_distance_cm(unsigned long stop_distance_cm);
|
||||
void usonic_set_stop_distance_us(unsigned long stop_distance_us);
|
||||
|
||||
// Servo drive
|
||||
void servo_settings(uint8_t pos_center, uint8_t pos_left, uint8_t pos_right, uint8_t sweep_left_pos, uint8_t sweep_right_pos);
|
||||
uint8_t servo_set_position_wait(uint8_t position);
|
||||
unsigned long servo_set_position(uint8_t position);
|
||||
void servo_set_to_right();
|
||||
void servo_set_to_left();
|
||||
void servo_set_to_center();
|
||||
void servo_sweep();
|
||||
|
||||
// just for fun
|
||||
void kitt();
|
||||
void look_around();
|
||||
|
||||
// previous OBSOLETE german language definitions of the methods - still needed to support MakerLab Murnau {code}racer project
|
||||
// - but use the english ones for new implementations
|
||||
void servo_einstellungen(uint8_t winkel_mitte, uint8_t winkel_links, uint8_t winkel_rechts, uint8_t schwenk_links, uint8_t schwenk_rechts);
|
||||
void motor_einstellungen(uint8_t motor_links_tempo, uint8_t motor_rechts_tempo, unsigned long drehung_links_ms, unsigned long drehung_rechts_ms);
|
||||
void anhalten();
|
||||
void normal_tempo();
|
||||
void vorwaerts();
|
||||
void rueckwaerts();
|
||||
void links();
|
||||
|
@ -143,11 +243,9 @@ class CodeRacer {
|
|||
void servo_rechts();
|
||||
void servo_links();
|
||||
void servo_mitte();
|
||||
long abstand_messen();
|
||||
unsigned long abstand_messen();
|
||||
void servo_schwenk();
|
||||
void knight_rider();
|
||||
bool start_stop();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,56 +1,97 @@
|
|||
#include <CodeRacer.h>
|
||||
|
||||
//----- Werte für den Ultraschallsensor -----
|
||||
#define US_STOP_ABSTAND_CM 15 // Wenn der gemessene Abstand kleiner ist, hält der CodeRacer an
|
||||
//----- settings for the ultrasonic sensor -----
|
||||
#define US_STOP_ABSTAND_CM 20 // if distance goes below that - stop the racer
|
||||
|
||||
//----- Variablen, die wir brauchen um uns Werte zu merken ----
|
||||
long abstand_vorn_cm, abstand_links_cm, abstand_rechts_cm;
|
||||
//----- {CODES}RACER API -> online: https://doc.itsblue.de/Fenoglio/coderacer/Doku/Doxygen/html/
|
||||
//-- Some main higher level methods listed below
|
||||
// void CodeRacer::stop_driving () Stops the racer and sets status LEDs
|
||||
// void CodeRacer::drive_forward () Sets the speed and the directions of both drives so that it will move forward.
|
||||
// void CodeRacer::drive_backward () Sets the speed and the directions of both drives so that it will move backward.
|
||||
// void CodeRacer::turn_left () Will turn the racer to the left for the internally stored time in ms and with the internally stored speed.
|
||||
// void CodeRacer::turn_right () Will turn the racer to the right for the internally stored time in ms and with the internally stored speed.
|
||||
// void CodeRacer::start_stop_at_min_distance () Enables to stopp the racer if during a distance measurement the measured distance is smaller then the internally stored minimal distance.
|
||||
// void CodeRacer::stop_stop_at_min_distance () Disables to stopp the racer if during a distance measurement the measured distance is smaller then the specified minimal distance.
|
||||
// bool CodeRacer::start_stop () This will return if the codracer is in active mode or not.
|
||||
// void CodeRacer::servo_set_to_right () Drives the servo to the postion that is defined by #servo_right_pos.
|
||||
// void CodeRacer::servo_set_to_left () Drives the servo to the postion that is defined by #servo_left_pos.
|
||||
// void CodeRacer::servo_set_to_center () Drives the servo to the postion that is defined by #servo_center_pos.
|
||||
// uint8_t CodeRacer::servo_position () Get the actual position of the servo.
|
||||
// unsigned long CodeRacer::usonic_measure_cm () Measures the distance to the next object in front of the ultra sonic sensor in cm.
|
||||
//
|
||||
// ... there are much more ... read the online API for more details.
|
||||
|
||||
//----- variables we need
|
||||
unsigned long distance_cm = 0;
|
||||
|
||||
//---- construct the coderacer object
|
||||
CodeRacer coderacer;
|
||||
// Das kann der coderacer:
|
||||
// coderacer.start_stop() Abfragen ob der Racer fahren soll oder nicht ... wenn er fahren soll kommt der Wert 'true' zurück, wenn er stopppen soll der Wert 'false'
|
||||
// coderacer.servo_schwenk() Abstandssensor hin und her verstellen
|
||||
// coderacer.abstand_messen(); Abstand messen - es kommt ein Wert in cm zurück
|
||||
// coderacer.servo_mitte(); nach vorn "schauen"
|
||||
// coderacer.servo_rechts(); nach rechts "schauen"
|
||||
// coderacer.servo_links(); nach links "schauen"
|
||||
// coderacer.links(); nach links drehen
|
||||
// coderacer.rechts(); nach rechts drehen
|
||||
// coderacer.vorwaerts(); Vorwaerts fahren
|
||||
// coderacer.anhalten(); Racer anhalten
|
||||
|
||||
//---- Hier startet der Code zum Einstellen aller wichtigen Dinge. Setup() wird einmal ausgeführt. ----
|
||||
//---- set up code - executed ones
|
||||
void setup() {
|
||||
// Monitor
|
||||
Serial.begin(115200); // Serial Monitor aktivieren. Mit dem Monitor kann man sich Werte und Meldungen anzeigen lassen.
|
||||
|
||||
// CodeRacer initialisieren
|
||||
// start serial monitor
|
||||
Serial.begin(115200);
|
||||
// initialize the coderacer
|
||||
coderacer.begin();
|
||||
|
||||
// nach links und rechts schauen ... :-)
|
||||
coderacer.servo_links();
|
||||
delay(10);
|
||||
coderacer.servo_rechts();
|
||||
delay(10);
|
||||
coderacer.servo_mitte();
|
||||
|
||||
// enable fun stuff
|
||||
coderacer.coderacer_fun_enabled = true;
|
||||
// look to the left, to the right and to center... :-)
|
||||
coderacer.servo_set_to_left();
|
||||
delay(100);
|
||||
coderacer.servo_set_to_right();
|
||||
delay(100);
|
||||
coderacer.servo_set_to_center();
|
||||
delay(100);
|
||||
}
|
||||
|
||||
//---- Hier startet unsere endlose Schleife - die immer wieder von vorn angefangen wird, wenn wir am Ende angekommen sind. Da ist unser "Fahr"Code drin, der den CodeRacer steuert
|
||||
//---- 'endless' loop
|
||||
void loop() {
|
||||
|
||||
// Abstand messen -> dort wo der coderacer gerade "hinschaut". Der gemessene Abstand ist in abstand_vorn_cm gespeichert
|
||||
abstand_vorn_cm = coderacer.abstand_messen();
|
||||
|
||||
// Abfragen ob der Racer fahren soll oder nicht ...
|
||||
// check if the racer was started (button was toggled to coderacer active state
|
||||
if(true == coderacer.start_stop()){
|
||||
|
||||
Serial.print("Speed of right side drive: ");
|
||||
Serial.println(coderacer.drive_right_speed());
|
||||
Serial.print("Speed of left side drive: ");
|
||||
Serial.println(coderacer.drive_left_speed());
|
||||
|
||||
// measure the distance - at the position of the servo
|
||||
distance_cm = coderacer.usonic_measure_cm();
|
||||
|
||||
// Abstandssensor verstellen ...
|
||||
coderacer.servo_schwenk();
|
||||
coderacer.start_stop_at_min_distance(US_STOP_ABSTAND_CM);
|
||||
while(!coderacer.stopped_at_min_distance()){
|
||||
|
||||
// hier kommt Euer Code zu steuern des coderacers hinein ...
|
||||
Serial.print("Distanc in cm: ");
|
||||
Serial.println(distance_cm);
|
||||
|
||||
if(distance_cm > 50){
|
||||
coderacer.drive_forward();
|
||||
coderacer.servo_sweep();
|
||||
}
|
||||
else if(distance_cm > 40){
|
||||
coderacer.turn_right();
|
||||
}
|
||||
else if(distance_cm > 30){
|
||||
coderacer.turn_left();
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
coderacer.drive_backward();
|
||||
}
|
||||
|
||||
// measure the distance - at the position of the servo
|
||||
distance_cm = coderacer.usonic_measure_cm();
|
||||
|
||||
}
|
||||
|
||||
Serial.println("***** STOPPED ***** ");
|
||||
Serial.print("Measured stop distanc of cm: ");
|
||||
Serial.println(distance_cm);
|
||||
Serial.print("Measured at servo position of: ");
|
||||
Serial.println(coderacer.servo_position());
|
||||
|
||||
coderacer.set_inactive();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
CodeRacer KEYWORD1
|
||||
begin KEYWORD2
|
||||
servo_einstellungen KEYWORD2
|
||||
motor_einstellungen KEYWORD2
|
||||
anhalten KEYWORD2
|
||||
normal_tempo KEYWORD2
|
||||
vorwaerts KEYWORD2
|
||||
links KEYWORD2
|
||||
rechts KEYWORD2
|
||||
servo_rechts KEYWORD2
|
||||
servo_links KEYWORD2
|
||||
servo_mitte KEYWORD2
|
||||
abstand_messen KEYWORD2
|
||||
servo_schwenk KEYWORD2
|
||||
start_stop KEYWORD2
|
87
Arduino/libraries/ESP32Servo/README.md
Normal file
|
@ -0,0 +1,87 @@
|
|||
# Servo Library for ESP32
|
||||
|
||||
This library attempts to faithfully replicate the semantics of the
|
||||
Arduino Servo library (see http://www.arduino.cc/en/Reference/Servo)
|
||||
for the ESP32, with two (optional) additions. The two new functions
|
||||
expose the ability of the ESP32 PWM timers to vary timer width.
|
||||
|
||||
## License
|
||||
|
||||
Copyright (c) 2017 John K. Bennett. All right reserved.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
## Library Description:
|
||||
```
|
||||
Servo - Class for manipulating servo motors connected to ESP32 pins.
|
||||
|
||||
int attach(pin ) - Attaches the given GPIO pin to the next free channel
|
||||
(channels that have previously been detached are used first),
|
||||
returns channel number or 0 if failure. All pin numbers are allowed,
|
||||
but only pins 2,4,12-19,21-23,25-27,32-33 are recommended.
|
||||
|
||||
int attach(pin, min, max ) - Attaches to a pin setting min and max
|
||||
values in microseconds; enforced minimum min is 500, enforced max
|
||||
is 2500. Other semantics are the same as attach().
|
||||
|
||||
void write () - Sets the servo angle in degrees; a value below 500 is
|
||||
treated as a value in degrees (0 to 180). These limit are enforced,
|
||||
i.e., values are constrained as follows:
|
||||
Value Becomes
|
||||
----- -------
|
||||
< 0 0
|
||||
0 - 180 value (treated as degrees)
|
||||
181 - 499 180
|
||||
500 - (min-1) min
|
||||
min-max (from attach or default) value (treated as microseconds)
|
||||
(max+1) - 2500 max
|
||||
|
||||
void writeMicroseconds() - Sets the servo pulse width in microseconds.
|
||||
min and max are enforced (see above).
|
||||
|
||||
int read() - Gets the last written servo pulse width as an angle between 0 and 180.
|
||||
|
||||
int readMicroseconds() - Gets the last written servo pulse width in microseconds.
|
||||
|
||||
bool attached() - Returns true if this servo instance is attached to a pin.
|
||||
|
||||
void detach() - Stops an the attached servo, frees the attached pin, and frees
|
||||
its channel for reuse.
|
||||
```
|
||||
|
||||
### **New ESP32-specific functions**
|
||||
|
||||
```
|
||||
setTimerWidth(value) - Sets the PWM timer width (must be 16-20) (ESP32 ONLY);
|
||||
as a side effect, the pulse width is recomputed.
|
||||
|
||||
int readTimerWidth() - Gets the PWM timer width (ESP32 ONLY)
|
||||
```
|
||||
|
||||
### Useful Defaults:
|
||||
|
||||
default min pulse width for attach(): 544us
|
||||
|
||||
default max pulse width for attach(): 2400us
|
||||
|
||||
default timer width 16 (if timer width is not set)
|
||||
|
||||
default pulse width 1500us (servos are initialized with this value)
|
||||
|
||||
MINIMUM pulse with: 500us
|
||||
|
||||
MAXIMUM pulse with: 2500us
|
||||
|
||||
MAXIMUM number of servos: 16 (this is the number of PWM channels in the ESP32)
|
69
Arduino/libraries/ESP32Servo/examples/Knob/Knob.ino
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
Controlling a servo position using a potentiometer (variable resistor)
|
||||
by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>
|
||||
|
||||
modified on 8 Nov 2013
|
||||
by Scott Fitzgerald
|
||||
|
||||
modified for the ESP32 on March 2017
|
||||
by John Bennett
|
||||
|
||||
see http://www.arduino.cc/en/Tutorial/Knob for a description of the original code
|
||||
|
||||
* Different servos require different pulse widths to vary servo angle, but the range is
|
||||
* an approximately 500-2500 microsecond pulse every 20ms (50Hz). In general, hobbyist servos
|
||||
* sweep 180 degrees, so the lowest number in the published range for a particular servo
|
||||
* represents an angle of 0 degrees, the middle of the range represents 90 degrees, and the top
|
||||
* of the range represents 180 degrees. So for example, if the range is 1000us to 2000us,
|
||||
* 1000us would equal an angle of 0, 1500us would equal 90 degrees, and 2000us would equal 1800
|
||||
* degrees.
|
||||
*
|
||||
* Circuit: (using an ESP32 Thing from Sparkfun)
|
||||
* Servo motors have three wires: power, ground, and signal. The power wire is typically red,
|
||||
* the ground wire is typically black or brown, and the signal wire is typically yellow,
|
||||
* orange or white. Since the ESP32 can supply limited current at only 3.3V, and servos draw
|
||||
* considerable power, we will connect servo power to the VBat pin of the ESP32 (located
|
||||
* near the USB connector). THIS IS ONLY APPROPRIATE FOR SMALL SERVOS.
|
||||
*
|
||||
* We could also connect servo power to a separate external
|
||||
* power source (as long as we connect all of the grounds (ESP32, servo, and external power).
|
||||
* In this example, we just connect ESP32 ground to servo ground. The servo signal pins
|
||||
* connect to any available GPIO pins on the ESP32 (in this example, we use pin 18.
|
||||
*
|
||||
* In this example, we assume a Tower Pro SG90 small servo connected to VBat.
|
||||
* The published min and max for this servo are 500 and 2400, respectively.
|
||||
* These values actually drive the servos a little past 0 and 180, so
|
||||
* if you are particular, adjust the min and max values to match your needs.
|
||||
*/
|
||||
|
||||
// Include the ESP32 Arduino Servo Library instead of the original Arduino Servo Library
|
||||
#include <ESP32Servo.h>
|
||||
|
||||
Servo myservo; // create servo object to control a servo
|
||||
|
||||
// Possible PWM GPIO pins on the ESP32: 0(used by on-board button),2,4,5(used by on-board LED),12-19,21-23,25-27,32-33
|
||||
int servoPin = 18; // GPIO pin used to connect the servo control (digital out)
|
||||
// Possible ADC pins on the ESP32: 0,2,4,12-15,32-39; 34-39 are recommended for analog input
|
||||
int potPin = 34; // GPIO pin used to connect the potentiometer (analog in)
|
||||
int ADC_Max = 4096; // This is the default ADC max value on the ESP32 (12 bit ADC width);
|
||||
// this width can be set (in low-level oode) from 9-12 bits, for a
|
||||
// a range of max values of 512-4096
|
||||
|
||||
int val; // variable to read the value from the analog pin
|
||||
|
||||
void setup()
|
||||
{
|
||||
myservo.attach(servoPin, 500, 2400); // attaches the servo on pin 18 to the servo object
|
||||
// using SG90 servo min/max of 500us and 2400us
|
||||
// for MG995 large servo, use 1000us and 2000us,
|
||||
// which are the defaults, so this line could be
|
||||
// "myservo.attach(servoPin);"
|
||||
}
|
||||
|
||||
void loop() {
|
||||
val = analogRead(potPin); // read the value of the potentiometer (value between 0 and 1023)
|
||||
val = map(val, 0, ADC_Max, 0, 180); // scale it to use it with the servo (value between 0 and 180)
|
||||
myservo.write(val); // set the servo position according to the scaled value
|
||||
delay(200); // wait for the servo to get there
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* ESP32 Servo Example Using Arduino ESP32 Servo Library
|
||||
* John K. Bennett
|
||||
* March, 2017
|
||||
*
|
||||
* This sketch uses the Arduino ESP32 Servo Library to sweep 4 servos in sequence.
|
||||
*
|
||||
* Different servos require different pulse widths to vary servo angle, but the range is
|
||||
* an approximately 500-2500 microsecond pulse every 20ms (50Hz). In general, hobbyist servos
|
||||
* sweep 180 degrees, so the lowest number in the published range for a particular servo
|
||||
* represents an angle of 0 degrees, the middle of the range represents 90 degrees, and the top
|
||||
* of the range represents 180 degrees. So for example, if the range is 1000us to 2000us,
|
||||
* 1000us would equal an angle of 0, 1500us would equal 90 degrees, and 2000us would equal 1800
|
||||
* degrees.
|
||||
*
|
||||
* Circuit:
|
||||
* Servo motors have three wires: power, ground, and signal. The power wire is typically red,
|
||||
* the ground wire is typically black or brown, and the signal wire is typically yellow,
|
||||
* orange or white. Since the ESP32 can supply limited current at only 3.3V, and servos draw
|
||||
* considerable power, we will connect servo power to the VBat pin of the ESP32 (located
|
||||
* near the USB connector). THIS IS ONLY APPROPRIATE FOR SMALL SERVOS.
|
||||
*
|
||||
* We could also connect servo power to a separate external
|
||||
* power source (as long as we connect all of the grounds (ESP32, servo, and external power).
|
||||
* In this example, we just connect ESP32 ground to servo ground. The servo signal pins
|
||||
* connect to any available GPIO pins on the ESP32 (in this example, we use pins
|
||||
* 22, 19, 23, & 18).
|
||||
*
|
||||
* In this example, we assume four Tower Pro SG90 small servos.
|
||||
* The published min and max for this servo are 500 and 2400, respectively.
|
||||
* These values actually drive the servos a little past 0 and 180, so
|
||||
* if you are particular, adjust the min and max values to match your needs.
|
||||
* Experimentally, 550 and 2350 are pretty close to 0 and 180.
|
||||
*/
|
||||
|
||||
#include <ESP32Servo.h>
|
||||
|
||||
// create four servo objects
|
||||
Servo servo1;
|
||||
Servo servo2;
|
||||
Servo servo3;
|
||||
Servo servo4;
|
||||
|
||||
// Published values for SG90 servos; adjust if needed
|
||||
int minUs = 500;
|
||||
int maxUs = 2400;
|
||||
|
||||
// These are all GPIO pins on the ESP32
|
||||
// Recommended pins include 2,4,12-19,21-23,25-27,32-33
|
||||
int servo1Pin = 18;
|
||||
int servo2Pin = 19;
|
||||
int servo3Pin = 22;
|
||||
int servo4Pin = 23;
|
||||
|
||||
int pos = 0; // position in degrees
|
||||
|
||||
void setup()
|
||||
{
|
||||
servo1.attach(servo1Pin, minUs, maxUs);
|
||||
servo2.attach(servo2Pin, minUs, maxUs);
|
||||
servo3.attach(servo3Pin, minUs, maxUs);
|
||||
servo4.attach(servo4Pin, minUs, maxUs);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
for (pos = 0; pos <= 180; pos += 1) { // sweep from 0 degrees to 180 degrees
|
||||
// in steps of 1 degree
|
||||
servo1.write(pos);
|
||||
delay(20); // waits 20ms for the servo to reach the position
|
||||
}
|
||||
for (pos = 180; pos >= 0; pos -= 1) { // sweep from 180 degrees to 0 degrees
|
||||
servo1.write(pos);
|
||||
delay(20);
|
||||
}
|
||||
|
||||
for (pos = 0; pos <= 180; pos += 1) { // sweep from 0 degrees to 180 degrees
|
||||
// in steps of 1 degree
|
||||
servo2.write(pos);
|
||||
delay(20); // waits 20ms for the servo to reach the position
|
||||
}
|
||||
for (pos = 180; pos >= 0; pos -= 1) { // sweep from 180 degrees to 0 degrees
|
||||
servo2.write(pos);
|
||||
delay(20);
|
||||
}
|
||||
|
||||
for (pos = 0; pos <= 180; pos += 1) { // sweep from 0 degrees to 180 degrees
|
||||
// in steps of 1 degree
|
||||
servo3.write(pos);
|
||||
delay(20); // waits 20ms for the servo to reach the position
|
||||
}
|
||||
for (pos = 180; pos >= 0; pos -= 1) { // sweep from 180 degrees to 0 degrees
|
||||
servo3.write(pos);
|
||||
delay(20);
|
||||
}
|
||||
|
||||
for (pos = 0; pos <= 180; pos += 1) { // sweep from 0 degrees to 180 degrees
|
||||
// in steps of 1 degree
|
||||
servo4.write(pos);
|
||||
delay(20); // waits 20ms for the servo to reach the position
|
||||
}
|
||||
for (pos = 180; pos >= 0; pos -= 1) { // sweep from 180 degrees to 0 degrees
|
||||
servo4.write(pos);
|
||||
delay(20);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
/*
|
||||
* ESP32 Servo Example
|
||||
* John K. Bennett
|
||||
* March, 2017
|
||||
*
|
||||
* This sketch uses low-level ESP32 PWM functionality to sweep 4 servos in sequence.
|
||||
* It does NOT use the ESP32_Servo library for Arduino.
|
||||
*
|
||||
* The ESP32 supports 16 hardware LED PWM channels that are intended
|
||||
* to be used for LED brightness control. The low level ESP32 code allows us to set the
|
||||
* PWM frequency and bit-depth, and then control them by setting bits in the relevant control
|
||||
* register. The core files esp32-hal-ledc.* provides helper functions to make this set up
|
||||
* straightforward.
|
||||
*
|
||||
* Different servos require different pulse widths to vary servo angle, but the range is
|
||||
* an approximately 500-2500 microsecond pulse every 20ms (50Hz). In general, hobbyist servos
|
||||
* sweep 180 degrees, so the lowest number in the published range for a particular servo
|
||||
* represents an angle of 0 degrees, the middle of the range represents 90 degrees, and the top
|
||||
* of the range represents 180 degrees. So for example, if the range is 1000us to 2000us,
|
||||
* 1000us would equal an angle of 0, 1500us would equal 90 degrees, and 2000us would equal 1800
|
||||
* degrees.
|
||||
*
|
||||
* The ESP32 PWM timers allow us to set the timer width (max 20 bits). Thus
|
||||
* the timer "tick" length is (pulse_period/2**timer_width), and the equation for pulse_high_width
|
||||
* (the portion of cycle (20ms in our case) that the signal is high) becomes:
|
||||
*
|
||||
* pulse_high_width = count * tick_length
|
||||
* = count * (pulse_period/2**timer_width)
|
||||
*
|
||||
* and count = (pulse_high_width / (pulse_period/2**timer_width))
|
||||
*
|
||||
* For example, if we want a 1500us pulse_high_width, we set pulse_period to 20ms (20000us)
|
||||
* (this value is set in the ledcSetup call), and count (used in the ledcWrite call) to
|
||||
* 1500/(20000/65655), or 4924. This is the value we write to the timer in the ledcWrite call.
|
||||
*
|
||||
* As a concrete example, suppose we want to repeatedly sweep four Tower Pro SG90 servos
|
||||
* from 0 to 180 degrees. The published pulse width range for the SG90 is 500-2400us. Thus,
|
||||
* we should vary the count used in ledcWrite from 1638 to 7864.
|
||||
*
|
||||
* Circuit:
|
||||
* Servo motors have three wires: power, ground, and signal. The power wire is typically red,
|
||||
* the ground wire is typically black or brown, and the signal wire is typically yellow,
|
||||
* orange or white. Since the ESP32 can supply limited current at only 3.3V, and servos draw
|
||||
* considerable power, we will connect servo power to the VBat pin of the ESP32 (located
|
||||
* near the USB connector). THIS IS ONLY APPROPRIATE FOR SMALL SERVOS.
|
||||
*
|
||||
* We could also connect servo power to a separate external
|
||||
* power source (as long as we connect all of the grounds (ESP32, servo, and external power).
|
||||
* In this example, we just connect ESP32 ground to servo ground. The servo signal pins
|
||||
* connect to any available GPIO pins on the ESP32 (in this example, we use pins
|
||||
* 22, 19, 23, & 18).
|
||||
*
|
||||
* In this example, we assume four Tower Pro SG90 small servos.
|
||||
* The published min and max for this servo are 500 and 2400, respectively.
|
||||
* These values actually drive the servos a little past 0 and 180, so
|
||||
* if you are particular, adjust the min and max values to match your needs.
|
||||
* Experimentally, 550us and 2350us are pretty close to 0 and 180.
|
||||
*
|
||||
* This code was inspired by a post on Hackaday by Elliot Williams.
|
||||
*/
|
||||
|
||||
// Values for TowerPro SG90 small servos; adjust if needed
|
||||
#define COUNT_LOW 1638
|
||||
#define COUNT_HIGH 7864
|
||||
|
||||
#define TIMER_WIDTH 16
|
||||
|
||||
#include "esp32-hal-ledc.h"
|
||||
|
||||
void setup() {
|
||||
ledcSetup(1, 50, TIMER_WIDTH); // channel 1, 50 Hz, 16-bit width
|
||||
ledcAttachPin(22, 1); // GPIO 22 assigned to channel 1
|
||||
|
||||
ledcSetup(2, 50, TIMER_WIDTH); // channel 2, 50 Hz, 16-bit width
|
||||
ledcAttachPin(19, 2); // GPIO 19 assigned to channel 2
|
||||
|
||||
ledcSetup(3, 50, TIMER_WIDTH); // channel 3, 50 Hz, 16-bit width
|
||||
ledcAttachPin(23, 3); // GPIO 23 assigned to channel 3
|
||||
|
||||
ledcSetup(4, 50, TIMER_WIDTH); // channel 4, 50 Hz, 16-bit width
|
||||
ledcAttachPin(18, 4); // GPIO 18 assigned to channel 4
|
||||
}
|
||||
|
||||
void loop() {
|
||||
for (int i=COUNT_LOW ; i < COUNT_HIGH ; i=i+100)
|
||||
{
|
||||
ledcWrite(1, i); // sweep servo 1
|
||||
delay(200);
|
||||
}
|
||||
|
||||
for (int i=COUNT_LOW ; i < COUNT_HIGH ; i=i+100)
|
||||
{
|
||||
ledcWrite(2, i); // sweep servo 2
|
||||
delay(200);
|
||||
}
|
||||
|
||||
for (int i=COUNT_LOW ; i < COUNT_HIGH ; i=i+100)
|
||||
{
|
||||
ledcWrite(3, i); // sweep the servo
|
||||
delay(200);
|
||||
}
|
||||
|
||||
for (int i=COUNT_LOW ; i < COUNT_HIGH ; i=i+100)
|
||||
{
|
||||
ledcWrite(4, i); // sweep the servo
|
||||
delay(200);
|
||||
}
|
||||
}
|
||||
|
66
Arduino/libraries/ESP32Servo/examples/Sweep/Sweep.ino
Normal file
|
@ -0,0 +1,66 @@
|
|||
/* Sweep
|
||||
by BARRAGAN <http://barraganstudio.com>
|
||||
This example code is in the public domain.
|
||||
|
||||
modified 8 Nov 2013
|
||||
by Scott Fitzgerald
|
||||
|
||||
modified for the ESP32 on March 2017
|
||||
by John Bennett
|
||||
|
||||
see http://www.arduino.cc/en/Tutorial/Sweep for a description of the original code
|
||||
|
||||
* Different servos require different pulse widths to vary servo angle, but the range is
|
||||
* an approximately 500-2500 microsecond pulse every 20ms (50Hz). In general, hobbyist servos
|
||||
* sweep 180 degrees, so the lowest number in the published range for a particular servo
|
||||
* represents an angle of 0 degrees, the middle of the range represents 90 degrees, and the top
|
||||
* of the range represents 180 degrees. So for example, if the range is 1000us to 2000us,
|
||||
* 1000us would equal an angle of 0, 1500us would equal 90 degrees, and 2000us would equal 1800
|
||||
* degrees.
|
||||
*
|
||||
* Circuit: (using an ESP32 Thing from Sparkfun)
|
||||
* Servo motors have three wires: power, ground, and signal. The power wire is typically red,
|
||||
* the ground wire is typically black or brown, and the signal wire is typically yellow,
|
||||
* orange or white. Since the ESP32 can supply limited current at only 3.3V, and servos draw
|
||||
* considerable power, we will connect servo power to the VBat pin of the ESP32 (located
|
||||
* near the USB connector). THIS IS ONLY APPROPRIATE FOR SMALL SERVOS.
|
||||
*
|
||||
* We could also connect servo power to a separate external
|
||||
* power source (as long as we connect all of the grounds (ESP32, servo, and external power).
|
||||
* In this example, we just connect ESP32 ground to servo ground. The servo signal pins
|
||||
* connect to any available GPIO pins on the ESP32 (in this example, we use pin 18.
|
||||
*
|
||||
* In this example, we assume a Tower Pro MG995 large servo connected to an external power source.
|
||||
* The published min and max for this servo is 1000 and 2000, respectively, so the defaults are fine.
|
||||
* These values actually drive the servos a little past 0 and 180, so
|
||||
* if you are particular, adjust the min and max values to match your needs.
|
||||
*/
|
||||
|
||||
#include <ESP32Servo.h>
|
||||
|
||||
Servo myservo; // create servo object to control a servo
|
||||
// 16 servo objects can be created on the ESP32
|
||||
|
||||
int pos = 0; // variable to store the servo position
|
||||
// Recommended PWM GPIO pins on the ESP32 include 2,4,12-19,21-23,25-27,32-33
|
||||
int servoPin = 18;
|
||||
|
||||
void setup() {
|
||||
myservo.attach(servoPin); // attaches the servo on pin 18 to the servo object
|
||||
// using default min/max of 1000us and 2000us
|
||||
// different servos may require different min/max settings
|
||||
// for an accurate 0 to 180 sweep
|
||||
}
|
||||
|
||||
void loop() {
|
||||
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
|
||||
// in steps of 1 degree
|
||||
myservo.write(pos); // tell servo to go to position in variable 'pos'
|
||||
delay(15); // waits 15ms for the servo to reach the position
|
||||
}
|
||||
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
|
||||
myservo.write(pos); // tell servo to go to position in variable 'pos'
|
||||
delay(15); // waits 15ms for the servo to reach the position
|
||||
}
|
||||
}
|
||||
|
26
Arduino/libraries/ESP32Servo/keywords.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
#######################################
|
||||
# Syntax Coloring Map ESP32_Servo
|
||||
#######################################
|
||||
|
||||
#######################################
|
||||
# Datatypes (KEYWORD1)
|
||||
#######################################
|
||||
|
||||
Servo KEYWORD1
|
||||
|
||||
#######################################
|
||||
# Methods and Functions (KEYWORD2)
|
||||
#######################################
|
||||
attach KEYWORD2
|
||||
detach KEYWORD2
|
||||
write KEYWORD2
|
||||
read KEYWORD2
|
||||
attached KEYWORD2
|
||||
writeMicroseconds KEYWORD2
|
||||
readMicroseconds KEYWORD2
|
||||
setTimerWidth KEYWORD2
|
||||
readTimerWidth KEYWORD2
|
||||
|
||||
#######################################
|
||||
# Constants (LITERAL1)
|
||||
#######################################
|
11
Arduino/libraries/ESP32Servo/library.properties
Normal file
|
@ -0,0 +1,11 @@
|
|||
name=ESP32Servo
|
||||
version=0.0.4
|
||||
author=John K. Bennett,Kevin Harrington
|
||||
maintainer=Kevin Harrington <mad.hephaestus@gmail.com>
|
||||
sentence=Allows ESP32 boards to control servo motors using Arduino semantics.
|
||||
paragraph=This library can control a many types of servos.<br />It makes use of the ESP32 PWM timers: the library can control up to 16 servos on individual channels<br />No attempt has been made to support multiple servos per channel.<br />
|
||||
category=Device Control
|
||||
url=http://www.arduino.cc/en/Reference/Servo
|
||||
architectures=*
|
||||
includes=ESP32Servo.h
|
||||
|
275
Arduino/libraries/ESP32Servo/src/ESP32Servo.cpp
Normal file
|
@ -0,0 +1,275 @@
|
|||
/*
|
||||
Copyright (c) 2017 John K. Bennett. All right reserved.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
* Notes on the implementation:
|
||||
* The ESP32 supports 16 hardware LED PWM channels that are intended
|
||||
* to be used for LED brightness control. The low level ESP32 code
|
||||
* (esp32-hal-ledc.*) allows us to set the PWM frequency and bit-depth,
|
||||
* and then manipulate them by setting bits in the relevant control
|
||||
* registers.
|
||||
*
|
||||
* Different servos require different pulse widths to vary servo angle, but the range is
|
||||
* an approximately 500-2500 microsecond pulse every 20ms (50Hz). In general, hobbyist servos
|
||||
* sweep 180 degrees, so the lowest number in the published range for a particular servo
|
||||
* represents an angle of 0 degrees, the middle of the range represents 90 degrees, and the top
|
||||
* of the range represents 180 degrees. So for example, if the range is 1000us to 2000us,
|
||||
* 1000us would equal an angle of 0, 1500us would equal 90 degrees, and 2000us would equal 180
|
||||
* degrees. We vary pulse width (recall that the pulse period is already set to 20ms) as follows:
|
||||
*
|
||||
* The ESP32 PWM timers allow us to set the timer width (max 20 bits). Thus
|
||||
* the timer "tick" length is (pulse_period/2**timer_width), and the equation for pulse_high_width
|
||||
* (the portion of the 20ms cycle that the signal is high) becomes:
|
||||
*
|
||||
* pulse_high_width = count * tick_length
|
||||
* = count * (pulse_period/2**timer_width)
|
||||
*
|
||||
* and count = (pulse_high_width / (pulse_period/2**timer_width))
|
||||
*
|
||||
* So, for example, if I want a 1500us pulse_high_width, I set pulse_period to 20ms (20000us)
|
||||
* (this value is set in the ledcSetup call), and count (used in the ledcWrite call) to
|
||||
* 1500/(20000/65536), or 4924. This is the value we write to the timer in the ledcWrite call.
|
||||
* If we increase the timer_width, the timer_count values need to be adjusted.
|
||||
*
|
||||
* The servo signal pins connect to any available GPIO pins on the ESP32, but not all pins are
|
||||
* GPIO pins.
|
||||
*
|
||||
* The ESP32 is a 32 bit processor that includes FP support; this code reflects that fact.
|
||||
*/
|
||||
|
||||
#include <ESP32Servo.h>
|
||||
#include "esp32-hal-ledc.h"
|
||||
#include "Arduino.h"
|
||||
|
||||
//
|
||||
|
||||
// initialize the class variable ServoCount
|
||||
int Servo::ServoCount = 0;
|
||||
|
||||
// The ChannelUsed array elements are 0 if never used, 1 if in use, and -1 if used and disposed
|
||||
// (i.e., available for reuse)
|
||||
int Servo::ChannelUsed[MAX_SERVOS+1] = {0}; // we ignore the zeroth element
|
||||
|
||||
Servo::Servo()
|
||||
{
|
||||
this->servoChannel = 0;
|
||||
// see if there is a servo channel available for reuse
|
||||
bool foundChannelForReuse = false;
|
||||
for (int i = 1; i < MAX_SERVOS+1; i++)
|
||||
{
|
||||
if (ChannelUsed[i] == -1)
|
||||
{
|
||||
// reclaim this channel
|
||||
ChannelUsed[i] = 1;
|
||||
this->servoChannel = i;
|
||||
foundChannelForReuse = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!foundChannelForReuse)
|
||||
{
|
||||
// no channels available for reuse; get a new one if we can
|
||||
if (ServoCount < MAX_SERVOS)
|
||||
{
|
||||
this->servoChannel = ++ServoCount; // assign a servo channel number to this instance
|
||||
ChannelUsed[this->servoChannel] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->servoChannel = 0; // too many servos in use
|
||||
}
|
||||
}
|
||||
// if we got a channel either way, finish initializing it
|
||||
if (this->servoChannel > 0)
|
||||
{
|
||||
// initialize this channel with plausible values, except pin # (we set pin # when attached)
|
||||
this->ticks = DEFAULT_PULSE_WIDTH_TICKS;
|
||||
this->timer_width = DEFAULT_TIMER_WIDTH;
|
||||
this->pinNumber = -1; // make it clear that we haven't attached a pin to this channel
|
||||
this->min = DEFAULT_uS_LOW;
|
||||
this->max = DEFAULT_uS_HIGH;
|
||||
this->timer_width_ticks = pow(2,this->timer_width);
|
||||
}
|
||||
}
|
||||
|
||||
int Servo::attach(int pin)
|
||||
{
|
||||
return (this->attach(pin, DEFAULT_uS_LOW, DEFAULT_uS_HIGH));
|
||||
}
|
||||
|
||||
int Servo::attach(int pin, int min, int max)
|
||||
{
|
||||
if ((this->servoChannel <= MAX_SERVOS) && (this->servoChannel > 0))
|
||||
{
|
||||
#ifdef ENFORCE_PINS
|
||||
// Recommend only the following pins 2,4,12-19,21-23,25-27,32-33
|
||||
if ((pin == 2) || (pin ==4) || ((pin >= 12) && (pin <= 19)) || ((pin >= 21) && (pin <= 23)) ||
|
||||
((pin >= 25) && (pin <= 27)) || (pin == 32) || (pin == 33))
|
||||
{
|
||||
#endif
|
||||
// OK to proceed; first check for new/reuse
|
||||
if (this->pinNumber < 0) // we are attaching to a new or previously detached pin; we need to initialize/reinitialize
|
||||
{
|
||||
// claim/reclaim this channel
|
||||
ChannelUsed[this->servoChannel] = 1;
|
||||
this->ticks = DEFAULT_PULSE_WIDTH_TICKS;
|
||||
this->timer_width = DEFAULT_TIMER_WIDTH;
|
||||
this->timer_width_ticks = pow(2,this->timer_width);
|
||||
}
|
||||
this->pinNumber = pin;
|
||||
#ifdef ENFORCE_PINS
|
||||
}
|
||||
else
|
||||
{
|
||||
Serial.println("This pin can not be a servo: "+String(pin)+"\r\nOnly use: 2,4,12-19,21-23,25-27,32-33");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
// min/max checks
|
||||
if (min < MIN_PULSE_WIDTH) // ensure pulse width is valid
|
||||
min = MIN_PULSE_WIDTH;
|
||||
if (max > MAX_PULSE_WIDTH)
|
||||
max = MAX_PULSE_WIDTH;
|
||||
this->min = min; //store this value in uS
|
||||
this->max = max; //store this value in uS
|
||||
// Set up this channel
|
||||
// if you want anything other than default timer width, you must call setTimerWidth() before attach
|
||||
ledcSetup(this->servoChannel, REFRESH_CPS, this->timer_width); // channel #, 50 Hz, timer width
|
||||
ledcAttachPin(this->pinNumber, this->servoChannel); // GPIO pin assigned to channel
|
||||
return 1;
|
||||
}
|
||||
else return 0;
|
||||
}
|
||||
|
||||
void Servo::detach()
|
||||
{
|
||||
if (this->attached())
|
||||
{
|
||||
ledcDetachPin(this->pinNumber);
|
||||
//keep track of detached servos channels so we can reuse them if needed
|
||||
ChannelUsed[this->servoChannel] = -1;
|
||||
this->pinNumber = -1;
|
||||
}
|
||||
}
|
||||
|
||||
void Servo::write(int value)
|
||||
{
|
||||
// treat values less than MIN_PULSE_WIDTH (500) as angles in degrees (valid values in microseconds are handled as microseconds)
|
||||
if (value < MIN_PULSE_WIDTH)
|
||||
{
|
||||
if (value < 0)
|
||||
value = 0;
|
||||
else if (value > 180)
|
||||
value = 180;
|
||||
|
||||
value = map(value, 0, 180, this->min, this->max);
|
||||
}
|
||||
this->writeMicroseconds(value);
|
||||
}
|
||||
|
||||
void Servo::writeMicroseconds(int value)
|
||||
{
|
||||
// calculate and store the values for the given channel
|
||||
if ((this->servoChannel <= MAX_SERVOS) && (this->attached())) // ensure channel is valid
|
||||
{
|
||||
if (value < this->min) // ensure pulse width is valid
|
||||
value = this->min;
|
||||
else if (value > this->max)
|
||||
value = this->max;
|
||||
|
||||
value = usToTicks(value); // convert to ticks
|
||||
this->ticks = value;
|
||||
// do the actual write
|
||||
ledcWrite(this->servoChannel, this->ticks);
|
||||
}
|
||||
}
|
||||
|
||||
int Servo::read() // return the value as degrees
|
||||
{
|
||||
return (map(readMicroseconds()+1, this->min, this->max, 0, 180));
|
||||
}
|
||||
|
||||
int Servo::readMicroseconds()
|
||||
{
|
||||
int pulsewidthUsec;
|
||||
if ((this->servoChannel <= MAX_SERVOS) && (this->attached()))
|
||||
{
|
||||
pulsewidthUsec = ticksToUs(this->ticks);
|
||||
}
|
||||
else
|
||||
{
|
||||
pulsewidthUsec = 0;
|
||||
}
|
||||
|
||||
return (pulsewidthUsec);
|
||||
}
|
||||
|
||||
bool Servo::attached()
|
||||
{
|
||||
return (ChannelUsed[this->servoChannel]);
|
||||
}
|
||||
|
||||
void Servo::setTimerWidth(int value)
|
||||
{
|
||||
// only allow values between 16 and 20
|
||||
if (value < 16)
|
||||
value = 16;
|
||||
else if (value > 20)
|
||||
value = 20;
|
||||
|
||||
// Fix the current ticks value after timer width change
|
||||
// The user can reset the tick value with a write() or writeUs()
|
||||
int widthDifference = this->timer_width - value;
|
||||
// if positive multiply by diff; if neg, divide
|
||||
if (widthDifference > 0)
|
||||
{
|
||||
this->ticks = widthDifference * this->ticks;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->ticks = this->ticks/-widthDifference;
|
||||
}
|
||||
|
||||
this->timer_width = value;
|
||||
this->timer_width_ticks = pow(2,this->timer_width);
|
||||
|
||||
// If this is an attached servo, clean up
|
||||
if ((this->servoChannel <= MAX_SERVOS) && (this->attached()))
|
||||
{
|
||||
// detach, setup and attach again to reflect new timer width
|
||||
ledcDetachPin(this->pinNumber);
|
||||
ledcSetup(this->servoChannel, REFRESH_CPS, this->timer_width);
|
||||
ledcAttachPin(this->pinNumber, this->servoChannel);
|
||||
}
|
||||
}
|
||||
|
||||
int Servo::readTimerWidth()
|
||||
{
|
||||
return (this->timer_width);
|
||||
}
|
||||
|
||||
int Servo::usToTicks(int usec)
|
||||
{
|
||||
return (int)((float)usec / ((float)REFRESH_USEC / (float)this->timer_width_ticks));
|
||||
}
|
||||
|
||||
int Servo::ticksToUs(int ticks)
|
||||
{
|
||||
return (int)((float)ticks * ((float)REFRESH_USEC / (float)this->timer_width_ticks));
|
||||
}
|
||||
|
||||
|
149
Arduino/libraries/ESP32Servo/src/ESP32Servo.h
Normal file
|
@ -0,0 +1,149 @@
|
|||
/*
|
||||
Copyright (c) 2017 John K. Bennett. All right reserved.
|
||||
|
||||
ESP32_Servo.h - Servo library for ESP32 - Version 1
|
||||
|
||||
Original Servo.h written by Michael Margolis in 2009
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
A servo is activated by creating an instance of the Servo class, and passing
|
||||
the desired GPIO pin to the attach() method.
|
||||
The servos are pulsed in the background using the value most recently
|
||||
written using the write() method.
|
||||
|
||||
The class methods are:
|
||||
|
||||
Servo - Class for manipulating servo motors connected to ESP32 pins.
|
||||
int attach(pin ) - Attaches the given GPIO pin to the next free channel
|
||||
(channels that have previously been detached are used first),
|
||||
returns channel number or 0 if failure. All pin numbers are allowed,
|
||||
but only pins 2,4,12-19,21-23,25-27,32-33 are recommended.
|
||||
int attach(pin, min, max ) - Attaches to a pin setting min and max
|
||||
values in microseconds; enforced minimum min is 500, enforced max
|
||||
is 2500. Other semantics same as attach().
|
||||
void write () - Sets the servo angle in degrees; a value below 500 is
|
||||
treated as a value in degrees (0 to 180). These limit are enforced,
|
||||
i.e., values are treated as follows:
|
||||
Value Becomes
|
||||
----- -------
|
||||
< 0 0
|
||||
0 - 180 value (treated as degrees)
|
||||
181 - 499 180
|
||||
500 - (min-1) min
|
||||
min-max (from attach or default) value (treated as microseconds)
|
||||
(max+1) - 2500 max
|
||||
|
||||
void writeMicroseconds() - Sets the servo pulse width in microseconds.
|
||||
min and max are enforced (see above).
|
||||
int read() - Gets the last written servo pulse width as an angle between 0 and 180.
|
||||
int readMicroseconds() - Gets the last written servo pulse width in microseconds.
|
||||
bool attached() - Returns true if this servo instance is attached.
|
||||
void detach() - Stops an the attached servo, frees its attached pin, and frees
|
||||
its channel for reuse).
|
||||
|
||||
*** ESP32-specific functions **
|
||||
setTimerWidth(value) - Sets the PWM timer width (must be 16-20) (ESP32 ONLY);
|
||||
as a side effect, the pulse width is recomputed.
|
||||
int readTimerWidth() - Gets the PWM timer width (ESP32 ONLY)
|
||||
*/
|
||||
|
||||
#ifndef ESP32_Servo_h
|
||||
#define ESP32_Servo_h
|
||||
//Enforce only using PWM pins on the ESP32
|
||||
#define ENFORCE_PINS
|
||||
// Default Arduino Servo.h
|
||||
#define DEFAULT_uS_LOW 544
|
||||
#define DEFAULT_uS_HIGH 2400
|
||||
|
||||
// Values for TowerPro MG995 large servos (and many other hobbyist servos)
|
||||
//#define DEFAULT_uS_LOW 1000 // 1000us
|
||||
//#define DEFAULT_uS_HIGH 2000 // 2000us
|
||||
|
||||
// Values for TowerPro SG90 small servos
|
||||
//#define DEFAULT_uS_LOW 400
|
||||
//#define DEFAULT_uS_HIGH 2400
|
||||
|
||||
#define DEFAULT_TIMER_WIDTH 16
|
||||
#define DEFAULT_TIMER_WIDTH_TICKS 65536
|
||||
|
||||
#define ESP32_Servo_VERSION 1 // software version of this library
|
||||
|
||||
#define MIN_PULSE_WIDTH 500 // the shortest pulse sent to a servo
|
||||
#define MAX_PULSE_WIDTH 2500 // the longest pulse sent to a servo
|
||||
#define DEFAULT_PULSE_WIDTH 1500 // default pulse width when servo is attached
|
||||
#define DEFAULT_PULSE_WIDTH_TICKS 4825
|
||||
#define REFRESH_CPS 50
|
||||
#define REFRESH_USEC 20000
|
||||
|
||||
#define MAX_SERVOS 16 // no. of PWM channels in ESP32
|
||||
|
||||
/*
|
||||
* This group/channel/timmer mapping is for information only;
|
||||
* the details are handled by lower-level code
|
||||
*
|
||||
* LEDC Chan to Group/Channel/Timer Mapping
|
||||
** ledc: 0 => Group: 0, Channel: 0, Timer: 0
|
||||
** ledc: 1 => Group: 0, Channel: 1, Timer: 0
|
||||
** ledc: 2 => Group: 0, Channel: 2, Timer: 1
|
||||
** ledc: 3 => Group: 0, Channel: 3, Timer: 1
|
||||
** ledc: 4 => Group: 0, Channel: 4, Timer: 2
|
||||
** ledc: 5 => Group: 0, Channel: 5, Timer: 2
|
||||
** ledc: 6 => Group: 0, Channel: 6, Timer: 3
|
||||
** ledc: 7 => Group: 0, Channel: 7, Timer: 3
|
||||
** ledc: 8 => Group: 1, Channel: 0, Timer: 0
|
||||
** ledc: 9 => Group: 1, Channel: 1, Timer: 0
|
||||
** ledc: 10 => Group: 1, Channel: 2, Timer: 1
|
||||
** ledc: 11 => Group: 1, Channel: 3, Timer: 1
|
||||
** ledc: 12 => Group: 1, Channel: 4, Timer: 2
|
||||
** ledc: 13 => Group: 1, Channel: 5, Timer: 2
|
||||
** ledc: 14 => Group: 1, Channel: 6, Timer: 3
|
||||
** ledc: 15 => Group: 1, Channel: 7, Timer: 3
|
||||
*/
|
||||
|
||||
class Servo
|
||||
{
|
||||
public:
|
||||
Servo();
|
||||
// Arduino Servo Library calls
|
||||
int attach(int pin); // attach the given pin to the next free channel, returns channel number or 0 if failure
|
||||
int attach(int pin, int min, int max); // as above but also sets min and max values for writes.
|
||||
void detach();
|
||||
void write(int value); // if value is < MIN_PULSE_WIDTH its treated as an angle, otherwise as pulse width in microseconds
|
||||
void writeMicroseconds(int value); // Write pulse width in microseconds
|
||||
int read(); // returns current pulse width as an angle between 0 and 180 degrees
|
||||
int readMicroseconds(); // returns current pulse width in microseconds for this servo
|
||||
bool attached(); // return true if this servo is attached, otherwise false
|
||||
|
||||
// ESP32 only functions
|
||||
void setTimerWidth(int value); // set the PWM timer width (ESP32 ONLY)
|
||||
int readTimerWidth(); // get the PWM timer width (ESP32 ONLY)
|
||||
|
||||
private:
|
||||
int usToTicks(int usec);
|
||||
int ticksToUs(int ticks);
|
||||
static int ServoCount; // the total number of attached servos
|
||||
static int ChannelUsed[]; // used to track whether a channel is in service
|
||||
int servoChannel = 0; // channel number for this servo
|
||||
int min = DEFAULT_uS_LOW; // minimum pulse width for this servo
|
||||
int max = DEFAULT_uS_HIGH; // maximum pulse width for this servo
|
||||
int pinNumber = 0; // GPIO pin assigned to this channel
|
||||
int timer_width = DEFAULT_TIMER_WIDTH; // ESP32 allows variable width PWM timers
|
||||
int ticks = DEFAULT_PULSE_WIDTH_TICKS; // current pulse width on this channel
|
||||
int timer_width_ticks = DEFAULT_TIMER_WIDTH_TICKS; // no. of ticks at rollover; varies with width
|
||||
};
|
||||
#endif
|
|
@ -51,7 +51,7 @@ PROJECT_BRIEF = "... better know the details."
|
|||
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
|
||||
# the logo to the output directory.
|
||||
|
||||
PROJECT_LOGO = ../Doku/Bilder/coderace_logo.JPG
|
||||
PROJECT_LOGO = C:/Users/jnoack/Documents/GITs/coderacer/Doku/Bilder/coderace_logo.JPG
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
|
||||
# into which the generated documentation will be written. If a relative path is
|
||||
|
@ -435,7 +435,7 @@ LOOKUP_CACHE_SIZE = 0
|
|||
# normally produced when WARNINGS is set to YES.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_ALL = YES
|
||||
|
||||
# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
|
||||
# be included in the documentation.
|
||||
|
@ -461,7 +461,7 @@ EXTRACT_STATIC = NO
|
|||
# for Java sources.
|
||||
# The default value is: YES.
|
||||
|
||||
EXTRACT_LOCAL_CLASSES = NO
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
|
||||
# This flag is only useful for Objective-C code. If set to YES, local methods,
|
||||
# which are defined in the implementation section but not in the interface are
|
||||
|
@ -544,7 +544,7 @@ HIDE_COMPOUND_REFERENCE= NO
|
|||
# the files that are included by a file in the documentation of that file.
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_INCLUDE_FILES = NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
|
||||
# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
|
||||
# grouped member an include statement to the documentation, telling the reader
|
||||
|
@ -666,21 +666,21 @@ MAX_INITIALIZER_LINES = 30
|
|||
# list will mention the files that were used to generate the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_USED_FILES = NO
|
||||
SHOW_USED_FILES = YES
|
||||
|
||||
# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
|
||||
# will remove the Files entry from the Quick Index and from the Folder Tree View
|
||||
# (if specified).
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_FILES = NO
|
||||
SHOW_FILES = YES
|
||||
|
||||
# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
|
||||
# page. This will remove the Namespaces entry from the Quick Index and from the
|
||||
# Folder Tree View (if specified).
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_NAMESPACES = NO
|
||||
SHOW_NAMESPACES = YES
|
||||
|
||||
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
|
||||
# doxygen should invoke to get the current version for each file (typically from
|
||||
|
@ -790,7 +790,7 @@ WARN_LOGFILE =
|
|||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = C:\Users\jnoack\Documents\Arduino\libraries\CodeRacer
|
||||
INPUT = ../../Arduino/libraries/CodeRacer
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
|
@ -2343,7 +2343,7 @@ CALL_GRAPH = YES
|
|||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
CALLER_GRAPH = NO
|
||||
CALLER_GRAPH = YES
|
||||
|
||||
# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
|
||||
# hierarchy of all classes instead of a textual one.
|
||||
|
|
Before Width: | Height: | Size: 676 B |
Before Width: | Height: | Size: 147 B |
Before Width: | Height: | Size: 132 B |
Before Width: | Height: | Size: 248 KiB |
Before Width: | Height: | Size: 20 KiB |
|
@ -1,157 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: Getters</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('d0/d0a/group__lowerleveldrivesgetters.html','../../');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Getters<div class="ingroups"><a class="el" href="../../d6/d98/group__lowerleveldrives.html">Lower level drives methods and getters</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ga09359a792e3299b1c20f6b99939ea7b3"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d0a/group__lowerleveldrivesgetters.html#ga09359a792e3299b1c20f6b99939ea7b3">CodeRacer::drive_right_speed</a> ()</td></tr>
|
||||
<tr class="memdesc:ga09359a792e3299b1c20f6b99939ea7b3"><td class="mdescLeft"> </td><td class="mdescRight">Get the setting for the speed of the right side drive. <a href="#ga09359a792e3299b1c20f6b99939ea7b3">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga09359a792e3299b1c20f6b99939ea7b3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga804a45724f3788fd2fdb9631c66d1377"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d0a/group__lowerleveldrivesgetters.html#ga804a45724f3788fd2fdb9631c66d1377">CodeRacer::drive_left_speed</a> ()</td></tr>
|
||||
<tr class="memdesc:ga804a45724f3788fd2fdb9631c66d1377"><td class="mdescLeft"> </td><td class="mdescRight">Get the setting for the speed of the left side drive. <a href="#ga804a45724f3788fd2fdb9631c66d1377">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga804a45724f3788fd2fdb9631c66d1377"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ga09359a792e3299b1c20f6b99939ea7b3"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga09359a792e3299b1c20f6b99939ea7b3">◆ </a></span>drive_right_speed()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">uint8_t CodeRacer::drive_right_speed </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Get the setting for the speed of the right side drive. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Speed of the right side drive </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00994">994</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00994"></a><span class="lineno"> 994</span>  {</div><div class="line"><a name="l00995"></a><span class="lineno"> 995</span>  <span class="keywordflow">return</span> _drive_right_speed;</div><div class="line"><a name="l00996"></a><span class="lineno"> 996</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga804a45724f3788fd2fdb9631c66d1377"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga804a45724f3788fd2fdb9631c66d1377">◆ </a></span>drive_left_speed()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">uint8_t CodeRacer::drive_left_speed </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Get the setting for the speed of the left side drive. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Speed of the left side drive </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l01001">1001</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>  {</div><div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>  <span class="keywordflow">return</span>(_drive_left_speed);</div><div class="line"><a name="l01003"></a><span class="lineno"> 1003</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,5 +0,0 @@
|
|||
var group__lowerleveldrivesgetters =
|
||||
[
|
||||
[ "drive_right_speed", "d0/d0a/group__lowerleveldrivesgetters.html#ga09359a792e3299b1c20f6b99939ea7b3", null ],
|
||||
[ "drive_left_speed", "d0/d0a/group__lowerleveldrivesgetters.html#ga804a45724f3788fd2fdb9631c66d1377", null ]
|
||||
];
|
|
@ -1,3 +0,0 @@
|
|||
<map id="Getters" name="Getters">
|
||||
<area shape="rect" id="node1" href="$d6/d98/group__lowerleveldrives.html" title="Lower level drives\l methods and getters" alt="" coords="5,5,151,47"/>
|
||||
</map>
|
|
@ -1 +0,0 @@
|
|||
27209861500fd81db6dccdd2984f5d4a
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,496 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: Methods</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('d1/d8a/group__lowerleveldrivesmeths.html','../../');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Methods<div class="ingroups"><a class="el" href="../../d6/d98/group__lowerleveldrives.html">Lower level drives methods and getters</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ga5812df751da5b480240ccd633c515b83"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d8a/group__lowerleveldrivesmeths.html#ga5812df751da5b480240ccd633c515b83">CodeRacer::drives_settings</a> (uint8_t drive_left_speed, uint8_t drive_right_speed, unsigned long turn_left_ms, unsigned long turn_right_ms)</td></tr>
|
||||
<tr class="memdesc:ga5812df751da5b480240ccd633c515b83"><td class="mdescLeft"> </td><td class="mdescRight">Overwrites some drive settings. This will replace the defaults set by the values in the header file. <a href="#ga5812df751da5b480240ccd633c515b83">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga5812df751da5b480240ccd633c515b83"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga61ed9e0415a62a290cc5c59a0f740304"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d8a/group__lowerleveldrivesmeths.html#ga61ed9e0415a62a290cc5c59a0f740304">CodeRacer::set_drives_stop_left_right</a> ()</td></tr>
|
||||
<tr class="memdesc:ga61ed9e0415a62a290cc5c59a0f740304"><td class="mdescLeft"> </td><td class="mdescRight">Stopps both drives. <a href="#ga61ed9e0415a62a290cc5c59a0f740304">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga61ed9e0415a62a290cc5c59a0f740304"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga802d2646d9cc0d766e1ac799c7917fa8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d8a/group__lowerleveldrivesmeths.html#ga802d2646d9cc0d766e1ac799c7917fa8">CodeRacer::set_drives_states_left_right</a> (drivestate stateleft, drivestate stateright)</td></tr>
|
||||
<tr class="memdesc:ga802d2646d9cc0d766e1ac799c7917fa8"><td class="mdescLeft"> </td><td class="mdescRight">Sets both of the drives to a specified drivestate (DRIVESTOP, DRIVEFRWD, DRIVEBACK) <a href="#ga802d2646d9cc0d766e1ac799c7917fa8">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga802d2646d9cc0d766e1ac799c7917fa8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1eeb3cb47503c3011562f9c42828fab9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d8a/group__lowerleveldrivesmeths.html#ga1eeb3cb47503c3011562f9c42828fab9">CodeRacer::set_drive_left_state</a> (drivestate state)</td></tr>
|
||||
<tr class="memdesc:ga1eeb3cb47503c3011562f9c42828fab9"><td class="mdescLeft"> </td><td class="mdescRight">Sets the left side drive to the specified drivestate (DRIVESTOP, DRIVEFRWD, DRIVEBACK) <a href="#ga1eeb3cb47503c3011562f9c42828fab9">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1eeb3cb47503c3011562f9c42828fab9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1b34ec9cee1f21cd15db310167a2faa5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d8a/group__lowerleveldrivesmeths.html#ga1b34ec9cee1f21cd15db310167a2faa5">CodeRacer::set_drive_right_state</a> (drivestate state)</td></tr>
|
||||
<tr class="memdesc:ga1b34ec9cee1f21cd15db310167a2faa5"><td class="mdescLeft"> </td><td class="mdescRight">Sets the right side drive to the specified drivestate (DRIVESTOP, DRIVEFRWD, DRIVEBACK) <a href="#ga1b34ec9cee1f21cd15db310167a2faa5">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1b34ec9cee1f21cd15db310167a2faa5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3b69cf4a718c842fbe758d3f4267214e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d8a/group__lowerleveldrivesmeths.html#ga3b69cf4a718c842fbe758d3f4267214e">CodeRacer::set_drive_state</a> (drivestate state, uint8_t frwdpin, uint8_t backpin)</td></tr>
|
||||
<tr class="memdesc:ga3b69cf4a718c842fbe758d3f4267214e"><td class="mdescLeft"> </td><td class="mdescRight">Sets the specified drivestate for the drive connected to the sepecified pins (DRIVESTOP, DRIVEFRWD, DRIVEBACK) <a href="#ga3b69cf4a718c842fbe758d3f4267214e">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga3b69cf4a718c842fbe758d3f4267214e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3d3ffb41783d34589e33cf61fed46c70"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d8a/group__lowerleveldrivesmeths.html#ga3d3ffb41783d34589e33cf61fed46c70">CodeRacer::set_drives_speed_left_right</a> (uint8_t speedleft, uint8_t speedright)</td></tr>
|
||||
<tr class="memdesc:ga3d3ffb41783d34589e33cf61fed46c70"><td class="mdescLeft"> </td><td class="mdescRight">Sets the speed for both of the drives. <a href="#ga3d3ffb41783d34589e33cf61fed46c70">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga3d3ffb41783d34589e33cf61fed46c70"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1ee3da20ec98a821ab97ced070974861"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d8a/group__lowerleveldrivesmeths.html#ga1ee3da20ec98a821ab97ced070974861">CodeRacer::set_drive_left_speed</a> (uint8_t speed)</td></tr>
|
||||
<tr class="memdesc:ga1ee3da20ec98a821ab97ced070974861"><td class="mdescLeft"> </td><td class="mdescRight">Sets the speed for the left side drive. <a href="#ga1ee3da20ec98a821ab97ced070974861">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1ee3da20ec98a821ab97ced070974861"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaf8805d0d620a2fb78c576f36a2c81073"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d8a/group__lowerleveldrivesmeths.html#gaf8805d0d620a2fb78c576f36a2c81073">CodeRacer::set_drive_right_speed</a> (uint8_t speed)</td></tr>
|
||||
<tr class="memdesc:gaf8805d0d620a2fb78c576f36a2c81073"><td class="mdescLeft"> </td><td class="mdescRight">Sets the speed for the right side drive. <a href="#gaf8805d0d620a2fb78c576f36a2c81073">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaf8805d0d620a2fb78c576f36a2c81073"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga5d67c84606d5b39996a99fcd6e7eb314"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d8a/group__lowerleveldrivesmeths.html#ga5d67c84606d5b39996a99fcd6e7eb314">CodeRacer::set_drive_speed</a> (uint8_t speed, uint8_t enablepin)</td></tr>
|
||||
<tr class="memdesc:ga5d67c84606d5b39996a99fcd6e7eb314"><td class="mdescLeft"> </td><td class="mdescRight">Sets the speed for the drive of the enable pin connected to the specified pin. <a href="#ga5d67c84606d5b39996a99fcd6e7eb314">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga5d67c84606d5b39996a99fcd6e7eb314"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ga5812df751da5b480240ccd633c515b83"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga5812df751da5b480240ccd633c515b83">◆ </a></span>drives_settings()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::drives_settings </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>drive_left_speed</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>drive_right_speed</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">unsigned long </td>
|
||||
<td class="paramname"><em>turn_left_for_ms</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">unsigned long </td>
|
||||
<td class="paramname"><em>turn_right_for_ms</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Overwrites some drive settings. This will replace the defaults set by the values in the header file. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">drive_left_speed</td><td>Speed of the left side drive </td></tr>
|
||||
<tr><td class="paramname">drive_right_speed</td><td>Speed of the right side drive </td></tr>
|
||||
<tr><td class="paramname">turn_left_for_ms</td><td>Time in ms the racer will turn to the left around its center if turn_left() is called </td></tr>
|
||||
<tr><td class="paramname">turn_right_for_ms</td><td>Time in ms the racer will turn to the right around its center if turn_right() is called </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00878">878</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00879"></a><span class="lineno"> 879</span> {</div><div class="line"><a name="l00880"></a><span class="lineno"> 880</span>  _drive_left_speed = drive_left_speed;</div><div class="line"><a name="l00881"></a><span class="lineno"> 881</span>  _drive_right_speed = drive_right_speed;</div><div class="line"><a name="l00882"></a><span class="lineno"> 882</span>  _turn_left_for_ms = turn_left_for_ms;</div><div class="line"><a name="l00883"></a><span class="lineno"> 883</span>  _turn_right_for_ms = turn_right_for_ms;</div><div class="line"><a name="l00884"></a><span class="lineno"> 884</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga61ed9e0415a62a290cc5c59a0f740304"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga61ed9e0415a62a290cc5c59a0f740304">◆ </a></span>set_drives_stop_left_right()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::set_drives_stop_left_right </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Stopps both drives. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00889">889</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00889"></a><span class="lineno"> 889</span>  {</div><div class="line"><a name="l00890"></a><span class="lineno"> 890</span>  set_drive_left_state(DRIVESTOP);</div><div class="line"><a name="l00891"></a><span class="lineno"> 891</span>  set_drive_right_state(DRIVESTOP);</div><div class="line"><a name="l00892"></a><span class="lineno"> 892</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga802d2646d9cc0d766e1ac799c7917fa8"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga802d2646d9cc0d766e1ac799c7917fa8">◆ </a></span>set_drives_states_left_right()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::set_drives_states_left_right </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">drivestate </td>
|
||||
<td class="paramname"><em>stateleft</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">drivestate </td>
|
||||
<td class="paramname"><em>stateright</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets both of the drives to a specified drivestate (DRIVESTOP, DRIVEFRWD, DRIVEBACK) </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">stateleft</td><td>drivestate to set for the left side drive </td></tr>
|
||||
<tr><td class="paramname">stateright</td><td>drivestate to set for the right side drive </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00899">899</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00899"></a><span class="lineno"> 899</span>  {</div><div class="line"><a name="l00900"></a><span class="lineno"> 900</span>  set_drive_left_state(stateleft);</div><div class="line"><a name="l00901"></a><span class="lineno"> 901</span>  set_drive_right_state(stateright);</div><div class="line"><a name="l00902"></a><span class="lineno"> 902</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga1eeb3cb47503c3011562f9c42828fab9"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1eeb3cb47503c3011562f9c42828fab9">◆ </a></span>set_drive_left_state()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::set_drive_left_state </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">drivestate </td>
|
||||
<td class="paramname"><em>state</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the left side drive to the specified drivestate (DRIVESTOP, DRIVEFRWD, DRIVEBACK) </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">state</td><td>drivestate to set for the left side drive </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00908">908</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00908"></a><span class="lineno"> 908</span>  {</div><div class="line"><a name="l00909"></a><span class="lineno"> 909</span>  set_drive_state(state, _drive_left_frwd_pin, _drive_left_back_pin);</div><div class="line"><a name="l00910"></a><span class="lineno"> 910</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga1b34ec9cee1f21cd15db310167a2faa5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1b34ec9cee1f21cd15db310167a2faa5">◆ </a></span>set_drive_right_state()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::set_drive_right_state </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">drivestate </td>
|
||||
<td class="paramname"><em>state</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the right side drive to the specified drivestate (DRIVESTOP, DRIVEFRWD, DRIVEBACK) </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">state</td><td>drivestate to set for the right side drive </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00916">916</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00916"></a><span class="lineno"> 916</span>  {</div><div class="line"><a name="l00917"></a><span class="lineno"> 917</span>  set_drive_state(state, _drive_right_frwd_pin, _drive_right_back_pin);</div><div class="line"><a name="l00918"></a><span class="lineno"> 918</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga3b69cf4a718c842fbe758d3f4267214e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga3b69cf4a718c842fbe758d3f4267214e">◆ </a></span>set_drive_state()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::set_drive_state </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">drivestate </td>
|
||||
<td class="paramname"><em>state</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>frwdpin</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>backpin</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the specified drivestate for the drive connected to the sepecified pins (DRIVESTOP, DRIVEFRWD, DRIVEBACK) </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">state</td><td>drivestate to set for the connected drive </td></tr>
|
||||
<tr><td class="paramname">frwdpin</td><td>Pin the forward signal of the drive device driver is connected at </td></tr>
|
||||
<tr><td class="paramname">backpin</td><td>Pin the backward signal of the drive device driver is connected at </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00926">926</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00926"></a><span class="lineno"> 926</span>  {</div><div class="line"><a name="l00927"></a><span class="lineno"> 927</span>  <span class="keywordflow">switch</span> (state) {</div><div class="line"><a name="l00928"></a><span class="lineno"> 928</span>  <span class="keywordflow">case</span> DRIVESTOP:</div><div class="line"><a name="l00929"></a><span class="lineno"> 929</span>  digitalWrite(frwdpin, LOW);</div><div class="line"><a name="l00930"></a><span class="lineno"> 930</span>  digitalWrite(backpin, LOW);</div><div class="line"><a name="l00931"></a><span class="lineno"> 931</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00932"></a><span class="lineno"> 932</span>  <span class="keywordflow">case</span> DRIVEFRWD:</div><div class="line"><a name="l00933"></a><span class="lineno"> 933</span>  digitalWrite(frwdpin, HIGH);</div><div class="line"><a name="l00934"></a><span class="lineno"> 934</span>  digitalWrite(backpin, LOW);</div><div class="line"><a name="l00935"></a><span class="lineno"> 935</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00936"></a><span class="lineno"> 936</span>  <span class="keywordflow">case</span> DRIVEBACK:</div><div class="line"><a name="l00937"></a><span class="lineno"> 937</span>  digitalWrite(frwdpin, LOW);</div><div class="line"><a name="l00938"></a><span class="lineno"> 938</span>  digitalWrite(backpin, HIGH);</div><div class="line"><a name="l00939"></a><span class="lineno"> 939</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00940"></a><span class="lineno"> 940</span>  }</div><div class="line"><a name="l00941"></a><span class="lineno"> 941</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga3d3ffb41783d34589e33cf61fed46c70"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga3d3ffb41783d34589e33cf61fed46c70">◆ </a></span>set_drives_speed_left_right()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::set_drives_speed_left_right </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>speedleft</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>speedright</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the speed for both of the drives. </p>
|
||||
<p>The drive will run with that speed afterwards. The direction of the drive has to be specfied with one of the set_drive_state methods before </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">speedleft</td><td>speed of the left side drive. 0<=speed<=255 </td></tr>
|
||||
<tr><td class="paramname">speedright</td><td>speed of the right side drive. 0<=speed<=255 </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00950">950</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00950"></a><span class="lineno"> 950</span>  {</div><div class="line"><a name="l00951"></a><span class="lineno"> 951</span>  set_drive_left_speed(speedleft);</div><div class="line"><a name="l00952"></a><span class="lineno"> 952</span>  set_drive_right_speed(speedright);</div><div class="line"><a name="l00953"></a><span class="lineno"> 953</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga1ee3da20ec98a821ab97ced070974861"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1ee3da20ec98a821ab97ced070974861">◆ </a></span>set_drive_left_speed()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::set_drive_left_speed </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>speed</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the speed for the left side drive. </p>
|
||||
<p>The drive will run with that speed afterwards. The direction of the drive has to be specfied with one of the set_drive_state methods before </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">speed</td><td>speed of the left side drive. 0<=speed<=255 </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00961">961</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00961"></a><span class="lineno"> 961</span>  {</div><div class="line"><a name="l00962"></a><span class="lineno"> 962</span>  set_drive_speed(speed, _drive_left_enable_pin);</div><div class="line"><a name="l00963"></a><span class="lineno"> 963</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaf8805d0d620a2fb78c576f36a2c81073"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaf8805d0d620a2fb78c576f36a2c81073">◆ </a></span>set_drive_right_speed()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::set_drive_right_speed </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>speed</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the speed for the right side drive. </p>
|
||||
<p>The drive will run with that speed afterwards. The direction of the drive has to be specfied with one of the set_drive_state methods before </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">speed</td><td>speed of the right side drive. 0<=speed<=255 </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00971">971</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00971"></a><span class="lineno"> 971</span>  {</div><div class="line"><a name="l00972"></a><span class="lineno"> 972</span>  set_drive_speed(speed, _drive_right_enable_pin);</div><div class="line"><a name="l00973"></a><span class="lineno"> 973</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga5d67c84606d5b39996a99fcd6e7eb314"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga5d67c84606d5b39996a99fcd6e7eb314">◆ </a></span>set_drive_speed()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::set_drive_speed </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>speed</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>enablepin</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the speed for the drive of the enable pin connected to the specified pin. </p>
|
||||
<p>The drive will run with that speed afterwards. The direction of the drive has to be specfied with one of the set_drive_state methods before </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">speed</td><td>speed of the drive. 0<=speed<=255 </td></tr>
|
||||
<tr><td class="paramname">enablepin</td><td>Pin the drives device driver enable pin is connected at </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00982">982</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00982"></a><span class="lineno"> 982</span>  {</div><div class="line"><a name="l00983"></a><span class="lineno"> 983</span>  _analog_write(enablepin, (<span class="keywordtype">int</span>)speed);</div><div class="line"><a name="l00984"></a><span class="lineno"> 984</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,13 +0,0 @@
|
|||
var group__lowerleveldrivesmeths =
|
||||
[
|
||||
[ "drives_settings", "d1/d8a/group__lowerleveldrivesmeths.html#ga5812df751da5b480240ccd633c515b83", null ],
|
||||
[ "set_drives_stop_left_right", "d1/d8a/group__lowerleveldrivesmeths.html#ga61ed9e0415a62a290cc5c59a0f740304", null ],
|
||||
[ "set_drives_states_left_right", "d1/d8a/group__lowerleveldrivesmeths.html#ga802d2646d9cc0d766e1ac799c7917fa8", null ],
|
||||
[ "set_drive_left_state", "d1/d8a/group__lowerleveldrivesmeths.html#ga1eeb3cb47503c3011562f9c42828fab9", null ],
|
||||
[ "set_drive_right_state", "d1/d8a/group__lowerleveldrivesmeths.html#ga1b34ec9cee1f21cd15db310167a2faa5", null ],
|
||||
[ "set_drive_state", "d1/d8a/group__lowerleveldrivesmeths.html#ga3b69cf4a718c842fbe758d3f4267214e", null ],
|
||||
[ "set_drives_speed_left_right", "d1/d8a/group__lowerleveldrivesmeths.html#ga3d3ffb41783d34589e33cf61fed46c70", null ],
|
||||
[ "set_drive_left_speed", "d1/d8a/group__lowerleveldrivesmeths.html#ga1ee3da20ec98a821ab97ced070974861", null ],
|
||||
[ "set_drive_right_speed", "d1/d8a/group__lowerleveldrivesmeths.html#gaf8805d0d620a2fb78c576f36a2c81073", null ],
|
||||
[ "set_drive_speed", "d1/d8a/group__lowerleveldrivesmeths.html#ga5d67c84606d5b39996a99fcd6e7eb314", null ]
|
||||
];
|
|
@ -1,3 +0,0 @@
|
|||
<map id="Methods" name="Methods">
|
||||
<area shape="rect" id="node1" href="$d6/d98/group__lowerleveldrives.html" title="Lower level drives\l methods and getters" alt="" coords="5,5,151,47"/>
|
||||
</map>
|
|
@ -1 +0,0 @@
|
|||
f031a65379fe10c49a2f5864707d7064
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,597 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: Methods</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('d2/d40/group__higherlevelmeths.html','../../');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Methods<div class="ingroups"><a class="el" href="../../d9/d80/group__higherlevel.html">Higher level methods, setters and getters</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ga71df7ac5e41ae776a6c786d3dc36f35a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html#ga71df7ac5e41ae776a6c786d3dc36f35a">CodeRacer::stop_driving</a> ()</td></tr>
|
||||
<tr class="memdesc:ga71df7ac5e41ae776a6c786d3dc36f35a"><td class="mdescLeft"> </td><td class="mdescRight">Stops the racer and sets status LEDs. <a href="#ga71df7ac5e41ae776a6c786d3dc36f35a">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga71df7ac5e41ae776a6c786d3dc36f35a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga8be6a850099812153dcf5768d7fc8b8c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html#ga8be6a850099812153dcf5768d7fc8b8c">CodeRacer::drive_forward</a> ()</td></tr>
|
||||
<tr class="memdesc:ga8be6a850099812153dcf5768d7fc8b8c"><td class="mdescLeft"> </td><td class="mdescRight">Sets the speed and the directions of both drives so that it will move forward. <a href="#ga8be6a850099812153dcf5768d7fc8b8c">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga8be6a850099812153dcf5768d7fc8b8c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaae6fc379ec43cbe2cb2f63fbd12dbe0d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html#gaae6fc379ec43cbe2cb2f63fbd12dbe0d">CodeRacer::drive_forward</a> (uint8_t left_speed, uint8_t right_speed)</td></tr>
|
||||
<tr class="memdesc:gaae6fc379ec43cbe2cb2f63fbd12dbe0d"><td class="mdescLeft"> </td><td class="mdescRight">Sets the speed as specified for both drives and the directions of both drives so that it will move forward. <a href="#gaae6fc379ec43cbe2cb2f63fbd12dbe0d">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaae6fc379ec43cbe2cb2f63fbd12dbe0d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga98aa8a5a46f769d59e6c1067c8418cfb"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html#ga98aa8a5a46f769d59e6c1067c8418cfb">CodeRacer::drive_backward</a> ()</td></tr>
|
||||
<tr class="memdesc:ga98aa8a5a46f769d59e6c1067c8418cfb"><td class="mdescLeft"> </td><td class="mdescRight">Sets the speed and the directions of both drives so that it will move backward. <a href="#ga98aa8a5a46f769d59e6c1067c8418cfb">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga98aa8a5a46f769d59e6c1067c8418cfb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga6cd8356ac76360b014db6170276b6b30"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html#ga6cd8356ac76360b014db6170276b6b30">CodeRacer::drive_backward</a> (uint8_t left_speed, uint8_t right_speed)</td></tr>
|
||||
<tr class="memdesc:ga6cd8356ac76360b014db6170276b6b30"><td class="mdescLeft"> </td><td class="mdescRight">Sets the speed as specified for both drives and the directions of both drives so that it will move backward. <a href="#ga6cd8356ac76360b014db6170276b6b30">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga6cd8356ac76360b014db6170276b6b30"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga86b7caf6ff46e9d1ad90ed507864b175"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html#ga86b7caf6ff46e9d1ad90ed507864b175">CodeRacer::turn_left</a> ()</td></tr>
|
||||
<tr class="memdesc:ga86b7caf6ff46e9d1ad90ed507864b175"><td class="mdescLeft"> </td><td class="mdescRight">Will turn the racer to the left for the internally stroe time in ms and with the internally stored speed. <a href="#ga86b7caf6ff46e9d1ad90ed507864b175">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga86b7caf6ff46e9d1ad90ed507864b175"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga30e1ec3fbbc206f93ea66dbf91b5fd95"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html#ga30e1ec3fbbc206f93ea66dbf91b5fd95">CodeRacer::turn_left</a> (unsigned long turn_for_ms)</td></tr>
|
||||
<tr class="memdesc:ga30e1ec3fbbc206f93ea66dbf91b5fd95"><td class="mdescLeft"> </td><td class="mdescRight">Will turn the racer to the left for the specified time in ms and with the internally stored speed. <a href="#ga30e1ec3fbbc206f93ea66dbf91b5fd95">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga30e1ec3fbbc206f93ea66dbf91b5fd95"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae6daa587199e5bf95b1aac675de53b0e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html#gae6daa587199e5bf95b1aac675de53b0e">CodeRacer::turn_left</a> (unsigned long turn_for_ms, uint8_t left_speed, uint8_t right_speed)</td></tr>
|
||||
<tr class="memdesc:gae6daa587199e5bf95b1aac675de53b0e"><td class="mdescLeft"> </td><td class="mdescRight">Will turn the racer to the left for the specified time in ms and with the specified speed. <a href="#gae6daa587199e5bf95b1aac675de53b0e">More...</a><br /></td></tr>
|
||||
<tr class="separator:gae6daa587199e5bf95b1aac675de53b0e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga8969fb2d6e2b5ac44a99197931e6b8da"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html#ga8969fb2d6e2b5ac44a99197931e6b8da">CodeRacer::turn_right</a> ()</td></tr>
|
||||
<tr class="memdesc:ga8969fb2d6e2b5ac44a99197931e6b8da"><td class="mdescLeft"> </td><td class="mdescRight">Will turn the racer to the right for the internally stroe time in ms and with the internally stored speed. <a href="#ga8969fb2d6e2b5ac44a99197931e6b8da">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga8969fb2d6e2b5ac44a99197931e6b8da"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae1f175aad98d773b0206f483ae0bb4ea"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html#gae1f175aad98d773b0206f483ae0bb4ea">CodeRacer::turn_right</a> (unsigned long turn_for_ms)</td></tr>
|
||||
<tr class="memdesc:gae1f175aad98d773b0206f483ae0bb4ea"><td class="mdescLeft"> </td><td class="mdescRight">Will turn the racer to the right for the specified time in ms and with the internally stored speed. <a href="#gae1f175aad98d773b0206f483ae0bb4ea">More...</a><br /></td></tr>
|
||||
<tr class="separator:gae1f175aad98d773b0206f483ae0bb4ea"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad10b3457489cc7e25ffb4d64c539528a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html#gad10b3457489cc7e25ffb4d64c539528a">CodeRacer::turn_right</a> (unsigned long turn_for_ms, uint8_t left_speed, uint8_t right_speed)</td></tr>
|
||||
<tr class="memdesc:gad10b3457489cc7e25ffb4d64c539528a"><td class="mdescLeft"> </td><td class="mdescRight">Will turn the racer to the right for the specified time in ms and with the specified speed. <a href="#gad10b3457489cc7e25ffb4d64c539528a">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad10b3457489cc7e25ffb4d64c539528a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga128683caea019a89bce06f722ba92556"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html#ga128683caea019a89bce06f722ba92556">CodeRacer::start_stop_at_min_distance</a> ()</td></tr>
|
||||
<tr class="memdesc:ga128683caea019a89bce06f722ba92556"><td class="mdescLeft"> </td><td class="mdescRight">Enables to stopp the racer if during a distance measurement the measured distance is smaller then the internally stored minimal distance. <a href="#ga128683caea019a89bce06f722ba92556">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga128683caea019a89bce06f722ba92556"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga64bc1b2a8ed5bc3ec5e706fa70a1385d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html#ga64bc1b2a8ed5bc3ec5e706fa70a1385d">CodeRacer::start_stop_at_min_distance</a> (unsigned long min_distance_cm)</td></tr>
|
||||
<tr class="memdesc:ga64bc1b2a8ed5bc3ec5e706fa70a1385d"><td class="mdescLeft"> </td><td class="mdescRight">Enables to stopp the racer if during a distance measurement the measured distance is smaller then the specified minimal distance. <a href="#ga64bc1b2a8ed5bc3ec5e706fa70a1385d">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga64bc1b2a8ed5bc3ec5e706fa70a1385d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac664109241d08b8dc52db5721f394b22"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html#gac664109241d08b8dc52db5721f394b22">CodeRacer::stop_stop_at_min_distance</a> ()</td></tr>
|
||||
<tr class="memdesc:gac664109241d08b8dc52db5721f394b22"><td class="mdescLeft"> </td><td class="mdescRight">Disables to stopp the racer if during a distance measurement the measured distance is smaller then the specified minimal distance. <a href="#gac664109241d08b8dc52db5721f394b22">More...</a><br /></td></tr>
|
||||
<tr class="separator:gac664109241d08b8dc52db5721f394b22"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga34e2fe2123e76fd844482dfef6c5a9c8"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html#ga34e2fe2123e76fd844482dfef6c5a9c8">CodeRacer::start_stop</a> ()</td></tr>
|
||||
<tr class="memdesc:ga34e2fe2123e76fd844482dfef6c5a9c8"><td class="mdescLeft"> </td><td class="mdescRight">This will return if the codracer is in active mode or not. <a href="#ga34e2fe2123e76fd844482dfef6c5a9c8">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga34e2fe2123e76fd844482dfef6c5a9c8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ga71df7ac5e41ae776a6c786d3dc36f35a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga71df7ac5e41ae776a6c786d3dc36f35a">◆ </a></span>stop_driving()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::stop_driving </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Stops the racer and sets status LEDs. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00161">161</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  {</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  _servo_sweep = <span class="keyword">false</span>;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  _drive = <span class="keyword">false</span>;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  set_drives_stop_left_right();</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  set_leds_left_stop_frwd_right(LEDOFF, LEDON, LEDOFF, LEDOFF);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga8be6a850099812153dcf5768d7fc8b8c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga8be6a850099812153dcf5768d7fc8b8c">◆ </a></span>drive_forward() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::drive_forward </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the speed and the directions of both drives so that it will move forward. </p>
|
||||
<p>The speed is taken from the header file or set by one of the methods defined in the lower level drive methods section </p><dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00173">173</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00174"></a><span class="lineno"> 174</span> {</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  drive_forward(_drive_left_speed, _drive_right_speed);</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> }</div></div><!-- fragment --><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
|
||||
<img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
|
||||
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
|
||||
</div>
|
||||
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
|
||||
<div class="center"><img src="../../d2/d40/group__higherlevelmeths_ga8be6a850099812153dcf5768d7fc8b8c_cgraph.png" border="0" usemap="#d2/d40/group__higherlevelmeths_ga8be6a850099812153dcf5768d7fc8b8c_cgraph" alt=""/></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaae6fc379ec43cbe2cb2f63fbd12dbe0d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaae6fc379ec43cbe2cb2f63fbd12dbe0d">◆ </a></span>drive_forward() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::drive_forward </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>left_speed</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>right_speed</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the speed as specified for both drives and the directions of both drives so that it will move forward. </p>
|
||||
<p>The specified speed values for both drives will be stored internaly so next time if you use e.g. drive_forward() exactly the here specified values will be taken. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">left_speed</td><td>speed for the left side drive. 0<=speed<=255 </td></tr>
|
||||
<tr><td class="paramname">right_speed</td><td>speed for the right side drive. 0<=speed<=255 </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00185">185</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00186"></a><span class="lineno"> 186</span> {</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  set_drives_states_left_right(DRIVEFRWD, DRIVEFRWD);</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  set_drives_speed_left_right(left_speed, right_speed);</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  set_leds_left_stop_frwd_right(LEDOFF, LEDOFF, LEDON, LEDOFF);</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  _drive = <span class="keyword">true</span>;</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  _drive_set_at_ms = millis();</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga98aa8a5a46f769d59e6c1067c8418cfb"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga98aa8a5a46f769d59e6c1067c8418cfb">◆ </a></span>drive_backward() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::drive_backward </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the speed and the directions of both drives so that it will move backward. </p>
|
||||
<p>The speed is taken from the header file or set by one of the methods defined in the lower level drive methods section </p><dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00199">199</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00200"></a><span class="lineno"> 200</span> {</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  drive_backward(_drive_left_speed, _drive_right_speed);</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga6cd8356ac76360b014db6170276b6b30"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga6cd8356ac76360b014db6170276b6b30">◆ </a></span>drive_backward() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::drive_backward </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>left_speed</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>right_speed</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the speed as specified for both drives and the directions of both drives so that it will move backward. </p>
|
||||
<p>The specified speed values for both drives will be stored internaly so next time if you use e.g. drive_backward() exactly the here specified values will be taken. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">left_speed</td><td>speed for the left side drive. 0<=speed<=255 </td></tr>
|
||||
<tr><td class="paramname">right_speed</td><td>speed for the right side drive. 0<=speed<=255 </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00211">211</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00212"></a><span class="lineno"> 212</span> {</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  set_drives_states_left_right(DRIVEBACK, DRIVEBACK);</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  set_drives_speed_left_right(left_speed, right_speed);</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  set_leds_left_stop_frwd_right(LEDOFF, LEDON, LEDON, LEDOFF);</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  _drive = <span class="keyword">true</span>;</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  _drive_set_at_ms = millis();</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga86b7caf6ff46e9d1ad90ed507864b175"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga86b7caf6ff46e9d1ad90ed507864b175">◆ </a></span>turn_left() <span class="overload">[1/3]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::turn_left </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Will turn the racer to the left for the internally stroe time in ms and with the internally stored speed. </p>
|
||||
<p>The speed for both the left side and right side drive can be set by the methods described in the lower level drive section. The turn to left time can be set by thoose methods as well. The method is delayed until the racer has turned. </p><dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00226">226</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00227"></a><span class="lineno"> 227</span> {</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  turn_left(_turn_left_for_ms, _drive_left_speed, _drive_right_speed);</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga30e1ec3fbbc206f93ea66dbf91b5fd95"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga30e1ec3fbbc206f93ea66dbf91b5fd95">◆ </a></span>turn_left() <span class="overload">[2/3]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::turn_left </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">unsigned long </td>
|
||||
<td class="paramname"><em>turn_for_ms</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Will turn the racer to the left for the specified time in ms and with the internally stored speed. </p>
|
||||
<p>The specified duration of time is stored internally and will be used next time by e.g. turn_left() </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">turn_for_ms</td><td>duration of time in ms to turn the racer </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00237">237</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00238"></a><span class="lineno"> 238</span> {</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  turn_left(turn_for_ms, _drive_left_speed, _drive_right_speed);</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gae6daa587199e5bf95b1aac675de53b0e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gae6daa587199e5bf95b1aac675de53b0e">◆ </a></span>turn_left() <span class="overload">[3/3]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::turn_left </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">unsigned long </td>
|
||||
<td class="paramname"><em>turn_for_ms</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>left_speed</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>right_speed</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Will turn the racer to the left for the specified time in ms and with the specified speed. </p>
|
||||
<p>The specified duration of time and the specified speeds are stored internally and will be used next time by e.g. turn_left() </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">turn_for_ms</td><td>duration of time in ms to turn the racer </td></tr>
|
||||
<tr><td class="paramname">left_speed</td><td>speed for the left side drive </td></tr>
|
||||
<tr><td class="paramname">right_speed</td><td>speed for the right side drive </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00250">250</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00251"></a><span class="lineno"> 251</span> {</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  _drive = <span class="keyword">false</span>;</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  set_leds_left_stop_frwd_right(LEDON, LEDOFF, LEDOFF, LEDOFF); <span class="comment">// LEDs setzen</span></div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  set_drives_states_left_right(DRIVEBACK, DRIVEFRWD);</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  set_drives_speed_left_right(left_speed, right_speed);</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="comment">// wait set delay for the timed turn</span></div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  _turn_left_for_ms = turn_for_ms;</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  delay(_turn_left_for_ms);</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <span class="comment">// stop drives again</span></div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  set_drives_stop_left_right();</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga8969fb2d6e2b5ac44a99197931e6b8da"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga8969fb2d6e2b5ac44a99197931e6b8da">◆ </a></span>turn_right() <span class="overload">[1/3]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::turn_right </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Will turn the racer to the right for the internally stroe time in ms and with the internally stored speed. </p>
|
||||
<p>The speed for both the left side and right side drive can be set by the methods described in the lower level drive section. The turn to right time can be set by thoose methods as well. The method is delayed until the racer has turned. </p><dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00269">269</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00270"></a><span class="lineno"> 270</span> {</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  turn_right(_turn_right_for_ms, _drive_left_speed, _drive_right_speed);</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gae1f175aad98d773b0206f483ae0bb4ea"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gae1f175aad98d773b0206f483ae0bb4ea">◆ </a></span>turn_right() <span class="overload">[2/3]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::turn_right </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">unsigned long </td>
|
||||
<td class="paramname"><em>turn_for_ms</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Will turn the racer to the right for the specified time in ms and with the internally stored speed. </p>
|
||||
<p>The specified duration of time is stored internally and will be used next time by e.g. turn_right() </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">turn_for_ms</td><td>duration of time in ms to turn the racer </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00280">280</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00281"></a><span class="lineno"> 281</span> {</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  turn_right(turn_for_ms, _drive_left_speed, _drive_right_speed);</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gad10b3457489cc7e25ffb4d64c539528a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gad10b3457489cc7e25ffb4d64c539528a">◆ </a></span>turn_right() <span class="overload">[3/3]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::turn_right </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">unsigned long </td>
|
||||
<td class="paramname"><em>turn_for_ms</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>left_speed</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>right_speed</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Will turn the racer to the right for the specified time in ms and with the specified speed. </p>
|
||||
<p>The specified duration of time and the specified speeds are stored internally and will be used next time by e.g. turn_right() </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">turn_for_ms</td><td>duration of time in ms to turn the racer </td></tr>
|
||||
<tr><td class="paramname">left_speed</td><td>speed for the left side drive </td></tr>
|
||||
<tr><td class="paramname">right_speed</td><td>speed for the right side drive </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00293">293</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00294"></a><span class="lineno"> 294</span> {</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  _drive = <span class="keyword">false</span>;</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  set_leds_left_stop_frwd_right(LEDOFF, LEDOFF, LEDOFF, LEDON); <span class="comment">// LEDs setzen</span></div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  set_drives_states_left_right(DRIVEFRWD, DRIVEBACK);</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  set_drives_speed_left_right(left_speed, right_speed);</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <span class="comment">// wait set delay for the timed turn</span></div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  _turn_right_for_ms = turn_for_ms;</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  delay(_turn_right_for_ms);</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  <span class="comment">// stop drives again</span></div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  set_drives_stop_left_right();</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga128683caea019a89bce06f722ba92556"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga128683caea019a89bce06f722ba92556">◆ </a></span>start_stop_at_min_distance() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::start_stop_at_min_distance </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Enables to stopp the racer if during a distance measurement the measured distance is smaller then the internally stored minimal distance. </p>
|
||||
<p>This allow all of the none-single shot ultra sonic measurement methods to stopp the racer in the case the measured distance is smaller than minimal distance. This is just the enablement - you have to call one of the none-single-shot ultra sonic measurement methods continously while driving and maybe sweeping the servo. If the racer was stopped can be checked with stopped_at_min_distance() - it will return true in that case. The minimal distance can be set by the ultrasonic sensor setter methods. There is an example coming with the coderacer libary that you can load and get an idea how that works. </p><dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00314">314</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  {</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  start_stop_at_min_distance(_usonic_stop_distance_cm);</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga64bc1b2a8ed5bc3ec5e706fa70a1385d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga64bc1b2a8ed5bc3ec5e706fa70a1385d">◆ </a></span>start_stop_at_min_distance() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::start_stop_at_min_distance </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">unsigned long </td>
|
||||
<td class="paramname"><em>min_distance_cm</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Enables to stopp the racer if during a distance measurement the measured distance is smaller then the specified minimal distance. </p>
|
||||
<p>This is almos the same as described for start_stop_at_min_distance(). You can specify the distance in cm here - this value will be stored internally and used by start_stop_at_min_distance() next time. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">min_distance_cm</td><td>the minimal disctance in cm </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00324">324</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  {</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  <span class="keywordflow">if</span> (<span class="keyword">false</span> == _coderacer_stop_at_distance_enabled) {</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  _coderacer_stopped_at_min_distance = <span class="keyword">false</span>;</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  usonic_set_stop_distance_cm(min_distance_cm);</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  _coderacer_stop_at_distance_enabled = <span class="keyword">true</span>;</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  }</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gac664109241d08b8dc52db5721f394b22"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gac664109241d08b8dc52db5721f394b22">◆ </a></span>stop_stop_at_min_distance()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::stop_stop_at_min_distance </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Disables to stopp the racer if during a distance measurement the measured distance is smaller then the specified minimal distance. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00335">335</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  {</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  _coderacer_stop_at_distance_enabled = <span class="keyword">false</span>;</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga34e2fe2123e76fd844482dfef6c5a9c8"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga34e2fe2123e76fd844482dfef6c5a9c8">◆ </a></span>start_stop()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">bool CodeRacer::start_stop </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>This will return if the codracer is in active mode or not. </p>
|
||||
<p>There is a button used to toogle between active and inactive each time it is pressed This may help you to start driving and scanning the distance by pressing the button - and as well to stop the racer by pressing the button. This method will set the LEDs depending on the mode and sets the servo back to center and stopps the racer when leaving the active mode. You can leave or enter the active mode as well by setting using set_active() and set_inactive(). The button itself triggers and internall interrupt event and sets the active state - but you have to continously call that method to switch between inactive and active mode depending on the active state. If in inactive mode and fun is enabeld by just setting the coderacer_fun_enabled = true ... some fun will happen :-)</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>True if the coderacer is in active mode. False if in inactive mode. </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00348">348</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  {</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  <span class="keywordflow">if</span> (_coderracer_activ != coderracer_activ) {</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  _coderracer_activ = coderracer_activ;</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <span class="keywordflow">if</span> (<span class="keyword">true</span> == _coderracer_activ) {</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  set_leds_all_off();</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  delay(500);</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  }</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  stop_driving();</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  set_leds_all_on();</div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  delay(200);</div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  servo_set_to_center();</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  _servo_look_around_at_ms = millis() + random(20000, 120000);</div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  }</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  }</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span> </div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  <span class="keywordflow">if</span> ((<span class="keyword">false</span> == _coderracer_activ) && (<span class="keyword">true</span> == coderacer_fun_enabled)) {</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  kitt();</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  look_around();</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  }</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  </div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  <span class="keywordflow">return</span>(_coderracer_activ);</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
var group__higherlevelmeths =
|
||||
[
|
||||
[ "stop_driving", "d2/d40/group__higherlevelmeths.html#ga71df7ac5e41ae776a6c786d3dc36f35a", null ],
|
||||
[ "drive_forward", "d2/d40/group__higherlevelmeths.html#ga8be6a850099812153dcf5768d7fc8b8c", null ],
|
||||
[ "drive_forward", "d2/d40/group__higherlevelmeths.html#gaae6fc379ec43cbe2cb2f63fbd12dbe0d", null ],
|
||||
[ "drive_backward", "d2/d40/group__higherlevelmeths.html#ga98aa8a5a46f769d59e6c1067c8418cfb", null ],
|
||||
[ "drive_backward", "d2/d40/group__higherlevelmeths.html#ga6cd8356ac76360b014db6170276b6b30", null ],
|
||||
[ "turn_left", "d2/d40/group__higherlevelmeths.html#ga86b7caf6ff46e9d1ad90ed507864b175", null ],
|
||||
[ "turn_left", "d2/d40/group__higherlevelmeths.html#ga30e1ec3fbbc206f93ea66dbf91b5fd95", null ],
|
||||
[ "turn_left", "d2/d40/group__higherlevelmeths.html#gae6daa587199e5bf95b1aac675de53b0e", null ],
|
||||
[ "turn_right", "d2/d40/group__higherlevelmeths.html#ga8969fb2d6e2b5ac44a99197931e6b8da", null ],
|
||||
[ "turn_right", "d2/d40/group__higherlevelmeths.html#gae1f175aad98d773b0206f483ae0bb4ea", null ],
|
||||
[ "turn_right", "d2/d40/group__higherlevelmeths.html#gad10b3457489cc7e25ffb4d64c539528a", null ],
|
||||
[ "start_stop_at_min_distance", "d2/d40/group__higherlevelmeths.html#ga128683caea019a89bce06f722ba92556", null ],
|
||||
[ "start_stop_at_min_distance", "d2/d40/group__higherlevelmeths.html#ga64bc1b2a8ed5bc3ec5e706fa70a1385d", null ],
|
||||
[ "stop_stop_at_min_distance", "d2/d40/group__higherlevelmeths.html#gac664109241d08b8dc52db5721f394b22", null ],
|
||||
[ "start_stop", "d2/d40/group__higherlevelmeths.html#ga34e2fe2123e76fd844482dfef6c5a9c8", null ]
|
||||
];
|
|
@ -1,3 +0,0 @@
|
|||
<map id="Methods" name="Methods">
|
||||
<area shape="rect" id="node1" href="$d9/d80/group__higherlevel.html" title="Higher level methods,\l setters and getters" alt="" coords="5,5,152,47"/>
|
||||
</map>
|
|
@ -1 +0,0 @@
|
|||
14fcbf5ea95fbca4940db3735dae3e20
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,2 +0,0 @@
|
|||
<map id="CodeRacer::drive_forward" name="CodeRacer::drive_forward">
|
||||
</map>
|
|
@ -1 +0,0 @@
|
|||
88ea8cb2a7473284c7f30fcb34c5462f
|
Before Width: | Height: | Size: 2 KiB |
|
@ -1,110 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: Lower level servo drive methods and getters</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('d3/d17/group__lowerlevelservo.html','../../');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#groups">Modules</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Lower level servo drive methods and getters</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
|
||||
Modules</h2></td></tr>
|
||||
<tr class="memitem:db/dd5/group__lowerlevelservomeths"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/dd5/group__lowerlevelservomeths.html">Methods</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:d4/df4/group__lowerlevelservogetters"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/df4/group__lowerlevelservogetters.html">Getters</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,5 +0,0 @@
|
|||
var group__lowerlevelservo =
|
||||
[
|
||||
[ "Methods", "db/dd5/group__lowerlevelservomeths.html", "db/dd5/group__lowerlevelservomeths" ],
|
||||
[ "Getters", "d4/df4/group__lowerlevelservogetters.html", "d4/df4/group__lowerlevelservogetters" ]
|
||||
];
|
|
@ -1,4 +0,0 @@
|
|||
<map id="Lower level servo drive methods and getters" name="Lower level servo drive methods and getters">
|
||||
<area shape="rect" id="node1" href="$d4/df4/group__lowerlevelservogetters.html" title="Getters" alt="" coords="206,5,271,32"/>
|
||||
<area shape="rect" id="node3" href="$db/dd5/group__lowerlevelservomeths.html" title="Methods" alt="" coords="203,56,275,83"/>
|
||||
</map>
|
|
@ -1 +0,0 @@
|
|||
580a059516c5c4bee6990866828766d5
|
Before Width: | Height: | Size: 2.8 KiB |
|
@ -1,182 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: Getters</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('d4/df4/group__lowerlevelservogetters.html','../../');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Getters<div class="ingroups"><a class="el" href="../../d3/d17/group__lowerlevelservo.html">Lower level servo drive methods and getters</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ga451b3ecd272e9a11de4b221f8d771432"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/df4/group__lowerlevelservogetters.html#ga451b3ecd272e9a11de4b221f8d771432">CodeRacer::servo_position</a> ()</td></tr>
|
||||
<tr class="memdesc:ga451b3ecd272e9a11de4b221f8d771432"><td class="mdescLeft"> </td><td class="mdescRight">Get the actual position of the servo. <a href="#ga451b3ecd272e9a11de4b221f8d771432">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga451b3ecd272e9a11de4b221f8d771432"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaeed05a3d4e06adccebdfce207b734b2f"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/df4/group__lowerlevelservogetters.html#gaeed05a3d4e06adccebdfce207b734b2f">CodeRacer::servo_position_set_at_ms</a> ()</td></tr>
|
||||
<tr class="memdesc:gaeed05a3d4e06adccebdfce207b734b2f"><td class="mdescLeft"> </td><td class="mdescRight">Get the system time in ms the servo was set to the actual position. <a href="#gaeed05a3d4e06adccebdfce207b734b2f">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaeed05a3d4e06adccebdfce207b734b2f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga84ba256b9ccdf0e9f4280279da68a509"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/df4/group__lowerlevelservogetters.html#ga84ba256b9ccdf0e9f4280279da68a509">CodeRacer::servo_position_eta_in_ms</a> ()</td></tr>
|
||||
<tr class="memdesc:ga84ba256b9ccdf0e9f4280279da68a509"><td class="mdescLeft"> </td><td class="mdescRight">Get the system time in ms the servo will reach its position This is an estimated time. If this is a time in the future, the servo may still moving. If this is a time in the past , the servo should have reached its postion already. <a href="#ga84ba256b9ccdf0e9f4280279da68a509">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga84ba256b9ccdf0e9f4280279da68a509"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ga451b3ecd272e9a11de4b221f8d771432"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga451b3ecd272e9a11de4b221f8d771432">◆ </a></span>servo_position()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">uint8_t CodeRacer::servo_position </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Get the actual position of the servo. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Actual position of the servo </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00632">632</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00632"></a><span class="lineno"> 632</span>  {</div><div class="line"><a name="l00633"></a><span class="lineno"> 633</span>  <span class="keywordflow">return</span>(_servo_position);</div><div class="line"><a name="l00634"></a><span class="lineno"> 634</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaeed05a3d4e06adccebdfce207b734b2f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaeed05a3d4e06adccebdfce207b734b2f">◆ </a></span>servo_position_set_at_ms()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">unsigned long CodeRacer::servo_position_set_at_ms </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Get the system time in ms the servo was set to the actual position. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>System time in ms the servo was set </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00639">639</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00639"></a><span class="lineno"> 639</span>  {</div><div class="line"><a name="l00640"></a><span class="lineno"> 640</span>  <span class="keywordflow">return</span>(_servo_position_set_at_ms);</div><div class="line"><a name="l00641"></a><span class="lineno"> 641</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga84ba256b9ccdf0e9f4280279da68a509"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga84ba256b9ccdf0e9f4280279da68a509">◆ </a></span>servo_position_eta_in_ms()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">unsigned long CodeRacer::servo_position_eta_in_ms </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Get the system time in ms the servo will reach its position This is an estimated time. If this is a time in the future, the servo may still moving. If this is a time in the past , the servo should have reached its postion already. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>System time in ms the servo will reach its position </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00649">649</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00649"></a><span class="lineno"> 649</span>  {</div><div class="line"><a name="l00650"></a><span class="lineno"> 650</span>  <span class="keywordflow">return</span>(_servo_position_eta_in_ms);</div><div class="line"><a name="l00651"></a><span class="lineno"> 651</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +0,0 @@
|
|||
var group__lowerlevelservogetters =
|
||||
[
|
||||
[ "servo_position", "d4/df4/group__lowerlevelservogetters.html#ga451b3ecd272e9a11de4b221f8d771432", null ],
|
||||
[ "servo_position_set_at_ms", "d4/df4/group__lowerlevelservogetters.html#gaeed05a3d4e06adccebdfce207b734b2f", null ],
|
||||
[ "servo_position_eta_in_ms", "d4/df4/group__lowerlevelservogetters.html#ga84ba256b9ccdf0e9f4280279da68a509", null ]
|
||||
];
|
|
@ -1,3 +0,0 @@
|
|||
<map id="Getters" name="Getters">
|
||||
<area shape="rect" id="node2" href="$d3/d17/group__lowerlevelservo.html" title="Lower level servo drive\l methods and getters" alt="" coords="5,5,155,47"/>
|
||||
</map>
|
|
@ -1 +0,0 @@
|
|||
68f8f6d7188bd071914c1b796efb68b6
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,110 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: Lower level drives methods and getters</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('d6/d98/group__lowerleveldrives.html','../../');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#groups">Modules</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Lower level drives methods and getters</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
|
||||
Modules</h2></td></tr>
|
||||
<tr class="memitem:d1/d8a/group__lowerleveldrivesmeths"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d8a/group__lowerleveldrivesmeths.html">Methods</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:d0/d0a/group__lowerleveldrivesgetters"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d0a/group__lowerleveldrivesgetters.html">Getters</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,5 +0,0 @@
|
|||
var group__lowerleveldrives =
|
||||
[
|
||||
[ "Methods", "d1/d8a/group__lowerleveldrivesmeths.html", "d1/d8a/group__lowerleveldrivesmeths" ],
|
||||
[ "Getters", "d0/d0a/group__lowerleveldrivesgetters.html", "d0/d0a/group__lowerleveldrivesgetters" ]
|
||||
];
|
|
@ -1,4 +0,0 @@
|
|||
<map id="Lower level drives methods and getters" name="Lower level drives methods and getters">
|
||||
<area shape="rect" id="node2" href="$d0/d0a/group__lowerleveldrivesgetters.html" title="Getters" alt="" coords="202,5,267,32"/>
|
||||
<area shape="rect" id="node3" href="$d1/d8a/group__lowerleveldrivesmeths.html" title="Methods" alt="" coords="199,56,271,83"/>
|
||||
</map>
|
|
@ -1 +0,0 @@
|
|||
929320c5d691931416a1f3fbdc41f4b0
|
Before Width: | Height: | Size: 2.8 KiB |
|
@ -1,335 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: Methods</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('d6/dfc/group__lowerlevelusmeths.html','../../');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Methods<div class="ingroups"><a class="el" href="../../da/daf/group__lowerlevelus.html">Lower level ultra sonic methods and getters</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ga5f034198a28b069478c454c63dbfa225"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dfc/group__lowerlevelusmeths.html#ga5f034198a28b069478c454c63dbfa225">CodeRacer::usonic_measure_cm</a> ()</td></tr>
|
||||
<tr class="memdesc:ga5f034198a28b069478c454c63dbfa225"><td class="mdescLeft"> </td><td class="mdescRight">Measures the distance to the next object in front of the ultra sonic sensor in cm. <a href="#ga5f034198a28b069478c454c63dbfa225">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga5f034198a28b069478c454c63dbfa225"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaa01602a576fd57609bc7e08f8ef32e58"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dfc/group__lowerlevelusmeths.html#gaa01602a576fd57609bc7e08f8ef32e58">CodeRacer::usonic_measure_us</a> ()</td></tr>
|
||||
<tr class="memdesc:gaa01602a576fd57609bc7e08f8ef32e58"><td class="mdescLeft"> </td><td class="mdescRight">Measures the distance to the next object in front of the ultra sonic sensor in microseconds. <a href="#gaa01602a576fd57609bc7e08f8ef32e58">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaa01602a576fd57609bc7e08f8ef32e58"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gafdd5c75d7a8e7b7c993e512ee93dde9a"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dfc/group__lowerlevelusmeths.html#gafdd5c75d7a8e7b7c993e512ee93dde9a">CodeRacer::usonic_measure_cm</a> (unsigned long max_echo_run_time_us)</td></tr>
|
||||
<tr class="memdesc:gafdd5c75d7a8e7b7c993e512ee93dde9a"><td class="mdescLeft"> </td><td class="mdescRight">Measures the distance to the next object in front of the ultra sonic sensor in cm. <a href="#gafdd5c75d7a8e7b7c993e512ee93dde9a">More...</a><br /></td></tr>
|
||||
<tr class="separator:gafdd5c75d7a8e7b7c993e512ee93dde9a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1f3401ef472cb11997e7dc98ef3e2424"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dfc/group__lowerlevelusmeths.html#ga1f3401ef472cb11997e7dc98ef3e2424">CodeRacer::usonic_measure_us</a> (unsigned long max_echo_run_time_us)</td></tr>
|
||||
<tr class="memdesc:ga1f3401ef472cb11997e7dc98ef3e2424"><td class="mdescLeft"> </td><td class="mdescRight">Measures the distance to the next object in front of the ultra sonic sensor in microseconds. <a href="#ga1f3401ef472cb11997e7dc98ef3e2424">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1f3401ef472cb11997e7dc98ef3e2424"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga0c00edbbf4a3169613c9ea84d6e7dc13"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dfc/group__lowerlevelusmeths.html#ga0c00edbbf4a3169613c9ea84d6e7dc13">CodeRacer::usonic_measure_single_shot_cm</a> ()</td></tr>
|
||||
<tr class="memdesc:ga0c00edbbf4a3169613c9ea84d6e7dc13"><td class="mdescLeft"> </td><td class="mdescRight">Measures the distance to the next object in front of the ultra sonic sensor in cm. <a href="#ga0c00edbbf4a3169613c9ea84d6e7dc13">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga0c00edbbf4a3169613c9ea84d6e7dc13"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad4309b6da17085575fb0c55559e240b8"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dfc/group__lowerlevelusmeths.html#gad4309b6da17085575fb0c55559e240b8">CodeRacer::usonic_measure_single_shot_us</a> ()</td></tr>
|
||||
<tr class="memdesc:gad4309b6da17085575fb0c55559e240b8"><td class="mdescLeft"> </td><td class="mdescRight">Measures the distance to the next object in front of the ultra sonic sensor in microseconds. <a href="#gad4309b6da17085575fb0c55559e240b8">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad4309b6da17085575fb0c55559e240b8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gab413551ea8a67e1b60eda1671029b645"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dfc/group__lowerlevelusmeths.html#gab413551ea8a67e1b60eda1671029b645">CodeRacer::usonic_measure_single_shot_cm</a> (unsigned long max_echo_run_time_us)</td></tr>
|
||||
<tr class="memdesc:gab413551ea8a67e1b60eda1671029b645"><td class="mdescLeft"> </td><td class="mdescRight">Measures the distance to the next object in front of the ultra sonic sensor in cm. <a href="#gab413551ea8a67e1b60eda1671029b645">More...</a><br /></td></tr>
|
||||
<tr class="separator:gab413551ea8a67e1b60eda1671029b645"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1b5b43372082f5daeee47410a09a590c"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dfc/group__lowerlevelusmeths.html#ga1b5b43372082f5daeee47410a09a590c">CodeRacer::usonic_measure_single_shot_us</a> (unsigned long max_echo_run_time_us)</td></tr>
|
||||
<tr class="memdesc:ga1b5b43372082f5daeee47410a09a590c"><td class="mdescLeft"> </td><td class="mdescRight">Measures the distance to the next object in front of the ultra sonic sensor in microseconds. <a href="#ga1b5b43372082f5daeee47410a09a590c">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1b5b43372082f5daeee47410a09a590c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ga5f034198a28b069478c454c63dbfa225"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga5f034198a28b069478c454c63dbfa225">◆ </a></span>usonic_measure_cm() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">unsigned long CodeRacer::usonic_measure_cm </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Measures the distance to the next object in front of the ultra sonic sensor in cm. </p>
|
||||
<p>This is the medium one out of 3 measurements. The maximum measured distance is about 100cm and defined by the US_MAX_ECHO_TIME_US setting in the header file. </p><dl class="section return"><dt>Returns</dt><dd>The measured distance in cm. </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00672">672</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00673"></a><span class="lineno"> 673</span> {</div><div class="line"><a name="l00674"></a><span class="lineno"> 674</span>  <span class="keywordflow">return</span>(usonic_measure_cm(US_MAX_ECHO_TIME_US));</div><div class="line"><a name="l00675"></a><span class="lineno"> 675</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaa01602a576fd57609bc7e08f8ef32e58"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaa01602a576fd57609bc7e08f8ef32e58">◆ </a></span>usonic_measure_us() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">unsigned long CodeRacer::usonic_measure_us </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Measures the distance to the next object in front of the ultra sonic sensor in microseconds. </p>
|
||||
<p>This is the medium one out of 3 measurements. The maximum measured distance is about 6000 microseconds and defined by the US_MAX_ECHO_TIME_US setting in the header file. </p><dl class="section return"><dt>Returns</dt><dd>The measured distance in microseconds. </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00682">682</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00683"></a><span class="lineno"> 683</span>  {</div><div class="line"><a name="l00684"></a><span class="lineno"> 684</span>  <span class="keywordflow">return</span>(usonic_measure_us(US_MAX_ECHO_TIME_US));</div><div class="line"><a name="l00685"></a><span class="lineno"> 685</span>  }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gafdd5c75d7a8e7b7c993e512ee93dde9a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gafdd5c75d7a8e7b7c993e512ee93dde9a">◆ </a></span>usonic_measure_cm() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">unsigned long CodeRacer::usonic_measure_cm </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">unsigned long </td>
|
||||
<td class="paramname"><em>max_echo_run_time_us</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Measures the distance to the next object in front of the ultra sonic sensor in cm. </p>
|
||||
<p>This is the medium one out of 3 measurements. Be careful with high values for max_echo_run_time_us - this may increase run time due to the fact that if there is nothing in range of the sensor it will wait until this specified run time of the echo is over. The maximum range the sensor is specified for is about 300cm. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">max_echo_run_time_us</td><td>Defines the maximum echo run time and by that the maximum of distance that can be measured. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The measured distance in cm. </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00694">694</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00695"></a><span class="lineno"> 695</span> {</div><div class="line"><a name="l00696"></a><span class="lineno"> 696</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> echo_runtime_us = usonic_measure_us(max_echo_run_time_us);</div><div class="line"><a name="l00697"></a><span class="lineno"> 697</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> distance_cm = echo_runtime_us * 0.0172;</div><div class="line"><a name="l00698"></a><span class="lineno"> 698</span>  <span class="comment">//Serial.print("MEASURE_DISTANCE. Distance in cm is: ");</span></div><div class="line"><a name="l00699"></a><span class="lineno"> 699</span>  <span class="comment">//Serial.println(distance_cm);</span></div><div class="line"><a name="l00700"></a><span class="lineno"> 700</span>  _usonic_distance_cm = distance_cm;</div><div class="line"><a name="l00701"></a><span class="lineno"> 701</span>  <span class="keywordflow">return</span>(distance_cm);</div><div class="line"><a name="l00702"></a><span class="lineno"> 702</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga1f3401ef472cb11997e7dc98ef3e2424"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1f3401ef472cb11997e7dc98ef3e2424">◆ </a></span>usonic_measure_us() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">unsigned long CodeRacer::usonic_measure_us </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">unsigned long </td>
|
||||
<td class="paramname"><em>max_echo_run_time_us</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Measures the distance to the next object in front of the ultra sonic sensor in microseconds. </p>
|
||||
<p>This is the medium one out of 3 measurements. Be careful with high values for max_echo_run_time_us - this may increase run time due to the fact that if there is nothing in range of the sensor it will wait until this specified run time of the echo is over. The maximum range the sensor is specified for is about 300cm. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">max_echo_run_time_us</td><td>Defines the maximum echo run time in microseconds and by that the maximum of distance that can be measured. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The measured distance in microseconds. </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00711">711</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00712"></a><span class="lineno"> 712</span> {</div><div class="line"><a name="l00713"></a><span class="lineno"> 713</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> echo_runtime_us[3] = { 0,0,0 };</div><div class="line"><a name="l00714"></a><span class="lineno"> 714</span>  uint8_t measnr = 0;</div><div class="line"><a name="l00715"></a><span class="lineno"> 715</span> </div><div class="line"><a name="l00716"></a><span class="lineno"> 716</span>  <span class="keywordflow">do</span> {</div><div class="line"><a name="l00717"></a><span class="lineno"> 717</span>  echo_runtime_us[measnr] = usonic_measure_single_shot_us(max_echo_run_time_us);</div><div class="line"><a name="l00718"></a><span class="lineno"> 718</span>  <span class="keywordflow">if</span> (echo_runtime_us[measnr] > 200) {</div><div class="line"><a name="l00719"></a><span class="lineno"> 719</span>  measnr++;</div><div class="line"><a name="l00720"></a><span class="lineno"> 720</span>  }</div><div class="line"><a name="l00721"></a><span class="lineno"> 721</span>  } <span class="keywordflow">while</span> (measnr < 3);</div><div class="line"><a name="l00722"></a><span class="lineno"> 722</span> </div><div class="line"><a name="l00723"></a><span class="lineno"> 723</span>  <span class="comment">// we will take the medium out of 3 values ... </span></div><div class="line"><a name="l00724"></a><span class="lineno"> 724</span>  <span class="keywordflow">if</span> (echo_runtime_us[0] > echo_runtime_us[1]) { std::swap(echo_runtime_us[0], echo_runtime_us[1]); }</div><div class="line"><a name="l00725"></a><span class="lineno"> 725</span>  <span class="keywordflow">if</span> (echo_runtime_us[1] > echo_runtime_us[2]) { std::swap(echo_runtime_us[1], echo_runtime_us[2]); }</div><div class="line"><a name="l00726"></a><span class="lineno"> 726</span>  <span class="keywordflow">if</span> (echo_runtime_us[0] > echo_runtime_us[1]) { std::swap(echo_runtime_us[0], echo_runtime_us[1]); }</div><div class="line"><a name="l00727"></a><span class="lineno"> 727</span> </div><div class="line"><a name="l00728"></a><span class="lineno"> 728</span>  <span class="comment">//Serial.print("MEASURE_DISTANCE_US. Echo runtime in us is: ");</span></div><div class="line"><a name="l00729"></a><span class="lineno"> 729</span>  <span class="comment">//Serial.println(echo_runtime_us[1]);</span></div><div class="line"><a name="l00730"></a><span class="lineno"> 730</span> </div><div class="line"><a name="l00731"></a><span class="lineno"> 731</span>  <span class="comment">// if the stop at minimal distance is enabeled - check for minimal distance is reached</span></div><div class="line"><a name="l00732"></a><span class="lineno"> 732</span>  <span class="keywordflow">if</span> (<span class="keyword">true</span> == _coderacer_stop_at_distance_enabled) {</div><div class="line"><a name="l00733"></a><span class="lineno"> 733</span>  <span class="keywordflow">if</span> (echo_runtime_us[1] <= _usonic_stop_distance_us) {</div><div class="line"><a name="l00734"></a><span class="lineno"> 734</span>  _coderacer_stopped_at_min_distance = <span class="keyword">true</span>;</div><div class="line"><a name="l00735"></a><span class="lineno"> 735</span>  stop_driving();</div><div class="line"><a name="l00736"></a><span class="lineno"> 736</span>  _coderacer_stop_at_distance_enabled = <span class="keyword">false</span>;</div><div class="line"><a name="l00737"></a><span class="lineno"> 737</span>  }</div><div class="line"><a name="l00738"></a><span class="lineno"> 738</span>  }</div><div class="line"><a name="l00739"></a><span class="lineno"> 739</span>  _usonic_distance_us = echo_runtime_us[1];</div><div class="line"><a name="l00740"></a><span class="lineno"> 740</span>  <span class="keywordflow">return</span>(echo_runtime_us[1]);</div><div class="line"><a name="l00741"></a><span class="lineno"> 741</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga0c00edbbf4a3169613c9ea84d6e7dc13"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga0c00edbbf4a3169613c9ea84d6e7dc13">◆ </a></span>usonic_measure_single_shot_cm() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">unsigned long CodeRacer::usonic_measure_single_shot_cm </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Measures the distance to the next object in front of the ultra sonic sensor in cm. </p>
|
||||
<p>This is a one shot measurement. The maximum measured distance is about 6000 microseconds and defined by the US_MAX_ECHO_TIME_US setting in the header file. </p><dl class="section return"><dt>Returns</dt><dd>The measured distance in cm. </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00748">748</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00749"></a><span class="lineno"> 749</span> {</div><div class="line"><a name="l00750"></a><span class="lineno"> 750</span>  <span class="keywordflow">return</span>(usonic_measure_single_shot_cm(US_MAX_ECHO_TIME_US));</div><div class="line"><a name="l00751"></a><span class="lineno"> 751</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gad4309b6da17085575fb0c55559e240b8"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gad4309b6da17085575fb0c55559e240b8">◆ </a></span>usonic_measure_single_shot_us() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">unsigned long CodeRacer::usonic_measure_single_shot_us </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Measures the distance to the next object in front of the ultra sonic sensor in microseconds. </p>
|
||||
<p>This is a one shot measurement. The maximum measured distance is about 6000 microseconds and defined by the US_MAX_ECHO_TIME_US setting in the header file. </p><dl class="section return"><dt>Returns</dt><dd>The measured distance in microseconds. </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00758">758</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00759"></a><span class="lineno"> 759</span> {</div><div class="line"><a name="l00760"></a><span class="lineno"> 760</span>  <span class="keywordflow">return</span>(usonic_measure_single_shot_us(US_MAX_ECHO_TIME_US));</div><div class="line"><a name="l00761"></a><span class="lineno"> 761</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gab413551ea8a67e1b60eda1671029b645"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gab413551ea8a67e1b60eda1671029b645">◆ </a></span>usonic_measure_single_shot_cm() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">unsigned long CodeRacer::usonic_measure_single_shot_cm </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">unsigned long </td>
|
||||
<td class="paramname"><em>max_echo_run_time_us</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Measures the distance to the next object in front of the ultra sonic sensor in cm. </p>
|
||||
<p>This is a one shot measurement. Be careful with high values for max_echo_run_time_us - this may increase run time due to the fact that if there is nothing in range of the sensor it will wait until this specified run time of the echo is over. The maximum range the sensor is specified for is about 300cm. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">max_echo_run_time_us</td><td>Defines the maximum echo run time in microseconds and by that the maximum of distance that can be measured. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The measured distance in cm. </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00770">770</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00771"></a><span class="lineno"> 771</span> {</div><div class="line"><a name="l00772"></a><span class="lineno"> 772</span>  <span class="comment">// convert into cm ... 344m/sec is the speed of noise - thus 34400cm/sec ... or 34,400cm/milisec ... or 0,0344cm/microsec</span></div><div class="line"><a name="l00773"></a><span class="lineno"> 773</span>  <span class="comment">// the echo has to go the distance twice - forth and back - so the duration has to be the half of the measured one</span></div><div class="line"><a name="l00774"></a><span class="lineno"> 774</span>  <span class="comment">// distance_cm = echo_duration/2 * 0,0344 or distance_cm = echo_duration/2 / 29,1 or distance_cm = echo_duration * 0,0172</span></div><div class="line"><a name="l00775"></a><span class="lineno"> 775</span>  <span class="comment">// distance_cm = (echo_duration/2) / 29.1;</span></div><div class="line"><a name="l00776"></a><span class="lineno"> 776</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> echo_runtime_us = usonic_measure_single_shot_us(max_echo_run_time_us);</div><div class="line"><a name="l00777"></a><span class="lineno"> 777</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> distance_cm = echo_runtime_us * 0.0172;</div><div class="line"><a name="l00778"></a><span class="lineno"> 778</span>  <span class="comment">//Serial.print("MEASURE_DISTANCE. Distance in cm is: ");</span></div><div class="line"><a name="l00779"></a><span class="lineno"> 779</span>  <span class="comment">//Serial.println(distance_cm);</span></div><div class="line"><a name="l00780"></a><span class="lineno"> 780</span>  _usonic_distance_cm = distance_cm;</div><div class="line"><a name="l00781"></a><span class="lineno"> 781</span>  <span class="keywordflow">return</span>(distance_cm);</div><div class="line"><a name="l00782"></a><span class="lineno"> 782</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga1b5b43372082f5daeee47410a09a590c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1b5b43372082f5daeee47410a09a590c">◆ </a></span>usonic_measure_single_shot_us() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">unsigned long CodeRacer::usonic_measure_single_shot_us </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">unsigned long </td>
|
||||
<td class="paramname"><em>max_echo_run_time_us</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Measures the distance to the next object in front of the ultra sonic sensor in microseconds. </p>
|
||||
<p>This is a one shot measurement. Be careful with high values for max_echo_run_time_us - this may increase run time due to the fact that if there is nothing in range of the sensor it will wait until this specified run time of the echo is over. The maximum range the sensor is specified for is about 300cm. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">max_echo_run_time_us</td><td>Defines the maximum echo run time in microseconds and by that the maximum of distance that can be measured. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The measured distance in microseconds. </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00791">791</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00792"></a><span class="lineno"> 792</span>  {</div><div class="line"><a name="l00793"></a><span class="lineno"> 793</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> echo_runtime_us;</div><div class="line"><a name="l00794"></a><span class="lineno"> 794</span>  <span class="comment">// start measurement - send a short pulse "HIGH" to the TRIG pin of the ultrasonic sensor</span></div><div class="line"><a name="l00795"></a><span class="lineno"> 795</span>  pinMode(_us_echo_pin, OUTPUT);</div><div class="line"><a name="l00796"></a><span class="lineno"> 796</span>  pinMode(_us_echo_pin, INPUT);</div><div class="line"><a name="l00797"></a><span class="lineno"> 797</span>  digitalWrite(_us_trigger_pin, LOW);</div><div class="line"><a name="l00798"></a><span class="lineno"> 798</span>  delayMicroseconds(2);</div><div class="line"><a name="l00799"></a><span class="lineno"> 799</span>  digitalWrite(_us_trigger_pin, HIGH);</div><div class="line"><a name="l00800"></a><span class="lineno"> 800</span>  delayMicroseconds(10);</div><div class="line"><a name="l00801"></a><span class="lineno"> 801</span>  digitalWrite(_us_trigger_pin, LOW);</div><div class="line"><a name="l00802"></a><span class="lineno"> 802</span>  <span class="comment">// measure runtime in microseconds until the ECHO pin aof the sensor goes HIGH</span></div><div class="line"><a name="l00803"></a><span class="lineno"> 803</span>  echo_runtime_us = pulseInLong(_us_echo_pin, HIGH, max_echo_run_time_us);</div><div class="line"><a name="l00804"></a><span class="lineno"> 804</span>  <span class="keywordflow">if</span> (echo_runtime_us == 0) {</div><div class="line"><a name="l00805"></a><span class="lineno"> 805</span>  echo_runtime_us = max_echo_run_time_us; <span class="comment">// US_MAX_ECHO_TIME_US;</span></div><div class="line"><a name="l00806"></a><span class="lineno"> 806</span>  }</div><div class="line"><a name="l00807"></a><span class="lineno"> 807</span>  <span class="comment">//Serial.print("MEASURE_DISTANCE_US. Echo runtime in us is: ");</span></div><div class="line"><a name="l00808"></a><span class="lineno"> 808</span>  <span class="comment">//Serial.println(echo_runtime_us);</span></div><div class="line"><a name="l00809"></a><span class="lineno"> 809</span>  _usonic_distance_us = echo_runtime_us;</div><div class="line"><a name="l00810"></a><span class="lineno"> 810</span>  <span class="keywordflow">return</span>(echo_runtime_us);</div><div class="line"><a name="l00811"></a><span class="lineno"> 811</span>  }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,11 +0,0 @@
|
|||
var group__lowerlevelusmeths =
|
||||
[
|
||||
[ "usonic_measure_cm", "d6/dfc/group__lowerlevelusmeths.html#ga5f034198a28b069478c454c63dbfa225", null ],
|
||||
[ "usonic_measure_us", "d6/dfc/group__lowerlevelusmeths.html#gaa01602a576fd57609bc7e08f8ef32e58", null ],
|
||||
[ "usonic_measure_cm", "d6/dfc/group__lowerlevelusmeths.html#gafdd5c75d7a8e7b7c993e512ee93dde9a", null ],
|
||||
[ "usonic_measure_us", "d6/dfc/group__lowerlevelusmeths.html#ga1f3401ef472cb11997e7dc98ef3e2424", null ],
|
||||
[ "usonic_measure_single_shot_cm", "d6/dfc/group__lowerlevelusmeths.html#ga0c00edbbf4a3169613c9ea84d6e7dc13", null ],
|
||||
[ "usonic_measure_single_shot_us", "d6/dfc/group__lowerlevelusmeths.html#gad4309b6da17085575fb0c55559e240b8", null ],
|
||||
[ "usonic_measure_single_shot_cm", "d6/dfc/group__lowerlevelusmeths.html#gab413551ea8a67e1b60eda1671029b645", null ],
|
||||
[ "usonic_measure_single_shot_us", "d6/dfc/group__lowerlevelusmeths.html#ga1b5b43372082f5daeee47410a09a590c", null ]
|
||||
];
|
|
@ -1,3 +0,0 @@
|
|||
<map id="Methods" name="Methods">
|
||||
<area shape="rect" id="node1" href="$da/daf/group__lowerlevelus.html" title="Lower level ultra sonic\l methods and getters" alt="" coords="5,5,155,47"/>
|
||||
</map>
|
|
@ -1 +0,0 @@
|
|||
8c86a47e7c3ee5eacbea426bb722fea2
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,108 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: Lower level LED methods</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('d7/d0f/group__lowerlevelled.html','../../');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#groups">Modules</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Lower level LED methods</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
|
||||
Modules</h2></td></tr>
|
||||
<tr class="memitem:dd/dff/group__lowerlevelledmeths"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/dff/group__lowerlevelledmeths.html">Methods</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,4 +0,0 @@
|
|||
var group__lowerlevelled =
|
||||
[
|
||||
[ "Methods", "dd/dff/group__lowerlevelledmeths.html", "dd/dff/group__lowerlevelledmeths" ]
|
||||
];
|
|
@ -1,3 +0,0 @@
|
|||
<map id="Lower level LED methods" name="Lower level LED methods">
|
||||
<area shape="rect" id="node2" href="$dd/dff/group__lowerlevelledmeths.html" title="Methods" alt="" coords="221,5,293,32"/>
|
||||
</map>
|
|
@ -1 +0,0 @@
|
|||
ae42a26c171e691377cc1cea12a6b159
|
Before Width: | Height: | Size: 1.1 KiB |
|
@ -1,282 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: Getters and setters</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('d7/d45/group__higherlevelgetters.html','../../');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Getters and setters<div class="ingroups"><a class="el" href="../../d9/d80/group__higherlevel.html">Higher level methods, setters and getters</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:gae8b8c0ab24ccb572281785aeca8541e1"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d45/group__higherlevelgetters.html#gae8b8c0ab24ccb572281785aeca8541e1">CodeRacer::stopped_at_min_distance</a> ()</td></tr>
|
||||
<tr class="memdesc:gae8b8c0ab24ccb572281785aeca8541e1"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the racer was stopped at minimum distance. This set to false each time start_stop_at_min_distance() is called. <a href="#gae8b8c0ab24ccb572281785aeca8541e1">More...</a><br /></td></tr>
|
||||
<tr class="separator:gae8b8c0ab24ccb572281785aeca8541e1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga33dcd96e9b12dec794c56be85ec1ee05"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d45/group__higherlevelgetters.html#ga33dcd96e9b12dec794c56be85ec1ee05">CodeRacer::is_driving</a> ()</td></tr>
|
||||
<tr class="memdesc:ga33dcd96e9b12dec794c56be85ec1ee05"><td class="mdescLeft"> </td><td class="mdescRight">Return true if the racer is driving - forward or backward. <a href="#ga33dcd96e9b12dec794c56be85ec1ee05">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga33dcd96e9b12dec794c56be85ec1ee05"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaf04fd16ca0e2ace656f9549c43d16459"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d45/group__higherlevelgetters.html#gaf04fd16ca0e2ace656f9549c43d16459">CodeRacer::turn_left_for_ms</a> ()</td></tr>
|
||||
<tr class="memdesc:gaf04fd16ca0e2ace656f9549c43d16459"><td class="mdescLeft"> </td><td class="mdescRight">Returns the duration of time that is internally stored and used for turning the racer left. <a href="#gaf04fd16ca0e2ace656f9549c43d16459">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaf04fd16ca0e2ace656f9549c43d16459"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac0698f02f6a21d9d1f5b9cf2820306cf"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d45/group__higherlevelgetters.html#gac0698f02f6a21d9d1f5b9cf2820306cf">CodeRacer::turn_right_for_ms</a> ()</td></tr>
|
||||
<tr class="memdesc:gac0698f02f6a21d9d1f5b9cf2820306cf"><td class="mdescLeft"> </td><td class="mdescRight">Returns the duration of time that is internally stored and used for turning the racer left. <a href="#gac0698f02f6a21d9d1f5b9cf2820306cf">More...</a><br /></td></tr>
|
||||
<tr class="separator:gac0698f02f6a21d9d1f5b9cf2820306cf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga62f1c0eea56e27d0853cb58f30eb140d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d45/group__higherlevelgetters.html#ga62f1c0eea56e27d0853cb58f30eb140d">CodeRacer::set_inactive</a> ()</td></tr>
|
||||
<tr class="memdesc:ga62f1c0eea56e27d0853cb58f30eb140d"><td class="mdescLeft"> </td><td class="mdescRight">Sets the coderracer_active state to inactive. If start_stop() is used - the inactive mode will be entered. <a href="#ga62f1c0eea56e27d0853cb58f30eb140d">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga62f1c0eea56e27d0853cb58f30eb140d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga415c69930f291d5e06b7211b31843310"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d45/group__higherlevelgetters.html#ga415c69930f291d5e06b7211b31843310">CodeRacer::set_active</a> ()</td></tr>
|
||||
<tr class="memdesc:ga415c69930f291d5e06b7211b31843310"><td class="mdescLeft"> </td><td class="mdescRight">Sets the coderracer_active state to active. If start_stop() is used - the active mode will be entered. <a href="#ga415c69930f291d5e06b7211b31843310">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga415c69930f291d5e06b7211b31843310"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaa0ab4d6a754a23ea13664a553bcc8ff2"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d45/group__higherlevelgetters.html#gaa0ab4d6a754a23ea13664a553bcc8ff2">CodeRacer::is_active</a> ()</td></tr>
|
||||
<tr class="memdesc:gaa0ab4d6a754a23ea13664a553bcc8ff2"><td class="mdescLeft"> </td><td class="mdescRight">Checks if coderracer_activ is set. <a href="#gaa0ab4d6a754a23ea13664a553bcc8ff2">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaa0ab4d6a754a23ea13664a553bcc8ff2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="gae8b8c0ab24ccb572281785aeca8541e1"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gae8b8c0ab24ccb572281785aeca8541e1">◆ </a></span>stopped_at_min_distance()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">bool CodeRacer::stopped_at_min_distance </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Returns true if the racer was stopped at minimum distance. This set to false each time start_stop_at_min_distance() is called. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>True if stopped. </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00380">380</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  {</div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  <span class="keywordflow">return</span>(_coderacer_stopped_at_min_distance);</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga33dcd96e9b12dec794c56be85ec1ee05"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga33dcd96e9b12dec794c56be85ec1ee05">◆ </a></span>is_driving()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">bool CodeRacer::is_driving </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Return true if the racer is driving - forward or backward. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>True if driving forward or backward </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00387">387</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  {</div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  <span class="keywordflow">return</span>(_drive);</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaf04fd16ca0e2ace656f9549c43d16459"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaf04fd16ca0e2ace656f9549c43d16459">◆ </a></span>turn_left_for_ms()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">unsigned long CodeRacer::turn_left_for_ms </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Returns the duration of time that is internally stored and used for turning the racer left. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Time to turn left in ms </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00394">394</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  {</div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  <span class="keywordflow">return</span>(_turn_left_for_ms);</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gac0698f02f6a21d9d1f5b9cf2820306cf"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gac0698f02f6a21d9d1f5b9cf2820306cf">◆ </a></span>turn_right_for_ms()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">unsigned long CodeRacer::turn_right_for_ms </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Returns the duration of time that is internally stored and used for turning the racer left. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Time to turn left in ms </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00401">401</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  {</div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  <span class="keywordflow">return</span>(_turn_right_for_ms);</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga62f1c0eea56e27d0853cb58f30eb140d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga62f1c0eea56e27d0853cb58f30eb140d">◆ </a></span>set_inactive()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::set_inactive </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the coderracer_active state to inactive. If start_stop() is used - the inactive mode will be entered. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00408">408</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  {</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  coderracer_activ = <span class="keyword">false</span>;</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga415c69930f291d5e06b7211b31843310"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga415c69930f291d5e06b7211b31843310">◆ </a></span>set_active()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::set_active </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the coderracer_active state to active. If start_stop() is used - the active mode will be entered. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00415">415</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  {</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  coderracer_activ = <span class="keyword">true</span>;</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaa0ab4d6a754a23ea13664a553bcc8ff2"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaa0ab4d6a754a23ea13664a553bcc8ff2">◆ </a></span>is_active()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">bool CodeRacer::is_active </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Checks if coderracer_activ is set. </p>
|
||||
<p>coderracer_activ is toggled each time the button is pressed. After power on coderracer_activ is set to False. </p><dl class="section return"><dt>Returns</dt><dd>True id coderracer_activ is set - False if not. </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00424">424</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  {</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  <span class="keywordflow">return</span>(coderracer_activ);</div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,10 +0,0 @@
|
|||
var group__higherlevelgetters =
|
||||
[
|
||||
[ "stopped_at_min_distance", "d7/d45/group__higherlevelgetters.html#gae8b8c0ab24ccb572281785aeca8541e1", null ],
|
||||
[ "is_driving", "d7/d45/group__higherlevelgetters.html#ga33dcd96e9b12dec794c56be85ec1ee05", null ],
|
||||
[ "turn_left_for_ms", "d7/d45/group__higherlevelgetters.html#gaf04fd16ca0e2ace656f9549c43d16459", null ],
|
||||
[ "turn_right_for_ms", "d7/d45/group__higherlevelgetters.html#gac0698f02f6a21d9d1f5b9cf2820306cf", null ],
|
||||
[ "set_inactive", "d7/d45/group__higherlevelgetters.html#ga62f1c0eea56e27d0853cb58f30eb140d", null ],
|
||||
[ "set_active", "d7/d45/group__higherlevelgetters.html#ga415c69930f291d5e06b7211b31843310", null ],
|
||||
[ "is_active", "d7/d45/group__higherlevelgetters.html#gaa0ab4d6a754a23ea13664a553bcc8ff2", null ]
|
||||
];
|
|
@ -1,3 +0,0 @@
|
|||
<map id="Getters and setters" name="Getters and setters">
|
||||
<area shape="rect" id="node2" href="$d9/d80/group__higherlevel.html" title="Higher level methods,\l setters and getters" alt="" coords="5,5,152,47"/>
|
||||
</map>
|
|
@ -1 +0,0 @@
|
|||
0c88cc43f51cb6a9047b0307b81a6f18
|
Before Width: | Height: | Size: 1.6 KiB |
|
@ -1,157 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: Lower level fun stuff methods</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('d8/d7a/group__lowerlevelfun.html','../../');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Lower level fun stuff methods</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ga04309a38252639a8eaa43809c04c11c8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d7a/group__lowerlevelfun.html#ga04309a38252639a8eaa43809c04c11c8">CodeRacer::look_around</a> ()</td></tr>
|
||||
<tr class="memdesc:ga04309a38252639a8eaa43809c04c11c8"><td class="mdescLeft"> </td><td class="mdescRight">Fun stuff - will move the servo around after a random amount of time. <a href="#ga04309a38252639a8eaa43809c04c11c8">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga04309a38252639a8eaa43809c04c11c8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3b6f819fb82d910888fbc87abff1470c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d7a/group__lowerlevelfun.html#ga3b6f819fb82d910888fbc87abff1470c">CodeRacer::kitt</a> ()</td></tr>
|
||||
<tr class="memdesc:ga3b6f819fb82d910888fbc87abff1470c"><td class="mdescLeft"> </td><td class="mdescRight">Fun stuff - you know Knightrider... <a href="#ga3b6f819fb82d910888fbc87abff1470c">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga3b6f819fb82d910888fbc87abff1470c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ga04309a38252639a8eaa43809c04c11c8"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga04309a38252639a8eaa43809c04c11c8">◆ </a></span>look_around()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::look_around </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Fun stuff - will move the servo around after a random amount of time. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00440">440</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00441"></a><span class="lineno"> 441</span> {</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  <span class="keywordflow">if</span> (_servo_look_around_at_ms < millis()) {</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  _servo_look_around_at_ms = millis() + random(FUN_MIN_PAUSE_MS, FUN_MAX_PAUSE_MS);</div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  servo_set_to_left();</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  delay(500);</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  servo_set_to_right();</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  delay(800);</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  servo_set_to_center();</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  delay(300);</div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  servo_set_to_left();</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  delay(100);</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  servo_set_to_center();</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  }</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga3b6f819fb82d910888fbc87abff1470c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga3b6f819fb82d910888fbc87abff1470c">◆ </a></span>kitt()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::kitt </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Fun stuff - you know Knightrider... </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00459">459</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00460"></a><span class="lineno"> 460</span> {</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  <span class="keywordflow">if</span> (millis() - _last_led_switched_at_ms > LED_SWITCH_MS) {</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  _last_led_switched_at_ms = millis();</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  <span class="keywordflow">if</span> (_last_led_on >= 5) {</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  _led_count = -1;</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  }</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (_last_led_on <= 0) {</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  _led_count = 1;</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  }</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  _last_led_on = _last_led_on + _led_count;</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  <span class="keywordflow">switch</span> (_last_led_on) {</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  <span class="keywordflow">case</span> 0:</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  set_leds_left_stop_frwd_right(LEDON, LEDOFF, LEDOFF, LEDOFF);</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  <span class="keywordflow">case</span> 1:</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  set_leds_left_stop_frwd_right(LEDON, LEDOFF, LEDOFF, LEDOFF);</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  <span class="keywordflow">case</span> 2:</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  set_leds_left_stop_frwd_right(LEDOFF, LEDON, LEDOFF, LEDOFF);</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>  <span class="keywordflow">case</span> 3:</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>  set_leds_left_stop_frwd_right(LEDOFF, LEDOFF, LEDON, LEDOFF);</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>  <span class="keywordflow">case</span> 4:</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>  <span class="keywordflow">case</span> 5:</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  set_leds_left_stop_frwd_right(LEDOFF, LEDOFF, LEDOFF, LEDON);</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  }</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  }</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,5 +0,0 @@
|
|||
var group__lowerlevelfun =
|
||||
[
|
||||
[ "look_around", "d8/d7a/group__lowerlevelfun.html#ga04309a38252639a8eaa43809c04c11c8", null ],
|
||||
[ "kitt", "d8/d7a/group__lowerlevelfun.html#ga3b6f819fb82d910888fbc87abff1470c", null ]
|
||||
];
|
|
@ -1,110 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: Higher level methods, setters and getters</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('d9/d80/group__higherlevel.html','../../');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#groups">Modules</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Higher level methods, setters and getters</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
|
||||
Modules</h2></td></tr>
|
||||
<tr class="memitem:d2/d40/group__higherlevelmeths"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d40/group__higherlevelmeths.html">Methods</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:d7/d45/group__higherlevelgetters"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d45/group__higherlevelgetters.html">Getters and setters</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,5 +0,0 @@
|
|||
var group__higherlevel =
|
||||
[
|
||||
[ "Methods", "d2/d40/group__higherlevelmeths.html", "d2/d40/group__higherlevelmeths" ],
|
||||
[ "Getters and setters", "d7/d45/group__higherlevelgetters.html", "d7/d45/group__higherlevelgetters" ]
|
||||
];
|
|
@ -1,4 +0,0 @@
|
|||
<map id="Higher level methods, setters and getters" name="Higher level methods, setters and getters">
|
||||
<area shape="rect" id="node1" href="$d7/d45/group__higherlevelgetters.html" title="Getters and setters" alt="" coords="200,5,335,32"/>
|
||||
<area shape="rect" id="node3" href="$d2/d40/group__higherlevelmeths.html" title="Methods" alt="" coords="231,56,303,83"/>
|
||||
</map>
|
|
@ -1 +0,0 @@
|
|||
12cfd362df9c03991f2685cfc91fc9f2
|
Before Width: | Height: | Size: 2.9 KiB |
|
@ -1,110 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: Lower level ultra sonic methods and getters</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('da/daf/group__lowerlevelus.html','../../');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#groups">Modules</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Lower level ultra sonic methods and getters</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
|
||||
Modules</h2></td></tr>
|
||||
<tr class="memitem:d6/dfc/group__lowerlevelusmeths"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dfc/group__lowerlevelusmeths.html">Methods</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:db/ddd/group__lowerlevelusgetters"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/ddd/group__lowerlevelusgetters.html">Setters and getters</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,5 +0,0 @@
|
|||
var group__lowerlevelus =
|
||||
[
|
||||
[ "Methods", "d6/dfc/group__lowerlevelusmeths.html", "d6/dfc/group__lowerlevelusmeths" ],
|
||||
[ "Setters and getters", "db/ddd/group__lowerlevelusgetters.html", "db/ddd/group__lowerlevelusgetters" ]
|
||||
];
|
|
@ -1,4 +0,0 @@
|
|||
<map id="Lower level ultra sonic methods and getters" name="Lower level ultra sonic methods and getters">
|
||||
<area shape="rect" id="node2" href="$db/ddd/group__lowerlevelusgetters.html" title="Setters and getters" alt="" coords="203,5,336,32"/>
|
||||
<area shape="rect" id="node3" href="$d6/dfc/group__lowerlevelusmeths.html" title="Methods" alt="" coords="233,56,305,83"/>
|
||||
</map>
|
|
@ -1 +0,0 @@
|
|||
35f9114c2fb61134b1d44a4ab7152af0
|
Before Width: | Height: | Size: 2.9 KiB |
|
@ -1,335 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: Methods</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('db/dd5/group__lowerlevelservomeths.html','../../');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Methods<div class="ingroups"><a class="el" href="../../d3/d17/group__lowerlevelservo.html">Lower level servo drive methods and getters</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ga687beb327e20f4d0541d1ac9e29c01c3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/dd5/group__lowerlevelservomeths.html#ga687beb327e20f4d0541d1ac9e29c01c3">CodeRacer::servo_settings</a> (uint8_t pos_center, uint8_t pos_left, uint8_t pos_right, uint8_t sweep_left_pos, uint8_t sweep_right_pos)</td></tr>
|
||||
<tr class="memdesc:ga687beb327e20f4d0541d1ac9e29c01c3"><td class="mdescLeft"> </td><td class="mdescRight">Overwrites the default settings taken from header file by the parameters given to this method. <a href="#ga687beb327e20f4d0541d1ac9e29c01c3">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga687beb327e20f4d0541d1ac9e29c01c3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1e9afe1f27dfc9796b4c9b3dba245365"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/dd5/group__lowerlevelservomeths.html#ga1e9afe1f27dfc9796b4c9b3dba245365">CodeRacer::servo_sweep</a> ()</td></tr>
|
||||
<tr class="memdesc:ga1e9afe1f27dfc9796b4c9b3dba245365"><td class="mdescLeft"> </td><td class="mdescRight">Turns sweeping of the servo from left to right and back on. <a href="#ga1e9afe1f27dfc9796b4c9b3dba245365">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1e9afe1f27dfc9796b4c9b3dba245365"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaac73bf99cf2d19f7b1987156aa842b74"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/dd5/group__lowerlevelservomeths.html#gaac73bf99cf2d19f7b1987156aa842b74">CodeRacer::servo_set_to_right</a> ()</td></tr>
|
||||
<tr class="memdesc:gaac73bf99cf2d19f7b1987156aa842b74"><td class="mdescLeft"> </td><td class="mdescRight">Drives the servo to the postion that is defined by #servo_right_pos. <a href="#gaac73bf99cf2d19f7b1987156aa842b74">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaac73bf99cf2d19f7b1987156aa842b74"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaef7d1903b65a0a8ab4fafdc53080b07d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/dd5/group__lowerlevelservomeths.html#gaef7d1903b65a0a8ab4fafdc53080b07d">CodeRacer::servo_set_to_left</a> ()</td></tr>
|
||||
<tr class="memdesc:gaef7d1903b65a0a8ab4fafdc53080b07d"><td class="mdescLeft"> </td><td class="mdescRight">Drives the servo to the postion that is defined by #servo_left_pos. <a href="#gaef7d1903b65a0a8ab4fafdc53080b07d">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaef7d1903b65a0a8ab4fafdc53080b07d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad1f28aa91079e88fc3093e3074edfb32"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/dd5/group__lowerlevelservomeths.html#gad1f28aa91079e88fc3093e3074edfb32">CodeRacer::servo_set_to_center</a> ()</td></tr>
|
||||
<tr class="memdesc:gad1f28aa91079e88fc3093e3074edfb32"><td class="mdescLeft"> </td><td class="mdescRight">Drives the servo to the postion that is defined by #servo_center_pos. <a href="#gad1f28aa91079e88fc3093e3074edfb32">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad1f28aa91079e88fc3093e3074edfb32"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga0149226288bff2290d52ed1cbd674edd"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/dd5/group__lowerlevelservomeths.html#ga0149226288bff2290d52ed1cbd674edd">CodeRacer::servo_set_position_wait</a> (uint8_t position)</td></tr>
|
||||
<tr class="memdesc:ga0149226288bff2290d52ed1cbd674edd"><td class="mdescLeft"> </td><td class="mdescRight">Drive the servo to the postion given to this method. <a href="#ga0149226288bff2290d52ed1cbd674edd">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga0149226288bff2290d52ed1cbd674edd"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gab8831340049de6dbddeda997745725e6"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/dd5/group__lowerlevelservomeths.html#gab8831340049de6dbddeda997745725e6">CodeRacer::servo_set_position</a> (uint8_t position)</td></tr>
|
||||
<tr class="memdesc:gab8831340049de6dbddeda997745725e6"><td class="mdescLeft"> </td><td class="mdescRight">Drive the servo to the postion given to this method. <a href="#gab8831340049de6dbddeda997745725e6">More...</a><br /></td></tr>
|
||||
<tr class="separator:gab8831340049de6dbddeda997745725e6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ga687beb327e20f4d0541d1ac9e29c01c3"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga687beb327e20f4d0541d1ac9e29c01c3">◆ </a></span>servo_settings()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::servo_settings </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>pos_center</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>pos_left</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>pos_right</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>sweep_left_pos</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>sweep_right_pos</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Overwrites the default settings taken from header file by the parameters given to this method. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">pos_center</td><td>The postion at which the servo moves to straight forward. Default is 90. Allowed 10 <= pos_center <= 170. </td></tr>
|
||||
<tr><td class="paramname">pos_left</td><td>The postion at which the servo moves to the left. Default is 170. Allowed 10 <= pos_center <= 170. </td></tr>
|
||||
<tr><td class="paramname">pos_right</td><td>The postion at which the servo moves to the right. Default is 10. Allowed 10 <= pos_center <= 170. </td></tr>
|
||||
<tr><td class="paramname">sweep_left_pos</td><td>If the servo is sweeping from left to the right - this defines the most left postion. Default is 140. Allowed 10 <= pos_center <= 170. </td></tr>
|
||||
<tr><td class="paramname">sweep_right_pos</td><td>If the servo is sweeping from left to the right - this defines the most right postion. Default is 40. Allowed 10 <= pos_center <= 170. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00510">510</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00511"></a><span class="lineno"> 511</span> {</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  servo_center_pos = pos_center;</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  servo_left_pos = pos_left;</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  servo_right_pos = pos_right;</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  servo_sweep_left_pos = sweep_left_pos;</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  servo_sweep_right_pos = sweep_right_pos;</div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga1e9afe1f27dfc9796b4c9b3dba245365"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1e9afe1f27dfc9796b4c9b3dba245365">◆ </a></span>servo_sweep()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::servo_sweep </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Turns sweeping of the servo from left to right and back on. </p>
|
||||
<p>The sweeping range is defind by #servo_sweep_left_pos and #servo_sweep_right_pos attributes. Both can be set by either servo_settings() or as public members. Every time servo_sweep() is called the servo is driven by 5 steps until either #servo_sweep_left_pos or #servo_sweep_right_pos is reached. Then it will turn the direction and step to the other side every time this method is called. </p><dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00526">526</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00527"></a><span class="lineno"> 527</span> {</div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  uint8_t position;</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  _servo_sweep = <span class="keyword">true</span>;</div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span>  <span class="keywordflow">if</span> (millis() - _servo_position_set_at_ms > SERVO_SWEEP_MS) {</div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span>  position = _servo_position + _servo_sweep_step;</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>  <span class="comment">//sprintf(_debugmsg,"[%s] current position=%ld newpostion=%ld", __func__, _servo_position, position);</span></div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span>  <span class="keywordflow">if</span> ((position >= servo_sweep_left_pos) || (position >= SERVO_MAX_POSITION)) {</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  position = servo_sweep_left_pos;</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>  _servo_sweep_step = SERVO_SWEEP_TO_RIGHT_STEP;</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>  }</div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>  <span class="keywordflow">if</span> ((position <= servo_sweep_right_pos) || (position <= SERVO_MIN_POSITION)) {</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  position = servo_sweep_right_pos;</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>  _servo_sweep_step = SERVO_SWEEP_TO_LEFT_STEP;</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>  }</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>  _servo_set_position(position);</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  }</div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaac73bf99cf2d19f7b1987156aa842b74"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaac73bf99cf2d19f7b1987156aa842b74">◆ </a></span>servo_set_to_right()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::servo_set_to_right </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Drives the servo to the postion that is defined by #servo_right_pos. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00548">548</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00549"></a><span class="lineno"> 549</span> {</div><div class="line"><a name="l00550"></a><span class="lineno"> 550</span>  servo_set_position_wait(servo_right_pos);</div><div class="line"><a name="l00551"></a><span class="lineno"> 551</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaef7d1903b65a0a8ab4fafdc53080b07d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaef7d1903b65a0a8ab4fafdc53080b07d">◆ </a></span>servo_set_to_left()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::servo_set_to_left </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Drives the servo to the postion that is defined by #servo_left_pos. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00556">556</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00557"></a><span class="lineno"> 557</span> {</div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>  servo_set_position_wait(servo_left_pos);</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gad1f28aa91079e88fc3093e3074edfb32"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gad1f28aa91079e88fc3093e3074edfb32">◆ </a></span>servo_set_to_center()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::servo_set_to_center </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Drives the servo to the postion that is defined by #servo_center_pos. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00564">564</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00565"></a><span class="lineno"> 565</span> {</div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span>  servo_set_position_wait(servo_center_pos);</div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga0149226288bff2290d52ed1cbd674edd"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga0149226288bff2290d52ed1cbd674edd">◆ </a></span>servo_set_position_wait()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">uint8_t CodeRacer::servo_set_position_wait </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>position</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Drive the servo to the postion given to this method. </p>
|
||||
<p>The method will wait until the servo has reached its new position. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">position</td><td>Position the servo will be drived to. Allowed are values 10<=postion<=170. 10 is at the right hand side, 170 at the left hand side. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The new servo position </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00575">575</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00576"></a><span class="lineno"> 576</span> {</div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>  _servo_sweep = <span class="keyword">false</span>;</div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> wait_time_ms = _servo_set_position(position);</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>  delay(wait_time_ms);</div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span>  <span class="keywordflow">return</span>(_servo_position);</div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gab8831340049de6dbddeda997745725e6"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gab8831340049de6dbddeda997745725e6">◆ </a></span>servo_set_position()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">unsigned long CodeRacer::servo_set_position </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>position</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Drive the servo to the postion given to this method. </p>
|
||||
<p>The method will not wait until the servo has reached its new position. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">position</td><td>Position the servo will be drived to. Allowed are values 10<=postion<=170. 10 is at the right hand side, 170 at the left hand side. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The time in ms the servo will need to reach the new position </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00589">589</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00590"></a><span class="lineno"> 590</span> {</div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>  _servo_sweep = <span class="keyword">false</span>;</div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> wait_time_ms = _servo_set_position(position);</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span>  <span class="keywordflow">return</span>(wait_time_ms);</div><div class="line"><a name="l00594"></a><span class="lineno"> 594</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,10 +0,0 @@
|
|||
var group__lowerlevelservomeths =
|
||||
[
|
||||
[ "servo_settings", "db/dd5/group__lowerlevelservomeths.html#ga687beb327e20f4d0541d1ac9e29c01c3", null ],
|
||||
[ "servo_sweep", "db/dd5/group__lowerlevelservomeths.html#ga1e9afe1f27dfc9796b4c9b3dba245365", null ],
|
||||
[ "servo_set_to_right", "db/dd5/group__lowerlevelservomeths.html#gaac73bf99cf2d19f7b1987156aa842b74", null ],
|
||||
[ "servo_set_to_left", "db/dd5/group__lowerlevelservomeths.html#gaef7d1903b65a0a8ab4fafdc53080b07d", null ],
|
||||
[ "servo_set_to_center", "db/dd5/group__lowerlevelservomeths.html#gad1f28aa91079e88fc3093e3074edfb32", null ],
|
||||
[ "servo_set_position_wait", "db/dd5/group__lowerlevelservomeths.html#ga0149226288bff2290d52ed1cbd674edd", null ],
|
||||
[ "servo_set_position", "db/dd5/group__lowerlevelservomeths.html#gab8831340049de6dbddeda997745725e6", null ]
|
||||
];
|
|
@ -1,3 +0,0 @@
|
|||
<map id="Methods" name="Methods">
|
||||
<area shape="rect" id="node1" href="$d3/d17/group__lowerlevelservo.html" title="Lower level servo drive\l methods and getters" alt="" coords="5,5,155,47"/>
|
||||
</map>
|
|
@ -1 +0,0 @@
|
|||
597c50e7dc706800e2ae683735d343f0
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,221 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: Setters and getters</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('db/ddd/group__lowerlevelusgetters.html','../../');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Setters and getters<div class="ingroups"><a class="el" href="../../da/daf/group__lowerlevelus.html">Lower level ultra sonic methods and getters</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:gaa7c5a6563a5736ed38d12f616de480df"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/ddd/group__lowerlevelusgetters.html#gaa7c5a6563a5736ed38d12f616de480df">CodeRacer::usonic_set_stop_distance_cm</a> (unsigned long stop_distance_cm)</td></tr>
|
||||
<tr class="memdesc:gaa7c5a6563a5736ed38d12f616de480df"><td class="mdescLeft"> </td><td class="mdescRight">Sets the stop distance in cm. <a href="#gaa7c5a6563a5736ed38d12f616de480df">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaa7c5a6563a5736ed38d12f616de480df"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga2f06c193ae86c5b1cba450caf5adf146"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/ddd/group__lowerlevelusgetters.html#ga2f06c193ae86c5b1cba450caf5adf146">CodeRacer::usonic_set_stop_distance_us</a> (unsigned long stop_distance_us)</td></tr>
|
||||
<tr class="memdesc:ga2f06c193ae86c5b1cba450caf5adf146"><td class="mdescLeft"> </td><td class="mdescRight">Sets the stop distance in cm. <a href="#ga2f06c193ae86c5b1cba450caf5adf146">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga2f06c193ae86c5b1cba450caf5adf146"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga917b90f21e731ef5f690d5198e7f4d3e"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/ddd/group__lowerlevelusgetters.html#ga917b90f21e731ef5f690d5198e7f4d3e">CodeRacer::usonic_distance_us</a> ()</td></tr>
|
||||
<tr class="memdesc:ga917b90f21e731ef5f690d5198e7f4d3e"><td class="mdescLeft"> </td><td class="mdescRight">Returns the last measured distance in microseconds. <a href="#ga917b90f21e731ef5f690d5198e7f4d3e">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga917b90f21e731ef5f690d5198e7f4d3e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad59842c14196598e55644b2a22621454"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/ddd/group__lowerlevelusgetters.html#gad59842c14196598e55644b2a22621454">CodeRacer::usonic_distance_cm</a> ()</td></tr>
|
||||
<tr class="memdesc:gad59842c14196598e55644b2a22621454"><td class="mdescLeft"> </td><td class="mdescRight">Returns the last measured distance in cm. <a href="#gad59842c14196598e55644b2a22621454">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad59842c14196598e55644b2a22621454"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="gaa7c5a6563a5736ed38d12f616de480df"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaa7c5a6563a5736ed38d12f616de480df">◆ </a></span>usonic_set_stop_distance_cm()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::usonic_set_stop_distance_cm </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">unsigned long </td>
|
||||
<td class="paramname"><em>stop_distance_cm</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the stop distance in cm. </p>
|
||||
<p>If start_stop_at_min_distance() is used and distance measured with one of the measurement methods - the racer will be stopped immediately. All except the singe shot methods of the ultra sonic measurements methods supports that. Internally the stop distance will be set as both - in cm and in microseconds. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">stop_distance_cm</td><td>Distance in cm the racer will be stopped if that features was enabled by start_stop_at_min_distance() before. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00825">825</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00826"></a><span class="lineno"> 826</span> {</div><div class="line"><a name="l00827"></a><span class="lineno"> 827</span>  _usonic_stop_distance_us = stop_distance_cm * 58.14;</div><div class="line"><a name="l00828"></a><span class="lineno"> 828</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga2f06c193ae86c5b1cba450caf5adf146"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga2f06c193ae86c5b1cba450caf5adf146">◆ </a></span>usonic_set_stop_distance_us()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::usonic_set_stop_distance_us </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">unsigned long </td>
|
||||
<td class="paramname"><em>stop_distance_us</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the stop distance in cm. </p>
|
||||
<p>If start_stop_at_min_distance() is used and distance measured with one of the measurement methods - the racer will be stopped immediately. All except the singe shot methods of the ultra sonic measurements methods supports that. Internally the stop distance will be set as both - in cm and in microseconds. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">stop_distance_us</td><td>Distance in cm the racer will be stopped if that features was enabled by start_stop_at_min_distance() before. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00837">837</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00838"></a><span class="lineno"> 838</span> {</div><div class="line"><a name="l00839"></a><span class="lineno"> 839</span>  _usonic_stop_distance_us = stop_distance_us;</div><div class="line"><a name="l00840"></a><span class="lineno"> 840</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga917b90f21e731ef5f690d5198e7f4d3e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga917b90f21e731ef5f690d5198e7f4d3e">◆ </a></span>usonic_distance_us()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">unsigned long CodeRacer::usonic_distance_us </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Returns the last measured distance in microseconds. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Distance in microseconds </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00845">845</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00845"></a><span class="lineno"> 845</span>  {</div><div class="line"><a name="l00846"></a><span class="lineno"> 846</span>  <span class="keywordflow">return</span>(_usonic_distance_us);</div><div class="line"><a name="l00847"></a><span class="lineno"> 847</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gad59842c14196598e55644b2a22621454"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gad59842c14196598e55644b2a22621454">◆ </a></span>usonic_distance_cm()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">unsigned long CodeRacer::usonic_distance_cm </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Returns the last measured distance in cm. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Distance in cm </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00852">852</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00852"></a><span class="lineno"> 852</span>  {</div><div class="line"><a name="l00853"></a><span class="lineno"> 853</span>  <span class="keywordflow">return</span>(_usonic_distance_cm);</div><div class="line"><a name="l00854"></a><span class="lineno"> 854</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,7 +0,0 @@
|
|||
var group__lowerlevelusgetters =
|
||||
[
|
||||
[ "usonic_set_stop_distance_cm", "db/ddd/group__lowerlevelusgetters.html#gaa7c5a6563a5736ed38d12f616de480df", null ],
|
||||
[ "usonic_set_stop_distance_us", "db/ddd/group__lowerlevelusgetters.html#ga2f06c193ae86c5b1cba450caf5adf146", null ],
|
||||
[ "usonic_distance_us", "db/ddd/group__lowerlevelusgetters.html#ga917b90f21e731ef5f690d5198e7f4d3e", null ],
|
||||
[ "usonic_distance_cm", "db/ddd/group__lowerlevelusgetters.html#gad59842c14196598e55644b2a22621454", null ]
|
||||
];
|
|
@ -1,3 +0,0 @@
|
|||
<map id="Setters and getters" name="Setters and getters">
|
||||
<area shape="rect" id="node1" href="$da/daf/group__lowerlevelus.html" title="Lower level ultra sonic\l methods and getters" alt="" coords="5,5,155,47"/>
|
||||
</map>
|
|
@ -1 +0,0 @@
|
|||
2ea30e8364ac6dafffce41eb4e6f6037
|
Before Width: | Height: | Size: 1.6 KiB |
|
@ -1,246 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: Methods</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('dd/dff/group__lowerlevelledmeths.html','../../');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Methods<div class="ingroups"><a class="el" href="../../d7/d0f/group__lowerlevelled.html">Lower level LED methods</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:gab2514ca3994de3d64337dd6536fa6ef3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/dff/group__lowerlevelledmeths.html#gab2514ca3994de3d64337dd6536fa6ef3">CodeRacer::set_leds_left_stop_frwd_right</a> (ledstate leftled, ledstate stopled, ledstate frwdled, ledstate rightled)</td></tr>
|
||||
<tr class="memdesc:gab2514ca3994de3d64337dd6536fa6ef3"><td class="mdescLeft"> </td><td class="mdescRight">Sets all of the 4 LEDs to a ledstate (LEDON, LEDOFF) <a href="#gab2514ca3994de3d64337dd6536fa6ef3">More...</a><br /></td></tr>
|
||||
<tr class="separator:gab2514ca3994de3d64337dd6536fa6ef3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gab4319e66963b1b71a34370d73962fa78"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/dff/group__lowerlevelledmeths.html#gab4319e66963b1b71a34370d73962fa78">CodeRacer::set_leds_all</a> (ledstate alleds)</td></tr>
|
||||
<tr class="memdesc:gab4319e66963b1b71a34370d73962fa78"><td class="mdescLeft"> </td><td class="mdescRight">Sets all of the 4 LEDs to the same ledstate (LEDON, LEDOFF) <a href="#gab4319e66963b1b71a34370d73962fa78">More...</a><br /></td></tr>
|
||||
<tr class="separator:gab4319e66963b1b71a34370d73962fa78"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaa3f2ad08103127f2cb49344c33b666ea"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/dff/group__lowerlevelledmeths.html#gaa3f2ad08103127f2cb49344c33b666ea">CodeRacer::set_leds_all_off</a> ()</td></tr>
|
||||
<tr class="memdesc:gaa3f2ad08103127f2cb49344c33b666ea"><td class="mdescLeft"> </td><td class="mdescRight">Sets all of the 4 LEDs to the ledstate LEDOFF. <a href="#gaa3f2ad08103127f2cb49344c33b666ea">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaa3f2ad08103127f2cb49344c33b666ea"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga0c8b3d6ce992e1dcfd13fd86c9f89846"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/dff/group__lowerlevelledmeths.html#ga0c8b3d6ce992e1dcfd13fd86c9f89846">CodeRacer::set_leds_all_on</a> ()</td></tr>
|
||||
<tr class="memdesc:ga0c8b3d6ce992e1dcfd13fd86c9f89846"><td class="mdescLeft"> </td><td class="mdescRight">Sets all of the 4 LEDs to the ledstate LEDON. <a href="#ga0c8b3d6ce992e1dcfd13fd86c9f89846">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga0c8b3d6ce992e1dcfd13fd86c9f89846"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="gab2514ca3994de3d64337dd6536fa6ef3"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gab2514ca3994de3d64337dd6536fa6ef3">◆ </a></span>set_leds_left_stop_frwd_right()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::set_leds_left_stop_frwd_right </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">ledstate </td>
|
||||
<td class="paramname"><em>leftled</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">ledstate </td>
|
||||
<td class="paramname"><em>stopled</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">ledstate </td>
|
||||
<td class="paramname"><em>frwdled</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">ledstate </td>
|
||||
<td class="paramname"><em>rightled</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets all of the 4 LEDs to a ledstate (LEDON, LEDOFF) </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">leftled</td><td>set state of status left LED (most left yellow led) </td></tr>
|
||||
<tr><td class="paramname">stopled</td><td>set state of status stop LED (red led) </td></tr>
|
||||
<tr><td class="paramname">frwdled</td><td>set state of status forward LED (green or blue led) </td></tr>
|
||||
<tr><td class="paramname">rightled</td><td>set state of status right LED (most right yellow led) </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l01037">1037</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>  {</div><div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>  digitalWrite(_led_left_pin, leftled);</div><div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>  digitalWrite(_led_frwd_pin, frwdled);</div><div class="line"><a name="l01040"></a><span class="lineno"> 1040</span>  digitalWrite(_led_right_pin, rightled);</div><div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>  digitalWrite(_led_stop_pin, stopled);</div><div class="line"><a name="l01042"></a><span class="lineno"> 1042</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gab4319e66963b1b71a34370d73962fa78"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gab4319e66963b1b71a34370d73962fa78">◆ </a></span>set_leds_all()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::set_leds_all </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">ledstate </td>
|
||||
<td class="paramname"><em>alleds</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets all of the 4 LEDs to the same ledstate (LEDON, LEDOFF) </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">alleds</td><td>set state to all status LEDs </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l01048">1048</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l01048"></a><span class="lineno"> 1048</span>  {</div><div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>  digitalWrite(_led_left_pin, alleds);</div><div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>  digitalWrite(_led_frwd_pin, alleds);</div><div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>  digitalWrite(_led_right_pin, alleds);</div><div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>  digitalWrite(_led_stop_pin, alleds);</div><div class="line"><a name="l01053"></a><span class="lineno"> 1053</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaa3f2ad08103127f2cb49344c33b666ea"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaa3f2ad08103127f2cb49344c33b666ea">◆ </a></span>set_leds_all_off()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::set_leds_all_off </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets all of the 4 LEDs to the ledstate LEDOFF. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l01058">1058</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l01058"></a><span class="lineno"> 1058</span>  {</div><div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>  set_leds_all(LEDOFF);</div><div class="line"><a name="l01060"></a><span class="lineno"> 1060</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga0c8b3d6ce992e1dcfd13fd86c9f89846"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga0c8b3d6ce992e1dcfd13fd86c9f89846">◆ </a></span>set_leds_all_on()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void CodeRacer::set_leds_all_on </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets all of the 4 LEDs to the ledstate LEDON. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l01065">1065</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><a name="l01065"></a><span class="lineno"> 1065</span>  {</div><div class="line"><a name="l01066"></a><span class="lineno"> 1066</span>  set_leds_all(LEDON);</div><div class="line"><a name="l01067"></a><span class="lineno"> 1067</span> }</div></div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,7 +0,0 @@
|
|||
var group__lowerlevelledmeths =
|
||||
[
|
||||
[ "set_leds_left_stop_frwd_right", "dd/dff/group__lowerlevelledmeths.html#gab2514ca3994de3d64337dd6536fa6ef3", null ],
|
||||
[ "set_leds_all", "dd/dff/group__lowerlevelledmeths.html#gab4319e66963b1b71a34370d73962fa78", null ],
|
||||
[ "set_leds_all_off", "dd/dff/group__lowerlevelledmeths.html#gaa3f2ad08103127f2cb49344c33b666ea", null ],
|
||||
[ "set_leds_all_on", "dd/dff/group__lowerlevelledmeths.html#ga0c8b3d6ce992e1dcfd13fd86c9f89846", null ]
|
||||
];
|
|
@ -1,3 +0,0 @@
|
|||
<map id="Methods" name="Methods">
|
||||
<area shape="rect" id="node1" href="$d7/d0f/group__lowerlevelled.html" title="Lower level LED methods" alt="" coords="5,5,173,32"/>
|
||||
</map>
|
|
@ -1 +0,0 @@
|
|||
92c6efd7535f583cf9e0049790e5e563
|
Before Width: | Height: | Size: 1.1 KiB |
|
@ -1,100 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: C:/Users/jnoack/Documents/Arduino/libraries/CodeRacer Directory Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('dir_11f10faf8e1af149a19b120728e5c8cd.html','');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">CodeRacer Directory Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_a991eec27578c865874ede3d8ec657c2.html">Arduino</a></li><li class="navelem"><a class="el" href="dir_481cc946b8a81b8d9363a4aad6201160.html">libraries</a></li><li class="navelem"><a class="el" href="dir_11f10faf8e1af149a19b120728e5c8cd.html">CodeRacer</a></li>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,104 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: C:/Users/jnoack/Documents/Arduino/libraries Directory Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('dir_481cc946b8a81b8d9363a4aad6201160.html','');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">libraries Directory Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="subdirs"></a>
|
||||
Directories</h2></td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_a991eec27578c865874ede3d8ec657c2.html">Arduino</a></li><li class="navelem"><a class="el" href="dir_481cc946b8a81b8d9363a4aad6201160.html">libraries</a></li>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,100 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.13"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Arduino {code}racer API: C:/Users/jnoack/Documents/Arduino Directory Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="coderace_logo.JPG"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Arduino {code}racer API
|
||||
</div>
|
||||
<div id="projectbrief">... better know the details.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.13 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){initNavTree('dir_a991eec27578c865874ede3d8ec657c2.html','');});
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Arduino Directory Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_a991eec27578c865874ede3d8ec657c2.html">Arduino</a></li>
|
||||
<li class="footer">Generated on Tue Nov 13 2018 11:13:48 for Arduino {code}racer API by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 746 B |