Skip to content

fix(examples): round battery and temperature, show Wi-Fi progress on screen - #52

Closed
GreenyHub wants to merge 1 commit into
masterfrom
fix/inkplate10-examples
Closed

GreenyHub wants to merge 1 commit into
masterfrom
fix/inkplate10-examples

Conversation

@GreenyHub

Copy link
Copy Markdown
Contributor

battery_and_temperature.py printed str() of a float. A MicroPython float is 32
bit, so str() prints every digit it holds, up to nine after the decimal point,
and the reading ran far past the edge of a tidy line of text.

example_network.py drew nothing while it joined the network and fetched the
page, so the screen looked frozen until the answer arrived, and the comment
above set_text_size() said "double" next to a size of 1. hello_world.py
described a 1-bit display as 8-level grayscale in its comment.

Format the voltage with two decimals and the temperature with one. In
example_network.py create the display first, then show "Connecting to "
with a dot every second and "connected" using partial updates, clear the screen
and print the answer at the normal size. The request code is unchanged. Correct
the hello_world.py comment.

Run on an Inkplate 10 with the same code and the Wi-Fi details filled in: the
formatted reading was 4.65 V and 30.0 C, and the screen showed the connection
progress before the page.

…screen

battery_and_temperature.py printed str() of a float. A MicroPython float is 32
bit, so str() prints every digit it holds, up to nine after the decimal point,
and the reading ran far past the edge of a tidy line of text.

example_network.py drew nothing while it joined the network and fetched the
page, so the screen looked frozen until the answer arrived, and the comment
above set_text_size() said "double" next to a size of 1. hello_world.py
described a 1-bit display as 8-level grayscale in its comment.

Format the voltage with two decimals and the temperature with one. In
example_network.py create the display first, then show "Connecting to <ssid>"
with a dot every second and "connected" using partial updates, clear the screen
and print the answer at the normal size. The request code is unchanged. Correct
the hello_world.py comment.

Run on an Inkplate 10 with the same code and the Wi-Fi details filled in: the
formatted reading was 4.65 V and 30.0 C, and the screen showed the connection
progress before the page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant