#circuitpython-dev
1 messages ยท Page 187 of 1
ya its going
Ok
want me to ls things to compare?
I guess? I think I have everything all buggered at this point with rbenv half setup.
just tell me what I need to ls
I don't even know where to start. I need to start fresh again. Let me try to figure out how to remove rbenv.
What does this even mean? simply remove the rbenv init line from your shell startup configuration.
there's probably a line added in .bashrc in your home directory
instructions that start with "simply" are always gooooooood.... ๐
try nano ~/.bashrc
Yah doing that now thanks
Maybe it never got added. Helpful. Ok skipping that step I guess.
alright reinstalling ruby
I don't think the samd can pull up when EXTI is active because the pinmux is enabled.
This is the error I'm getting when I try to install Travis. 2554 kattni@robocrepe:gems $ gem install travis -v 1.8.8 --no-rdoc --no-ri ERROR: While executing gem ... (Errno::EACCES) Permission denied @ rb_sysopen - /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/.gitignore
But brew install ruby installed 2.5.1, if that's relevant.
maybe you need to update ffi?
I ran gem system --update or whatever it was...
no. Permission denied.
and throwing a sudo in front of that still leaves you minus execute perms on travis?
I'll try it again with a sudo.
(in front of the gem install, that is)
<@&356864093652516868> here is the recording of today's meeting: https://youtu.be/5zSaN1utYuY
Notes with time codes are available here: https://gist.github.com/tannewt/8ee3a0b7a4bf03015b8f7446505f36b2 Thanks to @kattni for taking notes! Join here for ...
@idle owl random, but: https://tglawless.blogspot.com/2017/01/installing-travis-cli-on-mac.html
I recently had the need to install the Travis CI CLI tool on my Mac and it turned out to be harder then I would have expected. ย The issue ca...
Huh, I can't see the word unsupported anywhere, for me anyway, it says "Though this MicroPython-based library is available for use in CircuitPython, its functionality may change in the future, perhaps significantly.". Think my browser might be rendering the page wrong?
I definitely have xcode installed. But I'll try it anyway.
does mention ffi, though maybe that's a stretch...
Already installed.
hrm. i'm kind of at a loss. apologies if you've tried it already, but i wonder if just brew install travis would work any better.
there does seem to be a recipe.
I don't think they have ... oh. They didn't as of fairly recently according to an issue on the travis repo
We should have removed it from the documentation. struct could serve the same purpose in many cases. Would it work for you? It takes about 2760 bytes to include, so it's too big to include in a number of our builds.
well, if it works, i apologize for the runaround with rubygems and whatnot.
trying it, no apologies needed, that's how the repo said to do it too
heh, yeah, i guess i'm apologizing more on behalf of the entirety of software development as a culture and practice circa 2018 than for myself personally.
how about "available for use in some builds of CircuitPython" (or "versions"
I.... it installed. I ran the travis command on the repo. Then we were back to that shell completion not installed thing I pasted earlier, so I said yes. And this: Shell completion not installed. Would you like to install it now? |y| /usr/local/Cellar/travis/1.8.8_3/libexec/gems/travis-1.8.8/lib/travis/cli/command.rb:365:in `initialize': Permission denied @ rb_sysopen - /Users/kattni/.travis/error.log (Errno::EACCES) from /usr/local/Cellar/travis/1.8.8_3/libexec/gems/travis-1.8.8/lib/travis/cli/command.rb:365:in `open' from /usr/local/Cellar/travis/1.8.8_3/libexec/gems/travis-1.8.8/lib/travis/cli/command.rb:365:in `save_file' from /usr/local/Cellar/travis/1.8.8_3/libexec/gems/travis-1.8.8/lib/travis/cli/command.rb:282:in `store_error' from /usr/local/Cellar/travis/1.8.8_3/libexec/gems/travis-1.8.8/lib/travis/cli/command.rb:214:in `rescue in execute' from /usr/local/Cellar/travis/1.8.8_3/libexec/gems/travis-1.8.8/lib/travis/cli/command.rb:191:in `execute' from /usr/local/Cellar/travis/1.8.8_3/libexec/gems/travis-1.8.8/lib/travis/cli.rb:64:in `run' from /usr/local/Cellar/travis/1.8.8_3/libexec/gems/travis-1.8.8/bin/travis:18:in `<top (required)>' from /usr/local/Cellar/travis/1.8.8_3/libexec/bin/travis:22:in `load' from /usr/local/Cellar/travis/1.8.8_3/libexec/bin/travis:22:in `<main>'
That apology I'll accept.
haha
you definitely don't need the shell completion stuff, tho i'm guessing you may get the same stack trace fireworks regardless of your answer there...
great.
More crap I don't need installed.
Ok I'm done for tonight. I'm getting nowhere. I'm going to spend time with family.
@gusty kiln Thank you very much for your help. I will likely ping you again tomorrow and definitely if/when I ever get to step 2.
@slender iron We'll deal with this tomorrow. I'm done for tonight.
right on - have a good one.
goodnight @idle owl
@idle owl for tomorrow: https://github.com/travis-ci/travis-ci/issues/2982#issuecomment-359143162
@umbral dagger hihi pingpong
Does anyone know of an MQTT client for CircuitPython/MicroPython that supports QoS level 2? I have data reliability issues when using the umqtt/robust client, since it only supports QoS level 0 and minimally Level 1.
I need to find this "almost nobody" guy. He seems to like ALL of my projects!
QoS 1 should work fine, but I don't think umqtt/robust is actually doing it.
It tends to behave more like Q0S 0
It gets most messages, and ignores a bunch of them that my mosquitto_sub picks up fine.
e.q, umqtt/robust behaves like mosquitto_sub on QoS 0. not like mosquitto_sub on QoS 1.
<--keep trying
It seems that maybe I am publishing too fast
adding just a half second delay between pubs seems to help
Now to add some NeoPixels for my status!! ๐
#hereComesTheBlinky
ignorin
Hi, everyone. I am attempting to get the files adafruit_bmp280.mpy & adafruit_bus_device into my Raspberry 3 running Raspian
is there a command for this?
(linux)
@indigo rampart I'm not sure what you are trying to do, but if you want to use the CircuitPython Ligraries on aa Raspberry Pi you should be iinsatlling the CircuitPython libraries via pip3 as descrbed here: https://learn.adafruit.com/circuitpython-on-raspberrypi-linux?view=all
i dont think the bmp280 is up yet
but if you comment here, it'll get added next!
oh wait i see brennen did it
AH sorry -- I ddi not note it was bmp280 not bme280..
@gusty kiln ^ hey looks like we started but didnt finish bmp280
did you just need to do the final release?
@meager fog lemme check
@indigo rampart hold tight, might be an ez fix
thanks! I tried pip3 install adafruit_bmp280.mpy
it would be pip3 install adafruit_circuitpython_bmp280
yeah, codewise it looks like it just needs tagged for release; i can do that right now.
Hmm,
SO on that page I am at the part where I need to install those libraries
Adafruit_CircuitPython_BMP280 is already installed
we dont have a guide for it
so you will have to mimic the BME280 page
but use bmp instead of bme
@indigo rampart the page you linked is for installing it on a microcontroller - lika feather M0 Express.. For the Raspberry Pi you have to use the "Blinka" interface linked above.
Good luck and keep asking if it does not work for you.
Ooh - the guides just keep getting better!
Found what I needed!
meanwhile, i managed to hork travis builds on Adafruit_CircuitPython_BMP280 by playing fast and loose with tags.
@tidal kiln @idle owl @slender iron working on Motor frequency issue. The PCA9685 starts out at 1525.88 Hz. I'll check for at least 1500, and try to set the PWMs' frequencies if they're less than that. I think I will add a frequency.setter to PCA9685 that throw NotImplementedError and explains you can only set the frequency for the whole chip. Then motor doesn't have to throw anything itself, and the PCA9685 explains its incomplete implementation in all caes.
obviously this is bad and i should know better; anyone foresee any problems with a minor version bump just to skip over a tag i less-than-wisely re-pointed at a different commit?
did you make a release yet? you can reassign the tag if you haven't. Otherwise, no problem, I've had to skip versions for various reasons like that ๐
you can delete the old release completely if you delete the tag, delete alll the assets for the relase, and then push with tags: git push --tags
i think if i understand what's going on here (which i may not), travis never got as far as pushing the release back to github, so assets probably don't exist...
which lib?
there's a 3.0.4 release: https://github.com/adafruit/Adafruit_CircuitPython_BMP280/release
but you/I can delete that.
yeah, i'll zap and bump.
@indigo rampart you can install it yourself, but once the adafruit-circuitpython-bmp280 library is available via pip3, it woould be installed automatically when pip3 install adafruit-circuitpython-bmp280 is run. It's supposded to be easy ๐
working on that part. ;)
@indigo rampart bit of a hitch in our build pipeline for this one, but we'll have it up on PyPI for you before long. sorry for the delay.
FYI -- pip3 search circuitpython gives a list of what is available or pip3 search adafruit for all adafruit stuff
Thanks!
@raven canopy you asked way back on 7/21 about a "-Wlto-type-mismatch" diagnostic. Did you get an answer? Seems like I should do the gcc upgrade as mentioned.
and indeed, updating gcc makes the diagnostic go away. ๐จ
@tulip sleet possibly typo, it should be REPORT_ID instead of REPORT_LENGTH for keyboard https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/common-hal/usb_hid/__init__.c#L58
hmm, I just compiled the master, and it says "CircuitPython 3.0.0-alpha.6-1330-gbf033123a" in the repl, is that expected?
I thought 3.0.0 was released?
@dhalbert @tannewt I would like to light up an LED when receiving SET REPORT request from host e.g CAPSLOCK. But couldn't find where to add it, could you please give me a hint ?
keyboard and mouse works quite well, cleaning it up for full list of devices support
Hey guys - I just tried defining a function and tossing a "import random" into my itsy bitsy's main.py file, and got the following error: "The file or directory \main.py is corrupt and unreadable. Please run the Chkdsk utility." Is anybody familiar with this?
If I grabbed a fresh.UF2 file, would that "uncorrupt" my main.py?
Ooh yeah - looks like I was on v1.23, and we're now at v2.0
But how do I get out of the bootloader mode? If I'm double-tapping reset, it's staying in ITSYBOOT
@opaque thicket Have you copied the new UF2 to it?
That's right
what file did you copy to it?
I went here: https://learn.adafruit.com/introducing-itsy-bitsy-m0/uf2-bootloader-details, and grabbed the latest github reference for the ItsyBitsy
OK - that rplaces the bootlaoder -- not really what you needed to do , but not a bad thing -- now you will need to relaod circuitpython -- use the latest 3.0 release from https://github.com/adafruit/circuitpython/releases
What version of Circuit python were you using before?
copy the itsysbitsy_m0 .uf2 to the ITSYBOOT folder
@solar whale Ah yes! Just saw that!
I assume you have an itsybitsy m0 -- not an m4
Yep - m0 - where would I find my circuitpython version/
(Also - thanks for the help!)
no problem -- the version would have shown up when you entered the REPL, but its not that important -- may as well get you up to date! Once you have CP relaoded, you may have to do some further updates -- we'll see
Gotcha - we'll give it a go!
IF your file system was corrupted, it will have to be erase, That my have happened asa pard of the bootloader update anyway -- or we can do it once CP restarts. YOu will then need to reload any libraries and files you had on it.
Ok, cool! As it looks, I'm still getting the corrupt main.py message. Neopixel's relaying an error, too. (Green pink yello, cyan cyan)
OK - makes sense -- we can fix that -- first make sure you copy off any files you need to save -- we'll update the library files -- are you only using the neopixels at this time or other libraries as well?
Nah, square one's perfect - all the other bits and bobs are saved on the pc
ok - enter the repl and type this ```import os
os.erase_filesystem()
sorry ```import storage
storage.erase_filesystem()
should have rebooted -- only boot_out.txt remaining
For text, correct. I've also got .Trashes, .metadata_never_index, and .fseventsd
thats fine
Sweet!
OK -- now yo can put your files back -- execpt for any library files in lib/ use the 3.x versions from https://github.com/adafruit/circuitpython/releases
that is you now have to use the version 3.x .mpy library files
Gotcha, so if I had the original main.py, I just drag that back in, and I'm back at square one?
when you enter thr REPL the banner should show a version 3.0.0 version for Circuit python
correct -- but you will need new lib files if you are using any.
Gotcha! @solar whale - thank you!
you are welcome -- a warning -- if you modify files -- make sure it has time to write to the FS before using it -- that is often the cause of FS corruption.
Good to know! I think that'll make all the difference
Oh - but one more question: The libraries like touchio or adafruit_dotstar - can I just pip those?
the dotstar library is in the "bundle" use the latest from the 3.x file here https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases -- I posted the wrong link earlier -- sorry.
Sweet, thanks!
for touchio, - I think it is "builtin" so it should be there already -- verifying.
if you just do import touchio at the REPL, does it load or give you an error?
just to be clear -- to use the files from the "bundle" -- download and unzip https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/download/20180731/adafruit-circuitpython-bundle-3.x-mpy-20180731.zip -- then you can just copy the whole lib folder to your itsybitsy_m0 or extract only the file you need -- your choice.
give it plenty of time to copy!
more info on this here: https://learn.adafruit.com/introducing-itsy-bitsy-m0?view=all#installing-the-circuitpython-library-bundle-11-4 but make sure you use the 3.x library now that you have updated to CP 3.0.0
man, that was a alot to catch up on. 2 days of travel puts you behind! ๐
@onyx hinge i got pretty much that answer (update). also, i had reset my git head so, after removing the -flto flag again for debug "fixed" the warning without updating.
@stuck elbow i think jerry asked the same question before, and IIRC Dan said it was because the 3.0.0 tag was applied to the 3.x branch, not master...
@stuck elbow You have to also pull the "tags" - then it will report 4.0.0
ahh..see, there was a better answer.
ah, great, thanks
by the way, anybody knows what I need to change to increase the disk size on the non-express boards? I removed some modules and have some extra room...
@stuck elbow Its been awhile since I did this, but I think this line has to be changed -- trying to recall if that is all -- may want to get more "expert" input. https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/boards/samd21x18.ld#L9
@timber mango #define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) in mpconfigboard.h and I think maybe another place as well. looking...
Ah - sorry -- that was what I was looking for
@tulip sleet what do the three numbers (0x00040000 - 0x2000 - 0x010000) represent?
256k - bootloader size (8k) - flash filesystem size (64k). See the comment line 8 in the .ld file
filesystem size computed here: https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/internal_flash.h#L45
0x010000 is 64k
so supposing I would like to add 16k to it, what would I modify? this is a bit confusing
I need to modify the ld file and the mpconfigboard.h, right?
add 16k to line 42, change "64k" to 80k here: https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/boards/samd21x18-bootloader-crystalless.ld#L9
and change the 64k (in hex) in mpconfigboard.h
it's a little hard because not everything can include the value from a central place
maybe we could with some more work, but 64k hasn't changed in a long while
so the BOARD_FLASH_SIZE doesn't say how much room there is for the filesystem, but how much there is for the code?
and the ld file doesn't need modifying?
@dhalbert @tannewt I would like to light up an LED when receiving SET REPORT request from host e.g CAPSLOCK. But couldn't find where to add it, could you please give me a hint ?
We haven't provided a way to do that reverse-direction dataflow at all yet in the HID module, so it would be noticeable work and an API addition. Fine to skip it for now. You could open a long-term issue
@timber mango sorry I pasted the wrong link, corrected above
ok, so the linker script and mpconfigboard.h
have to change the .ld file, mpconfigboard.h, and internal_flash.h
trying now, thanks
all mention 0x10000, either in hex or as "64k" (you can use k and m suffixes in .ld scripts, much easier to read)
you might grep for 0x10000 in the whole tree in case I missed anything
thought sometimes it's written 0x010000
ports/stm32/flashbdev.c
45:#define FLASH_SECTOR_SIZE_MAX (0x10000) // 64k max, size of CCM
I guess that's not relevant
@gentle bronze
possibly typo, it should be REPORT_ID instead of REPORT_LENGTH for keyboard https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/common-hal/usb_hid/__init__.c#L58_
you are right, go ahead and fix or file an issue
Ah, thanks. Since I don't know how to organize the cp API and my obj things. I will just turn on/off an LED0 for that, does it sound OK, if not I will leave it as stub.
A stub is fine too, since we don't want to reserve an LED just for this. It's more likely LED state would be sent on to some peripheral, (e.g. a pin) for someone who's building a keyboard. Right now CircuitPython doesn't have an of handling callbacks which we might want for this case (since SET REPORT can arrive spontaneously).
just came across two additional resources. AMP hour:
https://www.youtube.com/watch?v=d-Uw3YOf7dE and https://www.youtube.com/watch?v=0rtD55Mlhy8
These are the interviews that scott and tony did with the Amp hour. Scott's take is the best top down discussion of circuitpython I have seen so far.
@dhalbert everything seems works, except for the gamepad, I got this error. I have no idea about this, am I missing something
Adafruit CircuitPython 4.0.0-alpha-40-g2c85f42-dirty on 2018-07-31; PCA10056 with nRF52840
...
btw @tannewt this line should be declaration only, and is missing extern right ?
TypeError: 'bytearray' object does not support item assignment
In mpconfigport.h, try changing these from 0 to 1:
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (0)
...
#define MICROPY_PY_BUILTINS_SLICE_ATTRS (0)
There are probably some other changes to the feature on/off flags that I should make match up with atmel-samd and esp8266. I'll do some diff'ing.
Superb !! It is all working now, thanks. I will do some clean up and submit an PR for review
@slender iron I did a chmod on a directory and reran the travis encypt command. @gusty kiln said I didn't need shell completion so I said no. I got this but now it's sitting at this point. 2582 kattni@robocrepe:pca9685 [5m pypi fd37a8d]$ travis encrypt --add deploy.password Shell completion not installed. Would you like to install it now? |y| n Detected repository as adafruit/Adafruit_CircuitPython_PCA9685, is this correct? |yes| yes Reading from stdin, press Ctrl+D when doneNot sure if this is correct. Or if the fact that I shouldn't have had to chmod anything in the first place means that there's problems elsewhere in the pipeline.
Which I almost just typoed "pipline" which essentially also works anyway. ๐
@idle owl that's correct - you just need to enter credentials at this point and hit ctrl-d
@gusty kiln Ok where do I enter the credentials? it's not prompting for anything
there's not much interface, but it is waiting for input
just go ahead and paste into that terminal
ah
this also took me a minute to figure out for sure the first time around.
๐
@gusty kiln Scott's instructions for step 2 say: "Now modify the deploy section to add a pypi section and including the password portion in it." It looks like the password/secure bit already included though? Or is it somewhere else and I'm supposed to put it in there...
@idle owl i'd suggest taking a look at an existing .travis.yml - hold on, i'll dig one up
I have one
The instructions don't say to remove - pip install pylint circuitpython-build-tools Sphinx sphinx-rtd-theme from install, but it is not in the one I just linked.
scroll down a bit?
There's also no overwrite: true in the one I linked.
Oh the pylint thing is there, you're right
It was in a different order so I got confused.
The instruction example code has the overwrite in it. So I'll leave it. Not sure why it's not in the other one.
i'm not entirely sure about overwrite: true, but you probably want it and i may need to add it to bmp280.
the main thing is there're now two release providers, one for github releases and one for pypi
the password section you added with the travis cli goes in the pypi provider
That's what was added when I ran the travis command correct?
Because I didn't manually add it
correct
Ok
Ok so... Do I keep the stuff that's already in setup.py and add everything else to it? Or do I paste everything from the example? How do I know what to add to requirements?
Do they all require Blinka, and otherwise go based on requirements.txt?
in general you should be able to use the setup.py from scott's instrux as a template
although i can imagine some situation where other stuff needs to be included - which lib are you working on?
In this case there's already a setup.py with some info in it, so I wasn't sure if it needed to be kept
pca9685
takin' a look
Thanks
i'd overwrite that one, other than pulling the author name out of it.
Ok thank you
for requirements, i've been looking at anything already in a requirements.txt, and the python code itself.
(and setup.py)
ok
blinka provides the standard circuitpython / micropython stuff, but it's common to need something like adafruit-circuitpython-busdevice
the dependencies bit is pretty well covered in scott's step 6 i guess
Hmm. This one looks like it requires register and bus_device but neither are in requirements.txt.
ยฏ_(ใ)_/ยฏ
go ahead and add 'em
to be clear: Blinka will go in all of them?
Also, what does register look like in the requirements: adafruit_register?
I don't know of an example that has it in.
i think it will be common, but isn't necessarily going to be required:
If CircuitPython APIs are used such as digitalio, busio or from micropython import const then add Adafruit-Blinka as a dependency.
@idle owl here's an example with register: https://github.com/adafruit/Adafruit_CircuitPython_APDS9960/blob/master/requirements.txt
Thank you
Will this add them to requirements.txt or should I do that manually?
Wait, let me check the instructions before I keep asking questions
See, it's there.
๐ Read things first, Kattni.
@gusty kiln Instructions ```Update dependencies! Dependencies are documented in two places:
in setup.py under install_deps```There is no `install deps` but there is `install_requires`. Is that what Scott meant?
Also DMing you some terminal output.
It's long, so I'm not sending it here.
Thanks.
yeah, install_requires is probly what you're looking for.
ok
also good to try installing locally (i usually use virtualenv for this just to keep the clutter contained)
There's now a .eggs/, adafruit_circuitpython_pca9865.egg-info/, and dist/. Are those supposed to go with the PR?
nope, those are all build artefacts
bleh ok
i've been adding a more robust .gitignore for that reason - one sec
this is what i've been using: https://github.com/brennen/bpb-kit/blob/master/fragments/python-gitignore
I don't know how to install it locally
creating a venv now
Ok created and activated
@gusty kiln I can try doing the local install, but I'm assuming that's part of your testing? Also, I can absolutely see why you weren't keeping up with this. This is convoluted. Going to be super keen in the end, but oi.
you can just run python3 setup.py install under that venv
ah ok
and yeah, i'll install and test on actual pi hardware, update readmes & fritzing, etc.
Ok it did way more nonsense than I'm going to paste and ended with this: Installed /Users/kattni/repos/venvpypi/lib/python3.6/site-packages/Adafruit_PureIO-0.2.3-py3.6.egg Finished processing dependencies for adafruit-circuitpython-pca9865==3.1.2.dev0+gfd37a8d.d20180731
looks good to me.
Ok keen
yeah, this is all sort of finicky. good to have more people spun up on the process.
@gusty kiln I'm going to do PRs for this, and assign you to review. I can eventually merge my own if that makes it easier on you, but my knowledge of Git/Hub is essentially limited to my workflow, I don't know how to merge a branch without a PR. And I'd really rather you look at it for the first few at least.
@idle owl yeah, makes sense - why don't we assume you'll do PRs for any you do and i can add things to my queue for testing etc. as they come in for review.
That sounds perfect
@tidal kiln @tulip sleet I evidently have the motor featherwing somewhere here but I don't know where. So, if you can test Dan's PR on PCA9685 that would be great. I ordered one, so if you can't get to it, I'll test it when it arrives probably Thursday.
@slender iron I nailed it - was the clock SAMD51 (wasn't running at all).
https://github.com/wa1tnr/sandboxx/blob/master/AtmelStart.d/atst_D51_aa_rev00g3/main.c#L204 ftw
.. and I'm back quiet.
@idle owl @tulip sleet sry. i don't have one on hand either.
@tidal kiln Ok, no worries
@tulip sleet Did you test it? Also travis failed on motor apparently
@tulip sleet On a file you didn't edit. Your change didn't fail.
travis isn't pulling in the updated PCA lib
- Implement #1009 with following devices: keyboard, mouse, consumer control, gamepad, sys control. Note: Digitizer is not supported yet, since I am new to this device and didn't know how to test with.
- Fix an issue when eject/safely remove msc (START_STOP_UNIT command not handle previously) https://github.com/hathach/circuitpython/blob/nrf52840_usb_hid/ports/nrf/usb/usb_msc_flash.c#L74 . Also added invalid command for unknown command as well.
- Added walkaround to use common lib/utils/int...
@slender iron That link you sent me yesterday, to that GitHub issue on travis-ci, was that another thing to try? Or is there something else there I'm supposed to be aware of?
did you read it?
Yeah
they wrote a shell version of travis encrypt
And started clicking through some of the links and then realised I wasn't sure what you were highlighting
Ok, that's what I was clicking through
๐
So if I got it to work, I'm good though, yes?
yup!
Ok keen.
brew ftw.
Bookmarked anyway in case this precarious situation fails in the future ๐
I don't follow
add the link to our pypi issue so others can skip ruby
Oh ok keen yeah
@slender iron Do you want me to edit the current instructions or add it as a comment to the end of the thread
new comment is probably better since it'll trigger an email
Ok
I was unable to get travis installed using Ruby on Mac OS X. I instead used brew install travis using this formula. It still requires Ruby be installed, which I had also done through brew.
Following travis installation, I had to chmod the ~/.travis folder to get it to work properly. I don't know if this is a step that will be required for everyone, but I'm including it in the event that anyone else runs into issues as well.
@hathach Whatever works. :-) Feel free to change it.
Received an email from another attendee at PyOhio who was unable to attend my tutorial, but wanted to know where to find the info because they want to start learning CircuitPython. ๐ This is at least the third person from PyOhio who has contacted me about how to go about it.
yay!
@tidal kiln @idle owl I did not test it, though I could (I have a motorwing)
@stuck elbow were you able to change your disk size? I'm embarking on the same thing - stripped out quite a lot of libraries and want to reclaim that flash space for my USB drive. I'm curious if you had to reformat the FAT for your drive , if yes how you did that and specified the larger size or did it just work "magically". I'm using the Trinket M0
@sharp rain it seems to be working. the fat gets recreated when you flash on the non-express boards anyways
dang. nice. did it wipe all your data?
yes, that's what happens when you flash firmware
cool. mine has never been wiped ๐
is it an express board?
Naw, the Trinket M0 is 256kb of flash memory. I swap between Arduino and various 2.x and 3.x circuit python and the FAT file system seems to always stick around
I believe that the .uf2 will not overwrite the filesystem: it writes only the regions that are included in the firmware. But if you load an Arduino program, it will erase everything.
Negatory. That works too. I'm relying on the behavior to access stuff I wrote in circuitpython from Arduino. There's a few articles on it and a library, I think you wrote? ๐
Note that you can back up the whole thing by copying CURRENT.UF2 from ...BOOT. That includes the filesystem contents too.
oh, nice, so I can have a firmware with some example files already included
and maybe documentation too
I have a gut feeling that both the flashers literally just start writing at the start memory location working upwards, and leave everything that's already there above the end address. I need to write a huge 190KB sketch and verify this, but I bet that has the effect of squashing the file system since it overwrite it
No, each block in a .uf2 specifies where it's supposed to go: https://github.com/Microsoft/uf2-samdx1/blob/master/README.md
@slender iron You suggested I go through the list from that forum post to get the requested libs into PyPi. One of the requested libs if the FeatherWing helper lib. I assume that goes in as well? I wanted to check first since it's not a driver technically.
and the filesystem is a regular FAT12 filesystem with a FAT table referencing 512-byte sectors
BTW @tulip sleet this https://github.com/adafruit/Adafruit_SPIFlash is freaking awesome I'm not sure who thought of that idea to bridge Arduino and Cp but brilliant. amazing.
i didn't write that: tony dicola and ladyada did
i just built the erasers. it doesn't support qspi yet so we don't have an m4 eraser
lol, I gave you credit because of the last commit. Sorry.
@idle owl yes please ๐
Ok keen
idk, im a dev, so I have my code in a local repo, and then drag it over the the board, just out of habit, so if it's wacked, its a matter of dragging over the utf and then my code, but yeah - I could see how that is useful for people
*uf2, not utf. derp
My current CP request would be a comma separated EXCLUDE_LIB compilation option to leave out libraries and make trimming the build easy. But that's just me. Not sure who else would want that. I was going to try to hack up the changes in the next week. Meanwhile, I can comment out things in the config.
I can see how for most people you want a "Just Works" CircuitPython build. And memory is getting bigger every year, so.. meh
@slender iron Ok with FeatherWing, the motor helper needs motor and pca9685, are those then considered dependencies for the purposes of setup.py or requirements.txt? Or because they're specific to one of five different libs, they're not considered dependencies....
both places
the deps should cover all things that are installed
Ok, wasn't sure whether that covered this situation since you might not use the motor helper
ok
ya. its a consequence of having one repo for them all
@idle owl do we have any examples of libraries that already have the pylint 1.9.whatever version fix, or is it just in the learn guide repo?
@tulip sleet Might only be the learn repo at the moment
@slender iron How do I add adafruit_seesaw.seesaw to requirements? adafruit-seesaw.seesaw? or just adafruit-seesaw and then the lib imports what it needs?
the last one. its the package name you'd give pip
ok thanks
Ok this should be good to go after travis gives the ok. Please take another look.
np
@tulip sleet Passed. Merged.
tnx!
@gusty kiln Ok I have two more PRs for you. Did you want me to add more descriptive keywords to the first PR?
@idle owl either way; i can also hit it when i take a pass at the readme. (and perhaps i should ask the group if that's a good idea - seems like it might aid discovery a bit.)
@gusty kiln Ok I'll leave it to you. Do you want me to merge the PRs once you approve them? Or are you going to merge them?
@slender iron Once these are merged, do we need to do a new release with the PyPi changes?
yup
Ok keen
i'll do merges.
Ok excellent
@gusty kiln Do you want me to do the releases once you merge?
@tulip sleet Your pylint update gave me a rebase ๐
not deliberate ๐
I know ๐
pylint 2.0.0 is keen on doing if blah in (1,2) instead of if blah == 1 or blah == 2. I'm not sure if the (1,2) gets created each time (it could be a constant), but probably yes
should be if blah in {1, 2} actually
@idle owl yeah, go ahead and do a release and we'll see if travis is happy.
and no, it 's not created every time
@gusty kiln on it
@tulip sleet Yeah I hadn't seen that error before which also made me think it was 2.0.0
rad
@slender iron Alright. 1 PR merged, and 2 open for the rest of the libs the person in the forums wanted. Were there any others we wanted to prioritise before I start going alphabetically/dependency-based?
up to you
ok keen
@gusty kiln ok everything is released. on to the next one. heading into alphabetical mode. except if I run into a dependency in which case I'll get them in that order.
@idle owl sounds good - thanks!
@umbral dagger hey Q for glider
do you want to try a 500mah or 1200mah battery
see if its more glidey?
I started with a 500. The 2500 is for mass to balance the servos at the front. With the smaller batteries it is prone to nosedive.
huh ok!
Holding the tail down actually makes the wings more effective (more parachute-y) even though the mass is higher overall.
I really want to throw it off my balcony (5th floor) and see what it does ๐
doooo it
Maybe on the weekend when there's no cars around.
Valid.
haha
If so, I'll attempt to get it on video.
Since we're talking about this in the circuitpython channel... the CP CPX library need more accelerometer support akin to MakeCode's.
@idle owl, et al. I was just reading the CircuitPython Essentials guide and noticed what I think is an error. On https://learn.adafruit.com/circuitpython-essentials/circuitpython-pwm under "PWM Output with Variable Frequency" the third paragraph below the code block has the comment/uncomment instructions backward.
@meager fog I do talk about the battery being a counterweight in the bit where it gets mounted to the body piece.
yah im reviewing now
@wraith tiger Fixed. Thanks!
You're welcome.
Are there issues running I2C and SPI at the same time?
@umbral dagger what more? for accelo?
@red dock shouldn't be
@tidal kiln Yeah. Makecode has things like freefall, various impacts (3g, 8g, ...)
so some of the LIS3DH special feature things?
@tidal kiln Not gesture recognition really, but similar.
some are, yes.
CP should be on par, yeah?
yes
It pretty much needs something like interrupt handling as well.
Last i recall CP didn't do that.
not currently
@slender iron Ok, I'm just running the circuitpy touch paint demo and as soon as I add an import for the tsl2561 lux sensor the code spits out a "memory allocation failed, allocating 513 bytes" error.
@red dock what main board are you using?
@tidal kiln Metro Express M0
is this the touch paint demo?
https://github.com/adafruit/Adafruit_CircuitPython_STMPE610/blob/master/examples/stmpe610_paint_demo.py
@tidal kiln yes
My guess is that there is not enough memory in an M0 for the TFT an the lux sensor drivers
@solar whale Not enough memory to have them both open at the same time? (as opposed to a storage drive size issue because it doesn't seem to care that I have the extra files saved in the library, it only hits the error when I have the extra import statement)
I use it mostly on an M4 or nrf52 which have much more RAM. It is execution RAM, not storage that is the issue.
@red dock which display?
how do you have that attached to the metro?
@red dock what libraries / reference are you using for circuit python on that featherwing? I've got the same screen but currently only see libraries for Arduino.
@solar whale @tidal kiln @slender iron I'm going to have to leave here, the library is closing, but I'll catch you as soon as I can.
@tidal kiln I'm running over the SPI interface
@hollow snow just the RGB libraries from the standard package
Anybody know where I could find the itsybitsy m0's main.py file for circuitpython v3.0? I've only got the main from cirpy 2.3...
@hollow snow display library:
https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display
touch overlay library:
https://github.com/adafruit/Adafruit_CircuitPython_STMPE610
@opaque thicket did it arrive with 3.0 on it?
@tidal kiln , nope - I had to run erase_filesystem earlier this morning.
@hollow snow the paint demo is in https://github.com/jerryneedell/Adafruit_CircuitPython_STMPE610/tree/master/examples
Also, @solar whale sorry I bailed earlier this morning - had to juggle getting to work and new baby.
Oops Wrong link - just a sec
@solar whale you linked your fork ๐
๐ฆ
hmm, well, I initially thought my feather board was circuitpython like my other boards, but it is a huzzah. When reading on the info page, it appears as Arduino, however, when looking at downloads for 3.0.0 circuitpython, I see a huzzah listed. Are they the same?
Could you add some a comment here about what the high bool means? it looks likethis is for blocks that are addressed downward, is that right?
Do these have to be inline or are you suggesting? If it's required, then we need to do the volatile asm(""); trick.
Supposer the allocation is not found. Wouldn't that be a fatal error of some kind?
@opaque thicket that wouldn't erase whatever version of CP was on there - is it actually showing 3.0? you can look in boot_out.txt
@tidal kiln - Thanks! Here's what I've got in boot_out:
Adafruit CircuitPython 3.0.0 on 2018-07-09; Adafruit ItsyBitsy M0 Express with samd21g18
I forgot to mention the re-upping of CircuitPython from the get-go - my bad
@opaque thicket no prob. was just curious if it actually did show up with 3.0. since 3.0 only recently came out, might not be on the shipped out trinket m0's yet.
not a problem upgrading - please do
@hollow snow you can run CircuitPython on a Huzzah ESP8266
the shipped files are here:
https://learn.adafruit.com/adafruit-trinket-m0-circuitpython-arduino/downloads
but as you can see - no 3.0 version (yet)
@solar whale yeah, I'm seeing I might can load the .bin for 3.0.0 with esptool. I'm looking into the commands to do so now.
^^ that
I'm so excited though. Yesterday I basically completed my first project. I went from a circuit express with criciket, down to a trinkit m0 strapped directly to the back of the moisture sensor. It now outputs a wetness value as well as makes a color between green and red per how wet it is. 0.o I know it isn't that big a project, but I'm excited. @solar whale @carter Thank you for the refrence.
@tidal kiln - Sure enough! Hot off the presses!
@hollow snow Good luck!
i am exploring the SamD21 via the Xplained Pro board + Atmel Start examples. I hope this ? is clear... when atmel defined a pin as: #define SW GPIO(GPIO_PORTA, 2) looking at the SamD21 datasheet (table 7-1 port function multiplexing) dies this map to PA01? And #define LED GPIO(GPIO_PORTB, 10) maps to io pin PB07? (I'm trying to get my bearings - thank you).
They're in decimal.
PA02 and PB10 in your code.
I got SAMD51 working in Atmel Start, just today. ;)
@timber mango thank you. i'm able to bully through atmel start examples using Atom + Makefile ... so i'm going for "dah gold" re: the Sleepwalking example. The challenge is i can't step through w/ the debugger on this one. So i'm bumbling through the lines of code...probably getting totally lost. re: the answer you gave PA02 for example...him...i thought the "2" mapped to the pin not the i/o pin...
That should make it clear because both of those pins in that file are for an Adafruit M4 board's D13 LED.
One's for Metro M4 Express and the other is for Feather M4 Express.
So you already know what those two pins are, and any mapping confusion can now go away, as this code .. works. ;)
@timber mango ...thanks much. I used to call your answer "#13"....it was my auto response to "it works for me" ๐
#define PA16 GPIO(GPIO_PORTA, 16)
#define PA23 GPIO(GPIO_PORTA, 23)
@timber mango ...yah, it's clear. Here I was...trying to read the datasheet. my bad!
I called one of those D12 just for fun. ;) Renamed it later.
You're very welcome.
ah...D12 maps to PA19....i seem to have memorized that one.
The schematic from Adafruit is the way to go, or variant.h in the Arduino IDE.
I don't know about the Xplained boards at all. ;)
Well Atmel Start also calls them out by (I think) their physical pin numbers, which I think are like 37 and something near 37. ;)
the Xplained board is just a SamD21 w/ and LED ...i'm trying it because i believe i'll have the best luck wading through the atmel start examples...i've had pretty good success.
Crickit (CPX variant) has some pins in the 30's as well (some match their PA/PB number and some have Arduino style D numbers) (I think)
@timber mango i truly appreciate your guidance. Thank you.
I'm only pushing for SAMD51 because I been at this too many years. SAMD21 is a great board!
You're welcome. Your quest for (not) power (low) power was interesting and something I'd always avoided in my projects.
@timber mango i'm still climbing a mountain...i think for you it is a very small hill..but for me...well, my legs (brain) hurts.
It's going to sink in when it does (and no sooner).
I have a lot more free brain cycles these days -- I'm adjusted to the challenges I guess.
Though I felt like quitting yesterday. ;)
I put in a very long stretch to get to the prize (it was the clock -- which was stopped entirely).
@timber mango congrats on your success.
hehe thanks. I was this close (holds fingers apart, but just barely) to going back to SAMD21 for the summer.
Check out that mr Read guy. blanking on his name.
Jake Read. He's got an MIT domain I think.
Hey guys - how do I hop out of bootloading mode on an itsybitsy m0?
I can double-click in, but I'm not sure how to pop out...
you can get out with a single reset press. but also, some of the actions you take while in bootloader will do an auto reset - like dragging over a firmware UF2
Does that process take time? Like more than a minute? I'm thinking I may've jumped the gun on the reset if, in dragging over a .uf2, I reset too quickly... 
should be more like seconds. not minutes.
Gotcha, thanks!
what were you trying to do?
lol - "trying" is the keyword: so you know how I've got CP 3.0? I'm wanting to move it back to 2.x so my copy of main.py will work. This is all so new, I wanted to bootstrap off main for my project.
I got into all this fix because I corrupted my original main.py file.
let me look at the main.py in that zip. it may be that it will work with 3.0 just fine.
Oh man - thanks! I was getting an error from the neopixel code, and I wasn't able to figure it out.
heyyy anyone know how to duplicate the contents of a flash chip?
like read and then save as a bin onto a computer
@tidal kiln also, could I get the REPL to display the same error(s) that the RGB status light is displaying?
Just want to make sure I'm not confusing my yellows and my oranges... :\
in general, yes. and the REPL will display much more readable errors
just tested the main.py from the zip file on that download page i linked above on a Trinket M0 running CP 3.0 - it works
lol - there's got to be a gap in my knowledge.
i'm thinking maybe you just don't have the libraries on the board, or the proper versions
but lets make sure the basics are working first
are you currently running CP 3.0 on the trinket?
CP3.0, but on the itsy bitsy
oops. sry. thought you had a trinket for some reason.
(I might've typed that - I've got one about 11 inches away...)
this will be much easier with the itsy, since it's an express board
can you get to the REPL ok?
Yep! Via putty serial
I just tried "import os, audioio"
And that worked fine.
Earlier this morning, I grabbed the std lib files and imported them.
did you grab the 3.0 version of the bundle from here?
https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases
The 3.x-mpy from 7-31?
yep
I just ran a fresh re-download and started copying the entire lib directory to the itsybitsy, just to make sure we're all on the same page.
yep. that's general process for express boards. more info here:
https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries
do you have an itsy m0 or m4?
An m0 - (just double-checked)
cool. the shipped files for those are here:
https://learn.adafruit.com/introducing-itsy-bitsy-m0/downloads
let me look at THAT main.py
@tidal kiln Thanks so much for your help!
Adafruit CircuitPython 3.0.0 on 2018-07-09; Adafruit ItsyBitsy M0 Express with samd21g18
>>> import itsy_main
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "itsy_main.py", line 18, in <module>
File "adafruit_hid/keyboard.py", line 36, in <module>
MemoryError: memory allocation failed, allocating 906 bytes
>>>
โน
Hey! To me, that's great! Means I didn't flub up too bad!
looks like it was a tight fit even with 2.x, that's why this is there on line 16:
gc.collect() # make some rooooom
Yeah - I saw that, and wasn't familiar with that library
That gives me a place to take it: I'm going to try ditching the adafruit_motor library and its references in main, and maybe that'll clear up enough room for me.
are you wanting to use that main.py as a reference to try and learn the various things it is doing?
At least, for the button presses and audio i/o.
it might be easier to start from scratch and work through the essentials guide:
https://learn.adafruit.com/circuitpython-essentials/circuitpython-essentials
I'm basically trying to future-fit a staples "Easy" button with some new sounds, and have the capacitive touch as an easter egg for a different array of sounds.
(e.g. Hit the button, and it chooses a sound-board sample by probability. Pop it open, and capacitive touch to hear probabilities for each sound almost like a diagnostic)
the essentials guide will hopefully help you with the basic pieces, like button presses (which are digital in) and audio
Oh awesome!
and then you can incorporate the pieces into the larger project
Cool. @tidal kiln: I really appreciate the help - thank you!
i think it would be a mess to try and work backwards from that main.py that ships on the board
@opaque thicket no prob. good luck. if you have questions as you work through the essentials guide - just come back and ask here.
Awesome - thanks!
So how can I see the plain-english python errors in my main.py?
Oh no... I corrupted main.py again.
@opaque thicket just saw your earlier post. Congratulations on the new baby! Looks like you have gotten the help you need! Good luck!
@solar whale Thanks so much! It's super-exciting!
@opaque thicket I'll bet it is --- I have a new grandchild and that is super exciting as well!
Oh man - that's got to be bananas! How old?
anybody know how to delete a corrupt main.py file from an itsybitsy m0?
I'm running with the following bootloader details:
UF2 Bootloader v1.23.1-adafruit.2 SFHR
Model: ItsyBitsy M0 Express
Board-ID: SAMD21G18A-ItsyBitsy-v0
and tried the following in the REPL
import storage
storage.erase_filesystem()
I think it is storage.erasefilesystem() no _
nevermind -- you had it right -- it did not work?
Said it didn't have that attribute.
what version of CircuitPython?
I ran dir(storage), and I've got name mount, umount, remount and vfsfat
I reverted to 2.x - I pulled the original files off another itsybitsy I've got
must be an old version -- load CP3.0.0 then try again.
so I re-loaded the original uf2 file
is it an old 2.x or the current release?
the one taht came with the board is probably too old.
erase_filesystem was added recently
If you want to revert to 2.x get the most current release -- it should have erase_filesystem as well.
@solar whale cool, thanks!
saw a couple of typos in usb hid. However, I didn't have samd board to test with, please double check to make sure this doesn't break anything.
@tulip sleet make a PR for typo here https://github.com/adafruit/circuitpython/pull/1076 . Btw, I think the nrf52840_usbboot and nrf52 branch are safe to delete now. Not a big deal, but it is kind of annoying with obsolete branches ๐
FYI - I pulled this PR and built an image for the pca10056 board. It seems ok for basic operation - I was able to mount an AD Card (SPI ) and run a BLE scan.
Note: the BLE scan only shows one record, but I think this is something that @arturo182 is aware of and already has a fix for.
I have not tried any of the HID functions.
I did try mounting/unmounting CIRCUITPY a few times - no errors ...yet!
@jerryneedell you could try hid mouse, it is easiest thing to test with
https://circuitpython.readthedocs.io/projects/hid/en/latest/index.html
copy adafruit_hid from bundle to lib/ folder
from adafruit_hid.mouse import Mouse
m = Mouse()
# Click the left mouse button.
m.click(Mouse.LEFT_BUTTON)
# Move the mouse diagonally to the upper left.
m.move(-100, -100, 0)
@hathach I tried it and it works!!
@hathach I tried the same test ```
from adafruit_hid.mouse import Mouse
m = Mouse()
Click the left mouse button.
m.click(Mouse.LEFT_BUTTON)
Move the mouse diagonally to the upper left.
m.move(-100, -100, 0)
on a feather m4 express with this PR and it also works.
It looks like the changes deal with the KEYBOARD, so this mouse test may not have been very meaningful.
@jerryneedell the extern with usb_hid_devices could be confusing as well. Some files may not linked to the correct implementations. Your test with mouse is also meaningful.
@hathach also tried this and it works
>>> from adafruit_hid.keyboard import Keyboard
>>> from adafruit_hid.keycode import Keycode
>>> kbd =Keyboard()
>>> kbd.send(Keycode.A)
>>> a
>>> kbd.send(Keycode.SHIFT,Keycode.A)
>>> A
@gentle bronze That's all I have time to test tonight -- looks good so far!! Good Night (morning)
@solar whale thanks a lot for late testing. Good Night (Morning) ๐
@idle owl @gusty kiln finally carving out some time to run the adabot patches, so pylint 2.0 related buggaboos shouldn't affect any future travis builds. ๐ค looks like the ones you did today avoided it, but it will eventually pop up during pypi work...
NOTE: please don't merge this yet since I haven't tested on the chip
@jerryneedell it compiles but I don't know how to test it, if you could tell me, I will verify and update the PR
@gentle bronze I'll delete those branches
hmm...looks like adabot is only running one of the patches. waiting for it to finish so i can read [possible] error report... ๐ฐ
no errors reported. that's my favorite kind of debug... ๐
@gentle bronze tnx for looking at the bootloader. One of my pca10056 boards is not lighting any LEDs when I plug it into the nrf USB (not the jlink port). The switches all seem to be in the right position. the jlink port lights one led near the jlink cpu. Not sure if the board is fried or the nrf52 is crashing
@tulip sleet seems like an power module issue. Sometime I got it as well, did you try to pull off all the plug. Switch the power sw around. Then plug it again.
yes, the power switch seems flaky sometimes. i'll try that. new build works, thanks!
You're welcome, I shouldn't let it not buildable ๐
@gentle bronze can i install the bootloader via the jlink port easily?
@hathach the issue was when doing an "ampy get" to a feather52832 .
@gentle bronze got bootloader on both boards, so the bad one revived. Is the bootloader protected ? (atmel chips have BOOTPROT fuses)
@jerryneedell just tested, seems to work with pca10056 board (too lazy to pull out feather52832 now :D )
ampy -p /dev/ttyACM1 get test.txt test.txt
I saw the text.txt is copied to my local disk.
@solar whale did you get the nrf PR to test from Amazon AWS or did you built it from scratch?
Built from scratch. Pulled pr into master
got it, tnx
๐ค
github api limit reached...time for some refactoring!
also, caused a lot of Travis failures on libraries since the pylint patch didn't take. i'll get 'em straightened out...even if i have to hand jam it! ๐
@tulip sleet bootloader only prevent flashing on it, e.g the uf2 block's address within bootloader's range will be skipped. It doesn't have any hw protection now. I have no idea if Nordic have something similar. you could try to talk with a Nordic contact for this. If it has a way, I am happy to add it in.
You can use mp_raise_OSError("USB Busy") here and similarly elsewhere. Easier to read and saves a few bytes.
Trivial, but make these lowercase y. CircuitPy instead of CircuitPY.
Use curly braces on all ifs, even one-line ones. Thanks. We're trying to keep to that style.
mp_raise_OSError takes int parameter, since usb does have its error enu, what should be the value for these in the list
https://github.com/adafruit/circuitpython/blob/master/py/mperrno.h
You're right, never mind, I forgot that it takes only an integer arg.
OK, nrf52 still got plenty of space left anyway :D
nice work, thach! i hope to get back to testing nrf52840 again soon!
@dhalbert list of enabled hid devices is here, just in case you wan to disable any of these.
@dhalbert thanks, I tried to get all the ugly part inside the tinyusb stack itself :D
error: patch failed: .travis.yml:23
error: .travis.yml: patch does not apply
hmm...not a super helpful error (masked as a skip in my script). this might have wait until the morning. vacation is tiring. ๐
@ladyada hopefully you won't find out too many bugs :D
@gentle bronze I am just waiting for travis and then will merge (and then go to sleep).
@tulip sleet thanks, travis takes forever to build ๐
@tulip sleet good night
what is your system?
I noticed that in the current master SysTick_Handler is not being called anymore, is that intentional?
@raven canopy We would have hit a 2.0.0 issue with one of the PyPi libs except Dan put in a PR first and hit it. So he fixed it manually.
@raven canopy Thank you so much for getting there patches going!
@stuck elbow @tulip sleet ok, so I wrote up a cookbook to minimize a CP build and reallocate to the flash drive, in case others want to do this sort of thing. Here. https://forums.adafruit.com/viewtopic.php?f=60&t=139005&p=687417#p687417
Also, it turns out I was totally confused yesterday about the flash drive sticking around after reflashing, it turned out I was in fact using my feather m0 express, which was buried in the bowels of an art project I had thought used a trinket. Which makes sense because it's SPI flash. Reflashing the trinket zeroes your flash drive too, as would be expected. Sorry.
No apologies needed ๐ It's easy to get confused, there's a lot to all of this.
๐
There's one minor hitch to the library removal hacking, in that there are references in places like timers.c that need to be commented out. I assume this kind of hacking is an edge case that doesn't need to be accommodated, but some code decoupling would help, like modules register shared timer handlers. Might try a hack at that. There were a few other things I commented out I can't recall. Probably should do a git diff
@gusty kiln Ping me when you're around, I have a question for you.
@idle owl yo - i'm waiting on a tow truck, so may disappear again, but here at the moment.
@gusty kiln Are you checking Travis after I do the release? I guess I never finished reading through the instructions until this morning and realised I am not checking travis following the release to make sure it still builds
Also, ๐ฆ to the tow truck.
@idle owl - yeah, everything that i've approved/merged so far looks good.
ok rad
a convenient shorthand is whether the release stuff gets pushed back to github.
(one reason i do like using a branch on the adafruit repo instead of a fork is that travis runs against those branches, so you can see whether something passed there before a merge and release.)
oh yeah - totally correct.
@slender iron Sphinx is failing on AMG88xx. I'm getting this error, but everywhere I know to look, the busdevice requirement is correct. 2614 kattni@robocrepe:amg88xx (venv3) [6w master *%= 47a9dac]$ sphinx-build docs/ ~/sphinx-doc-builds Running Sphinx v1.7.4 loading pickled environment... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 0 source files that are out of date updating environment: 0 added, 1 changed, 0 removed reading sources... [100%] api WARNING: autodoc: failed to import module 'adafruit_amg88xx'; the following exception was raised: No module named 'adafruit_bus_device'
speaking of travis, i'm still needing to debug this - https://travis-ci.org/adafruit/Adafruit_CircuitPython_BMP280/jobs/410493659#L622
Odd...
i'm thinking it might be the github token?
That seems possible. Though... hmm let me check something
Just glancing at another one: Logged in as Adabot
yeah, that's what i'm wondering. someone need to add an adabot api token there instead of tony's?
ones that are doing releases? i think you're only going to see that if it's a build that pushes release artifacts back to the github api.
(one that runs on a tag, that is.)
Oh right ok
I was just randomly checking them
Interesting that I found one that had a login on the first try then
@gusty kiln Found another one: Logged in as Dan Halbert
So maybe that's not it.
Unless, we changed what perms or whatever are needed and Tony doesn't have that.
And the rest of us do because we've been setting these things up
we should change them to adabot
Fair enough
@idle owl you need to install the packages from requirements.txt to run spinx now
Oh. ok...
Oh! So run the python3 setup.py install and then run sphinx? Because it worked. Or I assume that's what made it work, I used a venv to test the install on the previous libs, I hadn't done it yet for this one.
@gusty kiln PR in for amg88xx
thx
@umbral dagger heya going thru the glider guide
at your convenience can you take a short video/gif showing the wings deploy/releasing when you press A and B
@gusty kiln Just found out that travis won't encrypt right if you don't have a remote that uses https. I deleted origin on this one, and I use SSH for my GitHub stuff, so without origin there were only two remotes with SSH, no https. Readded origin with https and it works.
@idle owl weird and good to know. i don't think i've run into that one, wonder if it's platform-specific somehow.
@gusty kiln I got this error when I tried to run it: 2661 kattni@robocrepe:bno055 (venvpypi) [3w master 5fa25f1]$ travis encrypt --add deploy.password Can't figure out GitHub repo name. Ensure you're in the repo directory, or specify the repo name via the -r option (e.g. travis <command> -r <owner>/<repo>)
This is the first time I've ever dealt with libs through the bundle. So I'm adding adafruit and kattni remotes to to them as I go to stick with my known workflow. My commandline has git magic in it which was thinking I was 1 commit ahead of origin, so it wasn't showing = with master. So I deleted origin. And then tried to run travis and got that.
Is there a handy reference chart for the system clocks symbol set (SAMD51) or is the datasheet 'it'?
CMSIS figures here, rather than ASF4.
I'm in atmel start https://start.atmel.com/ projects, lately and clock configuration is no longer something I can avoid. bare metal programming is like that.
it might just be assuming that origin is always going to be github
wouldn't be the first time i've run into that kind of thing
Could be. Hadn't thought of that. Should add origin as SSH to the next one. Would answer that.
@gusty kiln Thank you for suggesting the venv for testing the pypi setup.py install. That would have gotten entirely out of hand without it.
@gusty kiln Do you want me to let you know when I put in a PR? Or do you get the emails and that's enough? I don't want to be annoying and I realise multiple notifications can be.
i'll just keep an eye on notifications
Ok keen
@gusty kiln Yeah it wants origin, has nothing to do with SSH. Guess it's a good thing you guys talked me into doing it through the bundle, or I'd have to add origin too every time. ๐
ha, good point
awright, tow guys showed up, i've got to run this van over to a shop. back online in an hour or so probably.
Ok, good luck with it!
@umbral dagger - there is another issue with the MakeCode in the Sugar Glider guide, sorry, note on Basecamp
@slender iron Some of the requirements.txtstill have old bus-device in them, and some have a >=x.x.x. I've been changing them to adafruit-circuitpython-busdevice. Is that correct? Or are they still supposed to have the version requirement with them?
yup that sounds good. thanks!
Ok making sure because I've already done it multiple times and didn't want to get too far into this doing it wrong ๐
Thank you
What triggers the messages:
"File "code.py", line 18, in <module>
KeyboardInterrupt:
soft reboot
It's telling you that's the last thing it was doing before it reloaded. In that case, looking at line 18 in code.py.
Ok, so it doesn't mean I hit any kind of an error. Thanks!!!!
@red dock It'll say some kind of error if there is an error. Errors look similar except the line it gives you right before the error is where it failed. So it would look like what you pasted except it would have something like TypeError or SyntaxError after it.
But if there's no error, then it's simply information.
@red dock do you see that when you hit control-c to stop code.py? Contol-C will cause a "KeyboardInterrupt" That is normal.
Oh, that's good to know too.
New question, is there a library of built in functions.
I'm writing a PWM segment, and I started to type in duty cycle, and it suggested duty_cycle. So, I take it that's a built in function, so how do I use it, but more importantly is there a library of built in functions so I can see what's available?
at the REPL type help('modules') -- also try import builtins dir(builtins)
@red dock you may also find this useful http://circuitpython.readthedocs.io/en/3.x/shared-bindings/index.html
@solar whale , That's the money!!!
@gusty kiln I don't think it runs on the PRs, looking at it again. Maybe it doesn't run when you alter travis.yml. I check Sphinx locally, do the sdist and install, so maybe that's enough to keep it happy. If not, let me know if you need me to do anything after the release is created. CharLCD build was already failing on the examples - I think it's from the updated pylint. Pylint passes locally for me on CharLCD, so I added the pylint force fix to that specific travis.yml, hopefully it builds fine once you merge it.
@slender iron sys is built into CP right?
ya
ya
kthx again
@slender iron where is neopixel_write?
builtin
kthx
@idle owl I am working on my long overdue tmp007 driver -- Scott mad a "template" for it a few monts ago and I did a "cookie-cutter" init of my local files. With all the "Travis" stuff you have been doing, is any or all of that obsolete.Should I start the "cookie-cutter" over ? Or does none of that matter.
@solar whale CoC for sure has been updated. Might be worth doing cookiecutter again simply to be sure.
OK - no problem -- clean start!
@slender iron There was a requirements.txt with circuitpython-travis-build-tools in it. I removed it. Was I supposed to replace it with Adafruit-Blinka?
fwiw i didn't do a deep dive on module code to see what it's actually using, but i assume it should mirror requirements in setup.py.
The way Scott explained it the other day is that setup.py is for PyPi and requirements.txt is for Sphinx etc.
I think anyway
So it didn't need Blinka in it. Again, I think.
Waiting on confirmation though. Because I'm second guessing it now.
i think travis is also relying on requirements.txt
Also, jumped out of alphabetical because the CircuitPlayground lib needs a bunch of other libs. Not entirely sure how the cpx lib would really work on PyPi anyway since it's meant for the microcontroller itself not anything external, but adding it anyway. And didn't want to PR it until it's dependencies are in.
hmm. If that's the case then I need to go back and fix all the previous ones too, I think
I left them alone if they had what I thought was the right stuff in req.txt
i almost typed "jenkins" instead of "travis", so i'm clearly having a great deal of clarity today.
oh definitely. well, definitely some evil involved, anyway, re: jenkins. brb, switching buses.
Travis has no friends ๐
This is what I'm remembering. From yesterday, Scott said: "requirements.txt is used for development and RTD. setup.py is for pip"
I thought Blinka was specific to pip stuff.
will pylint grouse if dependencies are missing?
Pylint... no, I don't think so. Sphinx yes.
leave build tools alone its not a library
Leave it in requirements.txt?
not for a library. it should be installed explicitly by travis
right, that's what I thought. I left it alone in .travis.yml I removed it from a requirements.txt file.
And does Adafruit-Blinka need to be in requirements.txt?
when trying to load the make it sound circuitpython code where both buttons do a wav file on my circuit playground express, one of the neopixel lights on my board slowly flashes on and off. i tried saving it with mu, no dice.
anyone?
@acoustic pollen There's a live stream going on at the moment, many who are around are occupied. As well, it's sometimes quieter in the evenings. You can ask your question and someone will get to it as soon as they are available. You're in the right channel though.
tried to move the code down one line, no dice
also removed the cpx from play file, no dice either
this .travis.yml patch refuses to give up the ๐ป. pylint change is going to end up a hand-jam job. ๐ฆ
@raven canopy I've added it to a couple.
Make sure you're checking the open PRs though because I'm concurrently doing the PyPi stuff and that involves .travis.yml.
I added it to a couple that had failing builds for examples that hadn't been updated in an attempt to get it to build once the PyPi stuff was released. But I messed up with the doc stuff on some of them, had to put in a bunch more PRs to update requirements.txt ๐
sorry to derail, but anything wrong with the code i'm using on my circuit playground express? did any of the edits i mentioned break it?
@idle owl i can't get the patch files to take, for some reason. i've the diffs down to a bare minimum, and still won't take. this is all local work, so PRs/activity aren't an issue. oh well...its' only like 60 repos. ๐
@acoustic pollen It looks right. Do you have the file on the board?
@raven canopy I know. I'm going through all of them for the PyPi stuff ๐
does the file have to be less than 256kbps bitrate?
"PCM 16-bit Mono WAV files at 22KHz sample rate" from a guide on converting audio for using with our microcontrollers
"CircuitPython supports mono or stereo, at 22 KHz sample rate (or less) and 16-bit WAV format."
And it has to fit on the board, which you already covered because it's there.
The Circuit Playground Express supports mono.
i made it mono, less than the sample rate and 16 bit wav in audacity
Particularly when they have buffers that are written via IRQ or DMA, UART objects do not relocate gracefully. If such an object is relocated to the long-lived pool after its original creation, the IRQ or DMA will write to an unexpected location within the Python heap, leading to a variety of symptoms. The most frequent symptom is inability to read from the UART.
Consider the particular case of atmel-samd: usart_uart_obj_t contains a usart_async_descriptor contains a _usart_async_device. ...
Testing performed: 10 iterations of my "badecho" test with no failures.
hmm...got it to patch, but had to use some funky flags. not sure how/if i'd get that into adabot.
but, all this definitely highlights a failure in the patch checking code. ๐ฆ
if its possible for makecode to play wav files i could just skip having to use circuitpython all together
do i need to delete everything but what adafruit shows to keep?
of course that doesn't work, why would it
this green led is my mortal enemy
im literally using a microusb cable that works great for my game controller
what am i even doing wrong? is it the plugging into the pc that's causing it?
yes
also by magic i somehow got it to not flash the green led
literally copied the EXACT same code and renamed my wav and it still doesn't work
either something's wrong on the firmware side (had to re-install it after trying a makecode) or im just the biggest dummy
I actually prepared this PR against 3.x and think it should be considered to go in 3.x. Should I close this and open a fresh one to merge into 3.x, or do I need PRs for each branch? I.e., are you merging 3.x up into master?
Since last week I haven't succeeded in reproducing this. Since (surprisingly to me!) something about this problem was surviving the use of the physical reset button (but not true power cycles), I wonder if it was somehow due to #1056 making the board unstable. I don't think there's any reason to keep this issue open.
doesnt really help that double pressing reset doesnt show a drive anymore
its been over 2 hours and a half and i still cant play a wav file
a wav file
is there a difference between an adafruit-bought cpe and a micro center bought cpe
@acoustic pollen is the problem that you can't get the wav files from the guide to play? or that you can't get a wav file you created to play?
you were trying this?
https://learn.adafruit.com/make-it-sound/music-and-sound-in-makecode-2
yes
ok. let's go back to that. i just ran through it and it worked for me.
what version of CP are you currently running on the CPX?
3.0.0 i think
have you tried connecting to REPL yet?
yes
excellent. it prints the version there in the banner text on connecting.
like this:
Adafruit CircuitPython 3.0.0 on 2018-07-09; Adafruit CircuitPlayground Express with samd21g18
>>>
got that exact message
how did you copy the libraries over to the board?
yep. the lib folder. lets push over another copy just so we know where it's at also, version wise
download the zip from here:
https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/latest
get the 3.x one
@acoustic pollen let me know when you've got the most recent libs copied over
however you want. just as long as you get to the REPL prompt.
got there
got the banner text and the >>>?
yep
cool. let's see if basic tones work. try the following commands...
from adafruit_circuitplayground.express import cpx
cpx.play_tone(400, 1)
you should hear a 1 second tone
express object has no attribute playtone
wait no i did it wrong
i forgot the _
ok it worked
great. so nothing is wrong with the hardware.
did you already copy those wav files from the guide over?
yeah, and doing from console worked
ok. so try:
cpx.play_file("laugh.wav")
yeah. so was it more complex code that wasn't working?
i think it has something to do with the whiletrue code
i have
while True:
if cpx.button_a:
but it doesnt trigger on a button pressed, do i need to change something in the code?
@tannewt and I talked about fixing this in a different way, which involves not making things in some global dict long-lived. I have to take more of a look to figure out which dict it is.
In general, significant bug fixes should be done against 3.x, because we want them fixed there. It's a lot easier to merge from 3.x to master than vice versa.
you're running this?
from adafruit_circuitplayground.express import cpx
while True:
if cpx.button_a:
cpx.play_file("rimshot.wav")
if cpx.button_b:
cpx.play_file("laugh.wav")
yes
should work. we can test buttons in REPL also
don't press any buttons and type:
cpx.button_a
what do you get?
False
now hold down button A and run the command again
true
so the button is working
but that code doesn't play the wav(s) when press the button(s)?
yes
yes it doesn't?
yeah it doesnt
try running this and see if you see the prints:
from adafruit_circuitplayground.express import cpx
while True:
if cpx.button_a:
print("rimshot.wav")
if cpx.button_b:
print("laugh.wav")
when you press the buttons
nothing
are you using mu?
yes
what name are you saving the file to?
does the REPL restart after the save?
yes
and then it's just blank? not printing anything?
by repl restart did you mean it opens again?
it shows me the press any key to open console and i can input commands
right. so it closes the REPL window down on save. and then you have to open it back up again.
ok. i think this is just a matter of navigating the software right.
nothing is wrong with the hardware
so we can just figure out what's missing on the software side
good luck when you get a chance to continue
I believe its dict_main that we shouldn't recurse to: https://github.com/adafruit/circuitpython/blob/master/py/mpstate.h#L158
Looks to save 15 seconds or so. The compiler catches when this fails because the QSTR is missing when it does.
The idea is to either check for special dicts that should not be recursed over in make_dict_long_lived() in py/gc_long_lived.c or set the .scanning bit in mp_map_t (py/obj.h) permanently. Probably rename it to something like do_not_walk or do_not_move or something like that.
Could you just put in a comment saying the SRC_QSTR_PP files are files that generate QSTRs via a preprocessor macor, or rename it to SRC_QSTR_FROM_PREPROCESSOR or something like that?
OK, I see the comment here, but maybe rename it to SRC_QSTR_PREPROCESSOR or SRC_QSTR_CPP.
@tulip sleet I must have been dozing.. I see there is now an esp32 folder under ports in the master repo. Is that just a placeholder for future work or should it actually build if the directions are followed?
That came in from the micropython upstream merge, and is like the other micropython-only directories that are in ports that we don't use at all.
@tulip sleet FYI -- I am curious about how the discussion on https://forums.adafruit.com/viewtopic.php?f=63&t=139056&p=687623#p687623 will go. I raised this a few weeks ago -- apparently I'm not thonly one confused by it...
like stm32, etc. It might build, but not necessarily.
Thanks -- no problem -- I have built the esp32 under micropython, and it would be nice, but not necessary to build it here. I'll give it a shot. lloks like I need ot update my SDK anyway. Just wanted to make sure I had not missed some breaking news ๐
it will probably not build, because we've changed some of the api's it would call
@solar whale re that forum post. I just set up an I2C connection on RX/TX on a Metro M4, and it works fine with an SHT31
so like we said, I think the datasheet is wrong.
and it works fine on SDA/SCL
on Metro M4 they are PB02/PB03, no?
oh, you're right, i was looking on the m0 express
that is what triggered the confusion -- but since it works on PA11/12 then the list is not very useful!
on m4 rx/tx is PA23, PA22, which is in the list, so my example isn't good, but the SCL/SDA pins are a great counterexample!
Some of those proposed changes might make my original badecho script work because they would change when badecho.uart was considered for becoming long-lived, but never prevent it entirely. There would still be some other reproducer script that would simply move the uart to a place which is made long-lived.
For instance, globals of any imported module are made long-lived, so if the unintentional way that uart is made long-lived at the end of the class definition in the same file is...
@tulip sleet thanks for weighing in...
Particularly when they have buffers that are written via IRQ or DMA, UART objects do not relocate gracefully. If such an object is relocated to the long-lived pool after its original creation, the IRQ or DMA will write to an unexpected location within the Python heap, leading to a variety of symptoms. The most frequent symptom is inability to read from the UART.
Consider the particular case of atmel-samd: usart_uart_obj_t contains a usart_async_descriptor contains a _usart_async_device. ...
Version 2
- Moved from busio to new module i2cslave
- Add code example to the docs
- Add warning in docs about Raspberry Pi needing the i2c-gpio driver and that a HAT eeprom can't be emulated.
Two things I didn't know where to put:
I2CSlaveRequest has 3 readonly properties: address, is_read and is_restart. I've implemented these using property getters.
If there's no simpler way of doing this, maybe this macro I made should go into a headerfile somewhere:
#define MP_DEFI...
I went ahead and opened #1080 to pull this in to 3.x instead, and get it in master by merge-up.
@jepler That's a good point. @tannewt I think forcing them to be long-lived is fine. We could really use a "do not relocate" flag, but implementing something like that would probably only come about if we started working on a compacting gc.
I ran into a documentation bug for freezing modules you may want to note. If you attempt to add a git module to the frozen directory for a project that doesn't have a tag (or releases), you will get a compilation error:
FREEZE ../../frozen/CircuitPython_NeoSprite
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
Traceback (most recent call last):
File "../../tools/preprocess_frozen_modules.py", line 14, in version_string
tag = subprocess.check_output('git describe --tags --exact-match', shell=True, cwd=path)
File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
**kwargs).stdout
File "/usr/lib/python3.5/subprocess.py", line 708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'git describe --tags --exact-match' returned non-zero exit status 128
it's caused by git describe failing
solution: add a release.
(to GitHub). Problem solved
Docs I referenced are here: https://learn.adafruit.com/building-circuitpython/adding-frozen-modules
@sharp rain Thanks, yes, I've run across this, and it always meant I'd forgotten to make a release ๐ But it should probably be a warning, not an error, since you might be freezing your own code that doesn't have a release or isn't even in git.
Feel free to add an issue.
yeah, burned about an hour
if the frozen directory isn't in git it seems to behave better as the git describe function will find the circuitpython info, so it's really an edge case of a git tracked repo that hasn't been released.
I followed the directions to freeze one of my modules that I tracked in git using the instructions here:
https://learn.adafruit.com/building-circuitpython/adding-frozen-modules
Build fails:
FREEZE ../../frozen/CircuitPython_NeoSprite
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
Traceback (most recent call last):
File "../../tools/preprocess_frozen_modules.py", line 14, in version_string
tag = subprocess.check_output('git...
anyone have the default example main.py for circuit playground express?
i know wav sounds worked there as well as buttons
for some reason the cplayboot drive doesnt show up anymore either
tried using the audio code on here, still no dice https://learn.adafruit.com/adafruit-circuit-playground-express?view=all#downloads
Make faster and easier than ever with MakeCode, code.org CSD, CircuitPython or Arduino!
is there any way to install firmware without going to cplayboot?
@tidal kiln nice job finding the cause of that SDA/SCL issue on the feather m4 -- I was following it and really puzzled
๐ a good example of why we always ask for "the complete text you are getting"
@solar whale and thanks
i cant get to the cplayboot drive in windows after installing circuitpython 3.0 on my circuit playground express
@acoustic pollen keep trying with the double press of reset. sometimes the timing can be tricky. you should be able to get into bootloader and see CPLAYBOOT regardless of what firmware you installed
i have the all green lights, it just disconnects on windows but doesnt reconnect anymore
do i need to put in a battery, disconnect the cplay from my pc and then replug?
@acoustic pollen i wonder if you are running into this issue?
https://forums.adafruit.com/viewtopic.php?f=58&t=138649#p685788
so you were able to get CPLAYBOOT to show up again?
yes
cool. so you have no problem getting back to bootloader mode.
"no dice" = what? what are you trying to do that's not working?
i copied the code exactly and i still get a slowly flashing green led
here's the decoder ring for that flashing green led:
https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#circuitpython-rgb-status-light-18-9
what is the code you are trying to copy?
i know what it means, it exists so what does it mean by finished? do i need to loop something?
copying the last code on here
ok. gotcha. so continuing from same place as last night.
you were working in mu, right?
lets stick with mu and see if we can get that to work