Please note: Friday June 18 is a holiday celebrating Juneteenth, please allow extra time for your order to arrive and plan accordingly.
0

Getting started with the M4 Airlift board and a 3.5-tft touc
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Getting started with the M4 Airlift board and a 3.5-tft touc

by Daqar on Wed Jun 09, 2021 12:07 pm

Hi guys,

I'm going to have to ask a total n00b question, that has probably been asked before to the point of pain. I got a Metro M4 Airlift board and an Adafruit 3.5 tft touchscreen. I'm having an uphill battle figuring out how to get started. I have the arduino starterkit with the project, for reference. So I have a breadboard, wires, cables and a small collection of bits and doodads.

I bought the M4 board and touchscreen with the express purpose of building a digital dice-roller for an upcoming Shadowrun game. I can figure out how to make the dice-roller itself in python. But I have trouble finding relevant tutorials on how to properly connect the screen to the M4 board and how to program something resembling a user interface.

I need help with:
1.) Properly connecting the board and tft screen, using the SPI-side of the tft board.
2.) Make sure I've set things up properly with the IDE's, I'm gonna use the MU-editor as I can't figure out how to use either VS code or PyCharm.
3.) Learn how to display data on the screen and take inputs from it.

I can find tutorials on how to connect the screen to an arduino and I can find tutorials on how to program the screen, but that's either using an arduino or a different board than the M4. I do not have the technical insight to determine if I can use an arduino-tutorial to hook it up, and then a tutorial for a different board for programming. The learning path seems very unclear.

I know I'm asking a lot of you guys and I hope it doesn't come off as demanding, because I don't intent it to be.

Happy hacking and making! :)

Daqar

Daqar
 
Posts: 3
Joined: Wed Jun 09, 2021 11:47 am

Re: Getting started with the M4 Airlift board and a 3.5-tft

by dastels on Wed Jun 09, 2021 12:18 pm

You mean this display? https://learn.adafruit.com/adafruit-3-5-color-320x480-tft-touchscreen-breakout

For wiring, have a look at https://learn.adafruit.com/adafruit-3-5-color-320x480-tft-touchscreen-breakout/spi-wiring-and-test, though you should use the SPI connector (the 2x3 header next to the LEDs at the end farthest from the USB connector, see https://learn.adafruit.com/adafruit-metro-m4-express-airlift-wifi/pinouts-2). You'll also need a GPIO pins for CS and DC (see the linked TFT guide page)

Here's a place to start with using the display with CircuitPython, specifically using displayio: https://learn.adafruit.com/adafruit-3-5-color-320x480-tft-touchscreen-breakout/3-5-tft-featherwing.

More generally, have a look at https://learn.adafruit.com/circuitpython-display-support-using-displayio, and https://learn.adafruit.com/making-a-pyportal-user-interface-displayio will be useful as well (even though it talks about PyPortal.

The general/introductory CircuitPython guide is https://learn.adafruit.com/welcome-to-circuitpython.

Dave

dastels
 
Posts: 6475
Joined: Tue Oct 20, 2015 3:22 pm

Re: Getting started with the M4 Airlift board and a 3.5-tft

by Daqar on Wed Jun 09, 2021 12:56 pm

dastels wrote:You mean this display? https://learn.adafruit.com/adafruit-3-5-color-320x480-tft-touchscreen-breakout

For wiring, have a look at https://learn.adafruit.com/adafruit-3-5-color-320x480-tft-touchscreen-breakout/spi-wiring-and-test, though you should use the SPI connector (the 2x3 header next to the LEDs at the end farthest from the USB connector, see https://learn.adafruit.com/adafruit-metro-m4-express-airlift-wifi/pinouts-2). You'll also need a GPIO pins for CS and DC (see the linked TFT guide page)

Here's a place to start with using the display with CircuitPython, specifically using displayio: https://learn.adafruit.com/adafruit-3-5-color-320x480-tft-touchscreen-breakout/3-5-tft-featherwing.

More generally, have a look at https://learn.adafruit.com/circuitpython-display-support-using-displayio, and https://learn.adafruit.com/making-a-pyportal-user-interface-displayio will be useful as well (even though it talks about PyPortal.

The general/introductory CircuitPython guide is https://learn.adafruit.com/welcome-to-circuitpython.

Dave


Hi Dave,

Thanks for the tip. I'm trying to wire it up as you suggest. I'm running into an issue. On the Board, in the SPI-section you mentioned. There is a pin called "SCK". There is no "SCK" on the screen? Is it the same as "CLK"?
These are the connections I've done:
Board: TFT-screen:
GND ---> GND (The one at the very end of the row of headers) There are two pins on the screen-board called "GND"...
RST ---> RST
SCK ---> ???
MOSI ---> MOSI
MISO ---> MISO
5V ---> Vin

Is that all it needs?

Daqar
 
Posts: 3
Joined: Wed Jun 09, 2021 11:47 am

Re: Getting started with the M4 Airlift board and a 3.5-tft

by dastels on Wed Jun 09, 2021 1:04 pm

Yes. CLK = "clock", SCK = "SPI clock", same thing, different label.

Your connections look good.

Dave

dastels
 
Posts: 6475
Joined: Tue Oct 20, 2015 3:22 pm

Re: Getting started with the M4 Airlift board and a 3.5-tft

by Daqar on Wed Jun 09, 2021 1:12 pm

Cool. Thanks for the help, much appreciated. Now I can dive into the programming bit! :D

/Daqar

Daqar
 
Posts: 3
Joined: Wed Jun 09, 2021 11:47 am

Please be positive and constructive with your questions and comments.