Browse Source

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

Thomas Buck 1 year ago
parent
commit
8e0bd05b12
4 changed files with 16 additions and 5 deletions
  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 View File

699
     from splash import SplashScreen
699
     from splash import SplashScreen
700
     from manager import Manager
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
     import util
704
     import util
706
     t = util.getTarget()
705
     t = util.getTarget()

+ 1
- 1
mapper.py View File

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

+ 1
- 1
net.py View File

48
             return
48
             return
49
 
49
 
50
         now = time.time()
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
             self.start = now
52
             self.start = now
53
             try:
53
             try:
54
                 print("Refreshing " + self.url)
54
                 print("Refreshing " + self.url)

+ 13
- 1
pico.py View File

13
 import interstate75
13
 import interstate75
14
 from mapper import MapperReduceBrightness
14
 from mapper import MapperReduceBrightness
15
 import time
15
 import time
16
-from machine import Pin
16
+from machine import Pin, mem32
17
 
17
 
18
 class PicoMatrix:
18
 class PicoMatrix:
19
     def __init__(self, w = 32, h = 32):
19
     def __init__(self, w = 32, h = 32):
38
         self.ledTime = time.time()
38
         self.ledTime = time.time()
39
         self.led = Pin("LED", Pin.OUT)
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
         self.loop_start() # initialize with blank image for ScrollText constructor
53
         self.loop_start() # initialize with blank image for ScrollText constructor
42
 
54
 
43
     def loop_start(self):
55
     def loop_start(self):

Loading…
Cancel
Save