Παρακολούθηση γραμμών#
Εισαγωγή#
Το Line Tracker είναι ένας αναλογικός αισθητήρας που χρησιμοποιεί ένα υπέρυθρο LED και έναν αισθητήρα φωτός για να ανιχνεύσει την ανακλαστικότητα της επιφάνειας μπροστά του. Έχει σχεδιαστεί για να τοποθετείται κάτω από το πλαίσιο ενός ρομπότ, έτσι ώστε το ρομπότ να μπορεί να ακολουθεί μια προσημασμένη διαδρομή.
![]()
This page uses line_tracker as the example Line Tracker name. Replace it with your own configured name as needed.
Παρακάτω είναι μια λίστα με τις διαθέσιμες μεθόδους:
reflectivity– Returns anintegerthat 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)
Παράμετρος |
Περιγραφή |
|---|---|
|
Optional. The unit to return the reflectivity with: |
Κατασκευαστής#
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)
Παράμετρος |
Περιγραφή |
|---|---|
|
The 3-Wire Port that the Line Tracker is connected to:
|
# Create a Line Tracker in Port A
line_tracker = Line(brain.three_wire_port.a)