Skip to content

Commit

Permalink
Release 1.4.1 - Fix backlight flicker
Browse files Browse the repository at this point in the history
  • Loading branch information
brickbots committed May 22, 2023
2 parents 77395f0 + 6e3ea9f commit c1a3666
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
Binary file modified gerbers/PiFinder-top-plate.zip
Binary file not shown.
Binary file modified gerbers/PiFinder.zip
Binary file not shown.
Binary file modified images/ui_reference.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions pifinder_post_update.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
sudo apt install -y gpsd
sudo dpkg-reconfigure -plow gpsd
sudo sed -zi '/dtoverlay=pwm,pin=13,func=4\n/!s/$/\ndtoverlay=pwm,pin=13,func=4\n/' /boot/config.txt
echo "Post Update Complete"

1 change: 1 addition & 0 deletions pifinder_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ git clone https://github.com/esa/tetra3.git
echo "dtparam=spi=on" | sudo tee -a /boot/config.txt
echo "dtparam=i2c_arm=on" | sudo tee -a /boot/config.txt
echo "dtparam=i2c_arm_baudrate=10000" | sudo tee -a /boot/config.txt
echo "dtoverlay=pwm,pin=13,func=4" | sudo tee -a /boot/config.txt

# Enable service
sudo cp /home/pifinder/PiFinder/pifinder.service /etc/systemd/system/pifinder.service
Expand Down
8 changes: 3 additions & 5 deletions python/PiFinder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from multiprocessing.managers import BaseManager
from timezonefinder import TimezoneFinder

import RPi.GPIO as GPIO
from rpi_hardware_pwm import HardwarePWM

from luma.core.interface.serial import spi
from luma.core.render import canvas
Expand Down Expand Up @@ -55,9 +55,7 @@


KEYPAD_LEDPIN = 13
GPIO.setmode(GPIO.BCM)
GPIO.setup(KEYPAD_LEDPIN, GPIO.OUT)
keypad_pwm = GPIO.PWM(KEYPAD_LEDPIN, 100) # create PWM instance with frequency
keypad_pwm = HardwarePWM(pwm_channel=1, hz=120)
keypad_pwm.start(0)


Expand All @@ -80,7 +78,7 @@ def set_brightness(level, cfg):
"Off": 0,
}
keypad_brightness = cfg.get_option("keypad_brightness")
keypad_pwm.ChangeDutyCycle(level * 0.1 * keypad_offsets[keypad_brightness])
keypad_pwm.change_duty_cycle(level * 0.05 * keypad_offsets[keypad_brightness])


class StateManager(BaseManager):
Expand Down
15 changes: 8 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
adafruit-blinka==8.12.0
adafruit-circuitpython-bno055
luma.oled==3.9.0
numpy==1.23.4
pandas==1.5.3
pytz==2022.7.1
timezonefinder==6.1.9
luma.oled==3.9.0
skyfield==1.45
requests==2.28.2
rpi-hardware-pwm==0.1.4
scipy==1.10.0
scikit-learn==1.2.2
requests==2.28.2
adafruit-blinka==8.12.0
adafruit-circuitpython-bno055
pandas==1.5.3
sh==1.14.3
skyfield==1.45
timezonefinder==6.1.9
tqdm==4.65.0

0 comments on commit c1a3666

Please sign in to comment.