Adafruit Industries, Essential service and business: NYC – Executive Order 202.6 - Read more.
0

Pyportal Hangs on Temperature Read
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Pyportal Hangs on Temperature Read

by etherwolf on Sat Feb 22, 2020 11:29 pm

Latest MPY dropped on board...

Traceback (most recent call last):
File "code.py", line 68, in <module>
File "/lib/adafruit_adt7410.py", line 82, in __init__
ValueError: Unable to find ADT7410 at i2c address 0x48

etherwolf
 
Posts: 28
Joined: Sun May 10, 2015 1:10 pm

Re: Pyportal Hangs on Temperature Read

by etherwolf on Sat Feb 22, 2020 11:32 pm

Going back to diagnostics shared previously...

>>> import board
Traceback (most recent call last):
File "<stdin>", line 1
IndentationError: unexpected indent
>>> import board
>>> import adafruit_adt7410
>>> adt = adafruit_adt7410.ADT7410(board.I2C(), address=0x48)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/lib/adafruit_adt7410.py", line 82, in __init__
ValueError: Unable to find ADT7410 at i2c address 0x48
>>>

Is there a possibility adt7410 isn't at 0x48?

etherwolf
 
Posts: 28
Joined: Sun May 10, 2015 1:10 pm

Re: Pyportal Hangs on Temperature Read

by etherwolf on Sat Feb 22, 2020 11:45 pm

hmmm - ok

Tried scan and it is reporting its at 0x48...

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.1.2 on 2019-12-18; Adafruit PyPortal with samd51j20
>>> import board
>>> import busio
>>> i2c = busio.I2C(board.SCL, board.SDA)
>>> while not i2c.try_lock():
... pass
...
>>> i2c.scan()
[72]
>>>

etherwolf
 
Posts: 28
Joined: Sun May 10, 2015 1:10 pm

Re: Pyportal Hangs on Temperature Read

by adafruit2 on Sat Feb 22, 2020 11:50 pm

hmm can you try the self-test UF2 here
https://learn.adafruit.com/adafruit-pyportal/downloads
(back up your circuitpython files, this is arduino code so it deletes circuitpython)
does the temperature display?

adafruit2
Site Admin
 
Posts: 19110
Joined: Fri Mar 11, 2005 7:36 pm

Re: Pyportal Hangs on Temperature Read

by etherwolf on Sun Feb 23, 2020 1:26 pm

Temperature and Light readings!
Would you recommend clearing and going back to circuitpy image? I'm thinking that if that's next step - why not just go to 5.x?
Unless you would like to do other diagnostics or something else... I'm game.

Thanks!
Attachments
IMG_4415.jpg
IMG_4415.jpg (103.25 KiB) Viewed 33 times

etherwolf
 
Posts: 28
Joined: Sun May 10, 2015 1:10 pm

Re: Pyportal Hangs on Temperature Read

by adafruit2 on Sun Feb 23, 2020 1:31 pm

yeah its def not hardware...but also not everyone is having these issues. ok yeah can you try 5.x and the latest everything :/

adafruit2
Site Admin
 
Posts: 19110
Joined: Fri Mar 11, 2005 7:36 pm

Re: Pyportal Hangs on Temperature Read

by etherwolf on Sun Feb 23, 2020 1:39 pm

Thanks! :-)
for everything. Your team is really great.
I know I haven't reloaded and tried anything yet. Still doesn't take away from the support your team provides and what you do.

etherwolf
 
Posts: 28
Joined: Sun May 10, 2015 1:10 pm

Re: Pyportal Hangs on Temperature Read

by etherwolf on Sun Feb 23, 2020 1:56 pm

ok- saw that 5.x says:
This is the latest unstable release of CircuitPython that will work with the PyPortal.
Unstable builds have the latest features but are more likely to have critical bugs.

I'm going to just do firmware update, reload 4.x and try again...
Thanks for the warning :/ face

etherwolf
 
Posts: 28
Joined: Sun May 10, 2015 1:10 pm

Re: Pyportal Hangs on Temperature Read

by adafruit2 on Sun Feb 23, 2020 2:03 pm

please try 5x - we also fixed a lot of bugs

adafruit2
Site Admin
 
Posts: 19110
Joined: Fri Mar 11, 2005 7:36 pm

Re: Pyportal Hangs on Temperature Read

by etherwolf on Sun Feb 23, 2020 5:04 pm

Updated to 5.x
Added some basic libs
Using the example script adt7410_simpletest.py
I'm now getting scrolling temp readings from the ADT7410 on the screen

D:\lib>dir /b
adafruit_bus_device
adafruit_adt7410.mpy
adafruit_register

D:\lib>
Yay!!!

Next I'm going back to the script that pulls the sensor and light data and sends to adafruit IO...


Thanks!

etherwolf
 
Posts: 28
Joined: Sun May 10, 2015 1:10 pm

Re: Pyportal Hangs on Temperature Read

by etherwolf on Sun Feb 23, 2020 5:57 pm

Adafruit Support Team,
All is working now.

Process to get there:
Use the eraser (I used the PyBadge_QSPI_Eraser.UF2)
Download the 5.x version of circuitpython (see https://learn.adafruit.com/adafruit-pyp ... cuitpython)
Double click reset button on back
Loaded adafruit-circuitpython-pyportal-en_US-5.0.0-beta.5.uf2 to the device via USB
Get the 5.x libraries package adafruit-circuitpython-bundle-5.x-mpy-20200222.zip ( https://github.com/adafruit/Adafruit_Ci ... e/releases
Added following libs to Lib on device:
adafruit_bus_device
adafruit_adt7410.mpy
adafruit_register
adafruit_io
adafruit_esp32spi
adafruit_requests.mpy
neopixel.mpy
neopixel_spi.mpy

Added back secrets file with my API key
Added original code from:
page 2 of this tutorial:
https://learn.adafruit.com/iot-pyportal ... t-io-setup to code.py file and dropped on device

Pyportal auto rebooted as expected and WALA!!!!!
Data is being captured and sent to Adafruit IO!!!!!

Thanks Adafruit team :-)

etherwolf
 
Posts: 28
Joined: Sun May 10, 2015 1:10 pm

Re: Pyportal Hangs on Temperature Read

by adafruit2 on Sun Feb 23, 2020 8:43 pm

yayyy!

ok @carter - good news, i think a combo of 5.x and the new library may fix :)

adafruit2
Site Admin
 
Posts: 19110
Joined: Fri Mar 11, 2005 7:36 pm

Please be positive and constructive with your questions and comments.