Skip to content

Allow setting color with an int from rainbowio #72

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

Merged
merged 1 commit into from
Jul 25, 2022

Conversation

Neradoc
Copy link
Contributor

@Neradoc Neradoc commented Jul 17, 2022

This makes it easier to use with rainbowio.

import time
import board
from rainbowio import colorwheel
import adafruit_character_lcd.character_lcd_rgb_i2c as character_lcd

# Modify this if you have a different sized Character LCD
lcd_columns = 16
lcd_rows = 2
# Initialize I2C bus.
i2c = board.I2C()
# Initialize the LCD class
lcd = character_lcd.Character_LCD_RGB_I2C(i2c, lcd_columns, lcd_rows)

lcd.clear()
# Print two line message
lcd.message = "Hello\nCircuitPython"
# Set LCD color
lcd.color = colorwheel(32)
time.sleep(1)

@Neradoc Neradoc force-pushed the compatibility-rainbowio branch from c54e053 to ddaace4 Compare July 17, 2022 11:50
Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - thanks!

@tannewt tannewt merged commit 926f990 into adafruit:main Jul 25, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jul 28, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_CharLCD to 3.4.0 from 3.3.15:
  > Merge pull request adafruit/Adafruit_CircuitPython_CharLCD#72 from Neradoc/compatibility-rainbowio
  > Changed .env to .venv in README.rst
  > Removed duplicate-code from library pylint disable

Updating https://github.com/adafruit/Adafruit_CircuitPython_EPD to 2.10.5 from 2.10.4:
  > Create requirements.txt
  > Changed .env to .venv in README.rst

Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS3MDL to 1.1.17 from 1.1.16:
  > Merge pull request adafruit/Adafruit_CircuitPython_LIS3MDL#22 from adafruit/lsm6dstrc
  > Changed .env to .venv in README.rst

Updating https://github.com/adafruit/Adafruit_CircuitPython_MPL3115A2 to 2.0.0 from 1.2.12:
  > Merge pull request adafruit/Adafruit_CircuitPython_MPL3115A2#22 from caternuson/iss19
  > Changed .env to .venv in README.rst

Updating https://github.com/adafruit/Adafruit_CircuitPython_PN532 to 2.3.10 from 2.3.9:
  > Merge pull request adafruit/Adafruit_CircuitPython_PN532#57 from tekktrik/doc/fix-product-link
  > Changed .env to .venv in README.rst
  > Removed duplicate-code from library pylint disable

Updating https://github.com/adafruit/Adafruit_CircuitPython_SI1145 to 1.0.1 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_SI1145#6 from tekktrik/doc/add-product-link

Updating https://github.com/adafruit/Adafruit_CircuitPython_asyncio to 0.5.12 from 0.5.11:
  > Create requirements.txt

Updating https://github.com/adafruit/Adafruit_CircuitPython_AzureIoT to 2.5.8 from 2.5.7:
  > Updated sphinx version
  > Changed .env to .venv in README.rst

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE to 8.3.4 from 8.3.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE#168 from tekktrik/doc/add-type-annotations
  > Changed .env to .venv in README.rst
  > Removed duplicate-code from library pylint disable

Updating https://github.com/adafruit/Adafruit_CircuitPython_Hue to 1.2.0 from 1.1.10:
  > Merge pull request adafruit/Adafruit_CircuitPython_Hue#21 from tekktrik/dev/specific-error
  > Changed .env to .venv in README.rst
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.

3 participants