Skip to content

Update st7735 in examples #130

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

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"scanSettings": {
"baseBranches": []
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff",
"useMendCheckNames": true
},
"issueSettings": {
"minSeverityLevel": "LOW",
"issueType": "DEPENDENCY"
}
}
8 changes: 4 additions & 4 deletions examples/all-in-one-enviro-mini.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import colorsys
import os
import sys
import ST7735
import st7735
try:
# Transitional fix for breaking change in LTR559
from ltr559 import LTR559
Expand Down Expand Up @@ -34,11 +34,11 @@
bme280 = BME280()

# Create ST7735 LCD display class
st7735 = ST7735.ST7735(
st7735 = st7735.ST7735(
port=0,
cs=1,
dc=9,
backlight=12,
dc="9",
backlight="12",
rotation=270,
spi_speed_hz=10000000
)
Expand Down
8 changes: 4 additions & 4 deletions examples/all-in-one-no-pm.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import colorsys
import os
import sys
import ST7735
import st7735
try:
# Transitional fix for breaking change in LTR559
from ltr559 import LTR559
Expand Down Expand Up @@ -33,11 +33,11 @@
bme280 = BME280()

# Create ST7735 LCD display class
st7735 = ST7735.ST7735(
st7735 = st7735.ST7735(
port=0,
cs=1,
dc=9,
backlight=12,
dc="9",
backlight="12",
rotation=270,
spi_speed_hz=10000000
)
Expand Down
8 changes: 4 additions & 4 deletions examples/all-in-one.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import time
import colorsys
import sys
import ST7735
import st7735
try:
# Transitional fix for breaking change in LTR559
from ltr559 import LTR559
Expand Down Expand Up @@ -38,11 +38,11 @@
pms5003 = PMS5003()

# Create ST7735 LCD display class
st7735 = ST7735.ST7735(
st7735 = st7735.ST7735(
port=0,
cs=1,
dc=9,
backlight=12,
dc="9",
backlight="12",
rotation=270,
spi_speed_hz=10000000
)
Expand Down
8 changes: 4 additions & 4 deletions examples/combined.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import time
import colorsys
import sys
import ST7735
import st7735
try:
# Transitional fix for breaking change in LTR559
from ltr559 import LTR559
Expand Down Expand Up @@ -40,11 +40,11 @@
time.sleep(1.0)

# Create ST7735 LCD display class
st7735 = ST7735.ST7735(
st7735 = st7735.ST7735(
port=0,
cs=1,
dc=9,
backlight=12,
dc="9",
backlight="12",
rotation=270,
spi_speed_hz=10000000
)
Expand Down
8 changes: 4 additions & 4 deletions examples/lcd.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

import ST7735
import st7735
from PIL import Image, ImageDraw, ImageFont
from fonts.ttf import RobotoMedium as UserFont
import logging
Expand All @@ -17,11 +17,11 @@
""")

# Create LCD class instance.
disp = ST7735.ST7735(
disp = st7735.ST7735(
port=0,
cs=1,
dc=9,
backlight=12,
dc="9",
backlight="12",
rotation=270,
spi_speed_hz=10000000
)
Expand Down
8 changes: 4 additions & 4 deletions examples/luftdaten.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

import requests
import ST7735
import st7735
import time
from bme280 import BME280
from pms5003 import PMS5003, ReadTimeoutError, ChecksumMismatchError
Expand Down Expand Up @@ -40,11 +40,11 @@
bme280 = BME280(i2c_dev=bus)

# Create LCD instance
disp = ST7735.ST7735(
disp = st7735.ST7735(
port=0,
cs=1,
dc=9,
backlight=12,
dc="9",
backlight="12",
rotation=270,
spi_speed_hz=10000000
)
Expand Down
8 changes: 4 additions & 4 deletions examples/luftdaten_combined.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import sys
import requests
import ST7735
import st7735
import time
import colorsys
from bme280 import BME280
Expand Down Expand Up @@ -152,11 +152,11 @@ def check_wifi():


# Create ST7735 LCD display class
st7735 = ST7735.ST7735(
st7735 = st7735.ST7735(
port=0,
cs=1,
dc=9,
backlight=12,
dc="9",
backlight="12",
rotation=270,
spi_speed_hz=10000000
)
Expand Down
6 changes: 3 additions & 3 deletions examples/mqtt-all.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""

import argparse
import ST7735
import st7735
import time
import ssl
from bme280 import BME280
Expand Down Expand Up @@ -230,8 +230,8 @@ def main():
bme280 = BME280(i2c_dev=bus)

# Create LCD instance
disp = ST7735.ST7735(
port=0, cs=1, dc=9, backlight=12, rotation=270, spi_speed_hz=10000000
disp = st7735.ST7735(
port=0, cs=1, dc="9", backlight="12", rotation=270, spi_speed_hz=10000000
)

# Initialize display
Expand Down
8 changes: 4 additions & 4 deletions examples/noise-amps-at-freqs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ST7735
import st7735
from PIL import Image, ImageDraw
from enviroplus.noise import Noise

Expand All @@ -14,11 +14,11 @@

noise = Noise()

disp = ST7735.ST7735(
disp = st7735.ST7735(
port=0,
cs=ST7735.BG_SPI_CS_FRONT,
dc=9,
backlight=12,
dc="9",
backlight="12",
rotation=90)

disp.begin()
Expand Down
8 changes: 4 additions & 4 deletions examples/noise-profile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ST7735
import st7735
from PIL import Image, ImageDraw
from enviroplus.noise import Noise

Expand All @@ -12,11 +12,11 @@

noise = Noise()

disp = ST7735.ST7735(
disp = st7735.ST7735(
port=0,
cs=ST7735.BG_SPI_CS_FRONT,
dc=9,
backlight=12,
dc="9",
backlight="12",
rotation=90)

disp.begin()
Expand Down
8 changes: 4 additions & 4 deletions examples/weather-and-light.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from PIL import Image, ImageDraw, ImageFont, ImageFilter
from fonts.ttf import RobotoMedium as UserFont

import ST7735
import st7735
from bme280 import BME280
from ltr559 import LTR559

Expand Down Expand Up @@ -291,11 +291,11 @@ def describe_light(light):


# Initialise the LCD
disp = ST7735.ST7735(
disp = st7735.ST7735(
port=0,
cs=1,
dc=9,
backlight=12,
dc="9",
backlight="12",
rotation=270,
spi_speed_hz=10000000
)
Expand Down