Bladeren bron

attempt to reduce ghosting with gpio config. did not help.

Thomas Buck 1 jaar geleden
bovenliggende
commit
8e0bd05b12
4 gewijzigde bestanden met toevoegingen van 16 en 5 verwijderingen
  1. 1
    2
      camp_pico.py
  2. 1
    1
      mapper.py
  3. 1
    1
      net.py
  4. 13
    1
      pico.py

+ 1
- 2
camp_pico.py Bestand weergeven

@@ -699,8 +699,7 @@ if True:#__name__ == "__main__":
699 699
     from splash import SplashScreen
700 700
     from manager import Manager
701 701
 
702
-    #url = "http://ubabot.frubar.net"
703
-    url = "http://xythobuz.de"
702
+    url = "http://ubabot.frubar.net"
704 703
 
705 704
     import util
706 705
     t = util.getTarget()

+ 1
- 1
mapper.py Bestand weergeven

@@ -138,7 +138,7 @@ class MapperReduceBrightness(MapperNull):
138 138
         if (now > morning) and (now < night):
139 139
             self.factor = 1.0
140 140
         else:
141
-            self.factor = 0.25
141
+            self.factor = 0.42
142 142
 
143 143
     def adjust(self, color):
144 144
         return (int(color[0] * self.factor), int(color[1] * self.factor), int(color[2] * self.factor))

+ 1
- 1
net.py Bestand weergeven

@@ -48,7 +48,7 @@ class CheckHTTP:
48 48
             return
49 49
 
50 50
         now = time.time()
51
-        if (self.response == None) or ((now - self.start) >= self.refresh):
51
+        if (self.response == None) or ((now - self.start) >= self.refresh) or (now < self.start):
52 52
             self.start = now
53 53
             try:
54 54
                 print("Refreshing " + self.url)

+ 13
- 1
pico.py Bestand weergeven

@@ -13,7 +13,7 @@
13 13
 import interstate75
14 14
 from mapper import MapperReduceBrightness
15 15
 import time
16
-from machine import Pin
16
+from machine import Pin, mem32
17 17
 
18 18
 class PicoMatrix:
19 19
     def __init__(self, w = 32, h = 32):
@@ -38,6 +38,18 @@ class PicoMatrix:
38 38
         self.ledTime = time.time()
39 39
         self.led = Pin("LED", Pin.OUT)
40 40
 
41
+        # For all matrix pins r0, g0, b0, r1, g1, b1, a, b, c, d, e:
42
+        # reduce drive-strength to minimum 2mA and set slew to slow.
43
+        # Attempt to reduce ghosting on display. Not really helping :(
44
+        io_base = 0x4001c000
45
+        io_off = 0x04
46
+        io_inc = 0x04
47
+        for p in range(0, 11):
48
+            reg = io_base + (p * io_inc) + io_off
49
+            val = mem32[reg]
50
+            val = val & 0xFFFFFFCE
51
+            mem32[reg] = val
52
+
41 53
         self.loop_start() # initialize with blank image for ScrollText constructor
42 54
 
43 55
     def loop_start(self):

Laden…
Annuleren
Opslaan