Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lm75b support and script updates #103

Merged
merged 4 commits into from Apr 7, 2017
Merged

Lm75b support and script updates #103

merged 4 commits into from Apr 7, 2017

Conversation

tvoverbeek
Copy link
Contributor

-Updated papirus-config using whiptail dialogs throughout.
-Update papirus-setup to force user to specify screen size before starting the epd-fuse service.
-Added LM75B support in epd.py, so the display updates use the actual temperature.
-Added python read access to /dev/epd/error in epd.py

Use whiptail dialogs throughout.
…rror_status

During initial installation force the user to select his/her screen
size before starting epd_fuse.
Add minimal temperature sensor (LM75B) support, so the actual
temperature is taken into account with the display updates.
Make /dev/epd/error accessible from python: error_status() function.
@shawaj
Copy link
Member

shawaj commented Mar 31, 2017

The only thing I'm worried about is that the temperature sensor is not actually really reading the ambient temperature in the locality of the display. It's underneath the board and therefore reading really high (as the CPU is warming it up).

I'm not entirely sure how to handle this, without a hardware update?

What do you think @tvoverbeek @francesco-vannini ?

@shawaj
Copy link
Member

shawaj commented Mar 31, 2017

papirus-buttons has an indent on the part:

+    if EPD_SIZE == 0.0:
+        print("Please select your screen size by running 'papirus-config'.")
+        sys.exit()

But the other scripts do not.

Is that intentional?

@tvoverbeek
Copy link
Contributor Author

No, the indent should not be there. Fixed.

@tvoverbeek
Copy link
Contributor Author

Regarding the temperature. Agreed the LM75B does not measure the screen temperature. I would guess it is a few degrees higher than the actual screen temperature.
However, the code uses some wide temperature bands.
See below extracted from V231_G2/epd.c in the repaper/gratis repository:

// convert a temperature in Celsius to
// the scale factor for frame_*_repeat methods
static int temperature_to_factor_10x(int temperature) {
if (temperature <= -10) {
return 170;
} else if (temperature <= -5) {
return 120;
} else if (temperature <= 5) {
return 80;
} else if (temperature <= 10) {
return 40;
} else if (temperature <= 15) {
return 30;
} else if (temperature <= 20) {
return 20;
} else if (temperature <= 40) {
return 10;
}
return 7;
}

For normal use (temp between 20 and 40) the routine returns 10, above 40 it returns 7.
I believe the temperature discrepancy between the LM75B and screen temperature should not
cause much of a problem, but we get a better behavior for e.g. use outside in the cold.

@shawaj
Copy link
Member

shawaj commented Mar 31, 2017

Looks good. Will test and merge next week but agreed on the temperature.

Will aim to put a smaller chip temp sensor ​on top of a future hardware revision so it's more accurate

@francesco-vannini francesco-vannini merged commit 7fd8450 into PiSupply:master Apr 7, 2017
@tvoverbeek tvoverbeek deleted the LM75B-support-and-script-updates branch April 7, 2017 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants