Giter Site home page Giter Site logo

Pi PICO support about circuitpython_lcd HOT 5 OPEN

dhalbert avatar dhalbert commented on September 8, 2024
Pi PICO support

from circuitpython_lcd.

Comments (5)

dearpowa avatar dearpowa commented on September 8, 2024 1

I wrote this library for a single project a long time ago. Now I work for Adafruit slightly_smiling_face, and I'll regularize the constructor. The normal thing we do now is to have you pass in an I2C object to the constructor.

Now that you work at adafruit, any news if PCF8574 will be supported in the official adafruit cricuitpython libraries for i2c displays?

from circuitpython_lcd.

dhalbert avatar dhalbert commented on September 8, 2024

I wrote this library for a single project a long time ago. Now I work for Adafruit 🙂, and I'll regularize the constructor. The normal thing we do now is to have you pass in an I2C object to the constructor.

from circuitpython_lcd.

dhalbert avatar dhalbert commented on September 8, 2024

Changed but not tested:

  • default branch is now main, so pull and checkout main instead of master, or re-clone.
  • Now you must pass in the I2C object to the constructor, e.g.:
i2c = busio.i2c(scl=board.GP1, sda=board.GP0)
interface = I2CPCF8574Interface(i2c, i2c_address)
...

I think I've fixed the brightness issue also, but try it.

Most of my work on this has been on the minimal branch, which removes a number of features to save space. That was when I was trying to get this to fit on a Feather M0.

from circuitpython_lcd.

harsh-gupta-10 avatar harsh-gupta-10 commented on September 8, 2024
import board,busio

from lcd.lcd import LCD
from lcd.i2c_pcf8574_interface import I2CPCF8574Interface

from lcd.lcd import CursorMode
i2c = busio.i2c(scl=board.GP1, sda=board.GP0)
interface = I2CPCF8574Interface(i2c, i2c_address)

lcd.print("abc ")
lcd.print("This is quite long and will wrap onto the next line automatically.")

lcd.clear()

# Start at the second line, fifth column (numbering from zero).
lcd.set_cursor_pos(1, 4)
lcd.print("Here I am")

# Make the cursor visible as a line.
lcd.set_cursor_mode(CursorMode.LINE)

my code this is giving me an error

soft reboot
Traceback (most recent call last):
  File "<stdin>", line 7, in <module>
AttributeError: 'module' object has no attribute 'i2c'

from circuitpython_lcd.

dhalbert avatar dhalbert commented on September 8, 2024

It should be busio.I2C, all caps.

from circuitpython_lcd.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.