Παρακολούθηση γραμμών#

Εισαγωγή#

Το Line Tracker είναι ένας αναλογικός αισθητήρας που χρησιμοποιεί ένα υπέρυθρο LED και έναν αισθητήρα φωτός για να ανιχνεύσει την ανακλαστικότητα της επιφάνειας μπροστά του. Έχει σχεδιαστεί για να τοποθετείται κάτω από το πλαίσιο ενός ρομπότ, έτσι ώστε το ρομπότ να μπορεί να ακολουθεί μια προσημασμένη διαδρομή.

Το VEX Line Tracker.

This page uses line_tracker as the example Line Tracker name. Replace it with your own configured name as needed.

Παρακάτω είναι μια λίστα με τις διαθέσιμες μεθόδους:

  • reflectivity – Returns an integer that represents the amount of light reflected from the surface as a percent.

Κατασκευαστής – Χειροκίνητη αρχικοποίηση ενός Line Tracker.

  • Line – Create a Line Tracker.

ανακλαστικότητα#

reflectivity returns an integer that represents the amount of light reflected from the surface as a percent. This can be used to help a robot follow a pre-marked path.

Σημείωμα:

  • Η ανακλαστικότητα 0% σημαίνει ότι το αντικείμενο είναι πολύ σκοτεινό.

  • Η ανακλαστικότητα 100% σημαίνει ότι το αντικείμενο είναι πολύ φωτεινό.

Usage:
line_tracker.reflectivity(units)

Παράμετρος

Περιγραφή

units

Optional. The unit to return the reflectivity with: PERCENT (default).

Κατασκευαστής#

Constructors are used to manually create Line objects, which are necessary for configuring a Line Tracker outside of VEXcode.

Line#

Line creates a Line Tracker.

Usage:
Line(port)

Παράμετρος

Περιγραφή

port

The 3-Wire Port that the Line Tracker is connected to:

  • On the EXP Brainbrain.three_wire_port.x where x is the number of the port.
  • On a 3-Wire Expanderexpander.a where expander is the name of the expander instance.

# Create a Line Tracker in Port A
line_tracker = Line(brain.three_wire_port.a)