0

Using a display with Circuit Playground Express
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Using a display with Circuit Playground Express

by dredwingz03 on Wed Oct 11, 2017 8:11 pm

Hello there.

I have searched some and cannot find anyone using a Circuit Playground Express to control a display.

I have looked at a 128x32 I2C OLED display
https://www.adafruit.com/product/931

and a standard 16x2 LCD display.
https://www.adafruit.com/product/181

The first one needs an I2C data and clock pin as well as one other input pin. It also needs 512 bytes of RAM. The second one needs 6 input pins and a 5V power source. The Circuit Playground Express has these capabilities it appears.

I have limited electronics knowledge, so I am looking for confirmation that the Circuit Playground Express can be used with these displays.

Thank you
Paul

dredwingz03
 
Posts: 2
Joined: Wed Oct 11, 2017 8:02 pm

Re: Using a display with Circuit Playground Express

by adafruit_support_mike on Wed Oct 11, 2017 11:28 pm

You can use I2C displays with the Circuit Playground Express, but so you know, most of our code development for that board is focused on CircuitPython right now.

Support for bootloader programming through the Arduino IDE is pretty bare-bones, and is lumped in with a project to refactor our microcontroller libraries to support lots of different microcontrollers. You can download the libraries and try to compile the code with the CPX as the build target to see if things work before buying the actual hardware.

adafruit_support_mike
 
Posts: 44191
Joined: Thu Feb 11, 2010 2:51 pm

Re: Using a display with Circuit Playground Express

by dredwingz03 on Thu Oct 12, 2017 12:27 am

Thank you for your reply.

I have some experience with C. Is CircuitPython similar?

Is there a possibility the 16x2 display could work with the Circuit Playground Express also? It seems like it would be the easier of the two to set up.

I have downloaded the Adafruit GFX library as well as the Adafruit SSD1306 library. Where can I find the code to try and compile to try and provide an indicator if the OLED display may work before purchase?

Could you please point me to a more appropriate board if this doesn't work out? I think I need more I/O pins, unless there's a way to control 2 or more buttons from one IO pin. My goal is a user interface consisting of the display, 8-10 LEDs or NeoPixels, and 8-10 buttons for each LED/NeoPixel that would turn off its light when pressed. Two or three more buttons to use as user inputs for setting LED lights based on times of the day, so I would need a clock. I assume there's a clock that could keep accurate timing built into the Circuit Playground Express?

Thank you very much
Paul

Edit: After reading a little more, it appears there is a delay function in Arudino IDE that could act as a clock. I'm sure CircuitPython has the capability since it's more advance. Also, it appears I could use an input analog pin and use different resistors to control multiple buttons off the same pin. Thank you for any advice you can give.

Edit2: I found this.
https://www.adafruit.com/product/3295
It requires I2C, which would be occupied by the OLED display. Or could sometime like that still work?

dredwingz03
 
Posts: 2
Joined: Wed Oct 11, 2017 8:02 pm

Re: Using a display with Circuit Playground Express

by adafruit_support_mike on Thu Oct 12, 2017 11:01 pm

Python belongs to the C-style family of computer languages, in that it has variables, functions that take parameters and return values, etc. The biggest difference is that Python uses semantic whitespace instead of braces.

Instead of defining a function like this:

Code: Select all | TOGGLE FULL SIZE
int foo ( int parameter ) {
    //  function code goes here
}
Python does it like this:

Code: Select all | TOGGLE FULL SIZE
def foo( parameter ):
    this_is_function_code()

but_this_is_not()
It was originally developed as a teaching tool by a CompSci professor, sort of like Pascal back in the early 1980s, and has evolved in the "there is exactly one right way to do anything" direction. It's an interpreted language with conveniences like garbage collection and some type interpolation, so you don't have to deal with memory allocation the way you do in C.

dredwingz03 wrote:Edit2: I found this.
https://www.adafruit.com/product/3295
It requires I2C, which would be occupied by the OLED display. Or could sometime like that still work?

I2C is a shared-bus interface, so yes, you can connect multiple devices to the SDA and SCL lines.

Eash I2C device has a hardware address between 0x01 and 0x7f, and the bus controller starts each transmission by emitting the address of the device it wants to talk to. All other devices ignore what's happening on the bus until they see a transmission for their own address.

adafruit_support_mike
 
Posts: 44191
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.