This commit is contained in:
leo 2022-11-23 16:41:09 +01:00
parent 9441662d95
commit e0156cea73
Signed by: leo
GPG Key ID: 0DD993BFB2B307DB
2 changed files with 7 additions and 7 deletions

@ -1 +1 @@
Subproject commit 89795a10e037c8b55f6e85b2b3e068e8b86a026f
Subproject commit 7a1afae0c293c24d90f0af45c4a709d1d663128a

View File

@ -4,7 +4,7 @@ class Robot:
# position
pos=(1,1.5)
# orientation
rot=-1
rot=-pi/2
# velocite
v=0
# velocite angulaire
@ -12,7 +12,7 @@ class Robot:
# velocite des roues (non angulaire)
wv=[0,0]
# velocite max
wmv=0.1
wmv=1
# espace entre les deux roues
l=0.1
# time
@ -26,9 +26,9 @@ class Robot:
# position du spot lumineux
light_pos = (9, 1.5)
# ecart entre les deux photores
photores_l = 0.1
photores_l = 0.07
# longeur du séparateur entre les photorésistances
photores_sep_l = 0.05
photores_sep_l = 0.6
# constantes de résistance des photoresistances
PHOTORES_LIGHT = 100
PHOTORES_SHADOW = 20000
@ -70,8 +70,8 @@ class Robot:
self.pr_l = self.PHOTORES_SHADOW
self.pr_r = self.PHOTORES_LIGHT
self.pins[self.pr_l_pin] = int(1024-1024 * self.PHOTORES_BRIDGE/(self.pr_l+self.PHOTORES_BRIDGE))
self.pins[self.pr_r_pin] = int(1024-1024 * self.PHOTORES_BRIDGE/(self.pr_r+self.PHOTORES_BRIDGE))
self.pins[self.pr_l_pin] = int(1024 * self.pr_l/(self.pr_l+self.PHOTORES_BRIDGE))
self.pins[self.pr_r_pin] = int(1024 * self.pr_r/(self.pr_r+self.PHOTORES_BRIDGE))
def analogWrite(self, pin, dc):