PyPortal Touchscreen Not Responding

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
jerseyp
 
Posts: 15
Joined: Thu Dec 10, 2020 2:38 am

PyPortal Touchscreen Not Responding

Post by jerseyp »

I assembled the EZ Make Oven and successfully ran the calibration program, which turned on the toaster oven, brought it to temperature, and then produced the expected temperature and seconds values that I used to update config.json.

While the oven was still cooling I reran the original main program (not the calibration program), and the display indicated I should open the toaster oven door, and I watched the graph as the temperature went down, and then the display said "Ready", so I thought everything was working.

When I press the Start button, nothing happens. There is no apparent error, the toaster oven does not switch on, and the software does not change state. Any suggestions most welcome. I'm stumped.

User avatar
mikeysklar
 
Posts: 14165
Joined: Mon Aug 01, 2016 8:10 pm

Re: PyPortal Touchscreen Not Responding

Post by mikeysklar »

This sounds like the PyPortal is hung.

Did you make the change to 3v3:
The PyPortal hangs on boot up
Temporarily unplug the MCP9600 from the PyPortal and reboot it. If it boots up properly, then you may need to change the power of the I2C port from 5 volts to 3.3 volts. This is done by cutting and soldering a trace in the back of the PyPortal near the I2C port. You can find more discussion on this at this link.
https://learn.adafruit.com/adafruit-pyp ... ector-2-18

User avatar
jerseyp
 
Posts: 15
Joined: Thu Dec 10, 2020 2:38 am

Re: PyPortal Touchscreen Not Responding

Post by jerseyp »

I changed the jumper to 3.3V, so that was a different problem.

It boots fine. The touchscreen seems not to work, as pressing the Start button does nothing.

User avatar
jerseyp
 
Posts: 15
Joined: Thu Dec 10, 2020 2:38 am

Re: PyPortal Touchscreen Not Responding

Post by jerseyp »

I'm trying to establish whether the touchscreen is functioning, so I ran the example program touchscreen_simpletest.py. I'm not sure if these are the expected results.
IMG_4001.jpg
IMG_4001.jpg (465.3 KiB) Viewed 228 times
I also ran a test program that is supposed to respond to touches by printing x,y and pressure, but it just shows constant values without me touching the screen at all.
IMG_4002.jpg
IMG_4002.jpg (600.43 KiB) Viewed 228 times

User avatar
mikeysklar
 
Posts: 14165
Joined: Mon Aug 01, 2016 8:10 pm

Re: PyPortal Touchscreen Not Responding

Post by mikeysklar »

Thank you for the photo and trying the test touchscreen code.

There is a calibration adjustment you might need to make. First I would remove the cover you have just to confirm that is not pressing on any part of the screen. Then within this code you will see a commented out calibration line you might need to adjust, but you can try running the code with it commented out already.

https://github.com/adafruit/Adafruit_Ci ... uilt_in.py

User avatar
jerseyp
 
Posts: 15
Joined: Thu Dec 10, 2020 2:38 am

Re: PyPortal Touchscreen Not Responding

Post by jerseyp »

Thanks for your reply.

I did remove the stand/frame previously, and that didn't seem to make any difference.

When I run the calibration program you suggested (leaving the commented out lines as they are) I see this:
IMG_4003.jpg
IMG_4003.jpg (468.05 KiB) Viewed 215 times
The small red rectangle on the left side moves up and down, but I don't know what it means. I tried touching around the edges or anywhere with my finger, and also a stylus in the form of a pencil, and there is no change in the readings or any apparent activity. I'm not sure if it's telling me to change the calibration values in code.py to these, or not. Thanks again for looking at this.

User avatar
jerseyp
 
Posts: 15
Joined: Thu Dec 10, 2020 2:38 am

Re: PyPortal Touchscreen Not Responding

Post by jerseyp »

In case it helps, after I purchased the PyPortal I updated the bootloader.

boot_out.txt now contains:

Adafruit CircuitPython 7.3.3 on 2022-08-29; Adafruit PyPortal with samd51j20
Board ID:pyportal

I also downloaded/installed: adafruit-circuitpython-bundle-7.x-mpy-20230110, so as far as I know I'm used the most recent stable/recommended software.

User avatar
mikeysklar
 
Posts: 14165
Joined: Mon Aug 01, 2016 8:10 pm

Re: PyPortal Touchscreen Not Responding

Post by mikeysklar »

Thank you for the additional details about your setup.

There is a note in the calibration code comments about using it:
When the test screen appears, use a stylus to swipe to the four edges
of the visible display area. As the screen is calibrated, the small red
square tracks the stylus tip (REPL_ONLY=False). Minimum and maximum
calibration values will display on the screen and in the REPL. The calibration
tuple can be copied and pasted into the calling code's touchscreen
instantiation statement.
You should also see values printed in the REPL.

User avatar
jerseyp
 
Posts: 15
Joined: Thu Dec 10, 2020 2:38 am

Re: PyPortal Touchscreen Not Responding

Post by jerseyp »

Thanks. I did read this and checked the values in REPL, and they are the same as in the calibration program photo I sent earlier, but I was able to confirm these values are being constantly updated in REPL, and remain unchanged whether I touch the screen or not.

In the touch test program, I notice that it does update the pressure values if I touch the screen, so it seems the ghost values might be related to the z_threshold value mentioned in the touchscreen api docs.

In terms of x,y, I commented out the screen size in the touch test program, and that changes the ghosted value ranges.
IMG_4006.jpg
IMG_4006.jpg (722.01 KiB) Viewed 173 times
If I then touch the screen, the stream of ghost values still continues, but it outputs x values where there were none before (only 0). The y values don't seem to change to a sensible range.
IMG_4007.jpg
IMG_4007.jpg (597.55 KiB) Viewed 173 times
It seems like a calibration problem since values are changing and touch pressure is registering, but I'm still fumbling around trying to figure out what relates to what. Thanks.

User avatar
jerseyp
 
Posts: 15
Joined: Thu Dec 10, 2020 2:38 am

Re: PyPortal Touchscreen Not Responding

Post by jerseyp »

I tried adding z_threshold to the touchscreen test program as documented here:

https://docs.circuitpython.org/projects ... ouchscreen

The default is 10000, so I tried that, and then other values down to 0, and up to 20000. It doesn't seem to have any effect on the sensitivity of the touchscreen at all.

User avatar
adafruit_support_carter
 
Posts: 29457
Joined: Tue Nov 29, 2016 2:45 pm

Re: PyPortal Touchscreen Not Responding

Post by adafruit_support_carter »

What's the history of the PyPortal being used? Is it new? Or has it been is use with other projects? etc.

User avatar
jerseyp
 
Posts: 15
Joined: Thu Dec 10, 2020 2:38 am

Re: PyPortal Touchscreen Not Responding

Post by jerseyp »

It's brand new.

User avatar
adafruit_support_carter
 
Posts: 29457
Joined: Tue Nov 29, 2016 2:45 pm

Re: PyPortal Touchscreen Not Responding

Post by adafruit_support_carter »

OK, one other thing to check - is the ribbon cable on the back inserted well and the two black plastic retainer tabs are both fully pressed in?
ribbon.png
ribbon.png (270.33 KiB) Viewed 93 times

User avatar
jerseyp
 
Posts: 15
Joined: Thu Dec 10, 2020 2:38 am

Re: PyPortal Touchscreen Not Responding

Post by jerseyp »

I checked them and pressed gently and they seem to be snug.

Reran the touch test program and the touch calibration program and nothing changed.
IMG_4015.jpg
IMG_4015.jpg (651.48 KiB) Viewed 92 times

User avatar
adafruit_support_carter
 
Posts: 29457
Joined: Tue Nov 29, 2016 2:45 pm

Re: PyPortal Touchscreen Not Responding

Post by adafruit_support_carter »

Thanks for the additional photo. Agree, that looks fine. And thanks for all the other checking and testing. Not sure what's wrong here, but let's just replace the PyPortal.

Send another email to [email protected] and link them back to this thread again. They can send you a replacement PyPortal (PID 4116).

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”