#circuitpython-dev

1 messages Β· Page 207 of 1

marble hornet
#

thank you

#

and when frozen into cp do they need to be loaded into ram?

#

still

raven canopy
#

when frozen in, they're already in the RAM with the firmware. as i understand it...

marble hornet
#

???

#

what do you mean. ooooooh nm

#

got it, it think

#

thank you all for the help tonight

#

😁

tulip sleet
#

@marble hornet, unlike regular .mpy's they are executed directly from flash, which is possible because they are in the same address space as the RAM. Regular .mpy's have to be loaded from a file into RAM.

raven canopy
#

one of these days, i'll be able to explain it correctly like that. πŸ˜„

marble hornet
#

kinda like how on the commodore c64 the video ram was in the same adress space as normal ram even though it was used for another function?

#

just flash and ram in this case ?

tulip sleet
#

right, in this case it's a mix of read-only and read-write. You can run programs or read data from either.

#

nrf has the slightly unusual restriction that DMA source must be RAM. SAMD chips don't have that restriction.

marble hornet
#

neat!

#

not the nrf thing but, does samd cp code move the flash ?

#

or does it keep it in ram for ease

tulip sleet
#

on AVR chips, the RAM is not in the same address space, so there's a special way to read data from flash

#

not sure I understand your question

marble hornet
#

can i ask, and at this point i'm just curious, where does ram address 0 exist? when i was flashing the bootloader to the d51 i told it to go address 0x0000 but it did work if ram at the end?

#

ah, i'm asking: does atmel cp implement the dma from flash ?

tulip sleet
#

adress 0 is in the flash address space (where the bootloader starts). RAM starts at 0x20000000

#

we don't DMA much from flash, since it's usually user data, but we don't have to worry about it

#

This is explained in the "Memories" chapter in the datasheets

manic glacierBOT
tough flax
#

@tulip sleet I figured that out. I had stupidly declared A0 as the name of my variable that held the digitalio object. When I tried to replicate it I didn’t remember doing it and none of the other pin names worked (of course)

#

Oh well. I tried πŸ˜ƒ

errant veldt
#

@slender iron @tidal kiln @sly wagon thanks for all your help over the past while on this project. My boy was so stoked that his vision was realized for halloween and is even more excited to learn more hacking skills in the future.

#

on another note. I've got another cpx here that I can see it grab COM8 when I plug it in, but it does not show up as a drive and bossa says it is unsupported. Any thoughts on how I can resurrect it?

slender iron
#

@errant veldt are you double tapping to get into the bootloader?

errant veldt
#

single tap. neopix are green and I have the flashing light.

#

I can somehow manage to download makecode sketches onto the thing, but can't get it to load as cplayboot like my other one

ashen lily
#

@slender iron thanks!

slender iron
#

@errant veldt did you restart your computer? sometimes the usb stack gets unhappy

errant veldt
#

@slender iron lol I never think of doing that....

#

I will try and see about that tomorrow. thanks again for all your help on this. btw crickit rocks

slender iron
#

np, glad you got it going!

errant veldt
exotic pumice
#

I have an interesting symptom I'd like to run by you guys

#

when I run spi.write() to the neopixel, initially it does nothing, but if I then run spi.deinit(), the neopixel turns on. Why would this be?

cedar beacon
#

On mac, my boards only showup as a mountable drive on the Desktop, not in Finder, and sometimes not at all. Do I need to configure my Mac to behave differently?

manic glacierBOT
marble hornet
#

how can one write to a txt file that's on the cp drive? i looked for .txt and log and other permutations on the docs or if there is another way to write to a log file that anyone knows of? thank you for any kind of help!

solar whale
tidal kiln
upbeat plover
#

@marble hornet i have some examples of Logging to feather M4, where it just adds to a text file.
i was actaully working on open() lastnight im doing something with NVM and the FLASH using NVM to save the names of files that have been saved to, its going to be a higher end lib

marble hornet
#

@tidal kiln thnx @upbeat plover what d

upbeat plover
marble hornet
#

Thanks

upbeat plover
#

wow that wasnt a very good file to share, like not very many comments, and some of them are just wrong.... like "write to SD card" is "write toFLASH"

manic glacierBOT
upbeat plover
#

@marble hornet comments fixed, no real reason i used two power pins on the si7021, I just plugged it into the stacking headers and didnt want the 5v in being pulled down or something

manic glacierBOT
lethal abyss
#

I have found some time to play agai, with my CP express and this time whit a Crickit. so happy.
I have a question: if I don't name my file code.py or main.py, how can I launch it? from the REPL?

upbeat plover
#

import main

#

or

#

import code

lethal abyss
#

so if I have a touch.py file, I do import touch

#

that's what I feared, I have something wrong :
RuntimeError: SDA or SCL needs a pull up

tidal kiln
#

you can use import like that if you want, but keep in mind it has some quirks. for example, to run it again you would need to do a software reset <CTRL>-<D>

#

and you don't have access to things as if you had typed them in via REPL

#
>>> import foo
42
>>> bar
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'bar' is not defined
>>> foo.bar
42
>>> 
#

for the I2C error - you need to attach something to the I2C bus

lethal abyss
#

I only have the CP fixed on the crickit. it happend when I tried to read touch pad values

#

then I plugged a servo and same happend when setting angle

tidal kiln
#

the CPX/Crickit are attached with the metal screws and stand offs?

lethal abyss
#

yes

#

I'm reading something on the forum that occured when upgrading to 3.0.3

tidal kiln
#

can you paste the contents of your CIRCUITPY/boot_out.txt file here?

lethal abyss
#

Adafruit CircuitPython 3.0.3 on 2018-10-10; Adafruit CircuitPlayground Express with Crickit libraries with samd21g18

tidal kiln
#

ok. that's all good. it sounds like you have access to the REPL, correct?

lethal abyss
#

yes

tidal kiln
#

do a <CTRL>-<D> to soft reboot and get back to >>>

lethal abyss
#

no problem

#

Adafruit CircuitPython 3.0.3 on 2018-10-10; Adafruit CircuitPlayground Express with Crickit libraries with samd21g18

print("hello")
hello

tidal kiln
#

now try:

from adafruit_crickit import crickit
lethal abyss
#

the simple import of the crickit lib fails

#

from adafruit_crickit import crickit
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adafruit_crickit.py", line 373, in <module>
RuntimeError: SDA or SCL needs a pull up

tidal kiln
#

ah

#

can you post a photo of the CPX/Crickit?

lethal abyss
tidal kiln
#

you need to power the crickit

upbeat plover
#

it looks powered

tidal kiln
#

thats on the CPX

pastel panther
#

@slender iron is there a cap on mass storage size for CP?

slender iron
#

not that I know of

lethal abyss
#

whithout anything plugged, I need to power the crickit? ok, it looks like I missed that on the tour guide

#

this is pretty clear, one page about powering πŸ˜ƒ

tidal kiln
#

the crickit can power the CPX, but the CPX can't power the crickit

fluid helm
#

Ah, I use the seesaw USB

#

it seems to work

lethal abyss
#

I was too confident with all the things I've done with electronics, I was faulty on this one πŸ‘Ό

#

I now have a nice 3.3V on SDA and SDL

#

everything now works smoothly

tidal kiln
#

sweet!

#

@errant veldt awesome pumpkin! that's great you got it all working.

lethal abyss
#

thanks for the help, now I can start to gather a small video in french for kids in my little workshop organization

pastel panther
#

@slender iron strange; Perhaps I missed something but I'm only seeing 8MB when I should see 16ish

#

I double checked the device.h entry (previously was wrong)

slender iron
#

hrm

#

8 is the highest we've done

pastel panther
#

🀷 I'm sure you can figure it out if/when you need the space

#

should/can I do a PR for the board?

slender iron
#

there is a FAT12 -> FAT16 boundary we may need to enable something for

#

ya!

pastel panther
#

okie dokie, coming up

#

PRs track commits? so I have have a second PR if I have one outstanding on my fork?

tulip sleet
#

I was recently looking at the code, trying to get a FAT12/16 switch on the 8MB chips (because it turns out it's based on # of clusters, which is based on sector size). Didn't see an issue, but didn't suceed in getting it to switch.

#

I accepted your recent PR.

pastel panther
#

ok, thanks

manic glacierBOT
idle owl
#

@slender iron When does Adabot do the autorelease of the bundle? I forgot to release a lib until today. I think it's fine to wait until tomorrow, but I wondered what time that typically happened.

slender iron
#

3am my time I think

idle owl
#

Ok

#

thanks

tulip sleet
idle owl
#

@tulip sleet It's for the TrellisM4 so no, it's not frozen, no need. I'll take a look at the PR.

tulip sleet
#

tnx!

idle owl
#

merged!

#

@tulip sleet I didn't do the release

tulip sleet
#

i'll do that

idle owl
#

ok keen

#

hmm. I just realised maybe width and height aren't so great for the TrellisM4 lib. Because the whole point is the lib lets you rotate. which means it's no longer accurate when at 90 degree rotations. Not sure what else you'd call them though. It's only accurate when a wide side is facing you.

pastel panther
#

length and width

tulip sleet
#

x_length and y_length?

pastel panther
#

also good

idle owl
#

they're fixed in the lib

#

so what is x and y when you're looking at it changes, but what is x and y in the lib doesn't change.

tulip sleet
#

axes can rotate

pastel panther
#

hell yea they can <CHOP>

#

πŸ˜‰

idle owl
#

hmm.

tulip sleet
#

the subscripts are [x,y], right? So I'd make then correspond to that

idle owl
#

it wouldn't have mattered but I exposed the properties so we could iterate over them and make rainbows. so now it makes the rainbow code seem weird if you have the board rotated.

#

that doesn't make sense though

tulip sleet
#

do u use [x,y] or [x][y]

idle owl
#

because width=8 and height=4 in the lib.

#

then there's fancy offset math to handle the rotation

#

[x,y]

tulip sleet
#

i think people understand x is usually width and y is usually height, so it's not terrible the way it is

idle owl
#

Right.

#

That's the problem

#

you rotate it

#

and x is now 4 and y is now 8.

#

and that's how the code will see it

tulip sleet
#

but is that true in the subscripting?

#

oh, ok

idle owl
#

if you set rotation=90 it changes where 0,0 is

#

so you can visualise it better

gusty kiln
#

length / breadth?

idle owl
#

I might go with width and length. that was my other thought too.

gusty kiln
#

i'm always stumping for more use of "breadth"

idle owl
#

it's true!

tulip sleet
#

if you do rotation=90, then x_length and y_length would flip, and correspond to the new subscripting? I would vote for that, because it's kind of like len(whatever). or row/column??

idle owl
#

I... think width and height don't change though. if I'm understanding this right. so if you call them directly, which you can do, they're always hardcoded to be 8 and 4 respectively.

#
for x in range(trellis.pixels.width):
    for y in range(trellis.pixels.height):
        pixel_index = (((y * 8) + x) * 256 // 32)
        trellis.pixels[x, y] = wheel(pixel_index & 255)```
Works right if it's at `rotation=0` but doesn't work if it is `90`. So you can swap them, but then you have to change the math as well.
#
for x in range(trellis.pixels.height):
    for y in range(trellis.pixels.width):
        pixel_index = ((x + (y * 4)) * 256 // 32)
        trellis.pixels[x, y] = wheel(pixel_index & 255)```
`rotation=90`
tulip sleet
#

I would make the x_length and y_length change based on rotation, then. Then you don't have to change the rest of the code if you do a rotation at the top of the program

idle owl
#

Except you'd still have to change your code because you use coordinates in the code

#

and your coordinates would change

#

the range of them I mean.

#

you rotate and (0, 7) is no longer valid.

pastel panther
#

@gusty kiln If I ever bought a product and it described it's dimensions as "length and breadth" I would be tempted to throw it out the window for being too pompous.

gusty kiln
#

:P

pastel panther
#

you might say I would defenestrate it

gusty kiln
#

hahaha

idle owl
#

@pastel panther Well played.

gusty kiln
#

it's now my mission in life to see this happen.

pastel panther
#

10 points to Slytherin

gusty kiln
#

well, one of several missions. i have a list.

idle owl
#

@tulip sleet none of this was an issue until I wanted rainbows. Which I swear I've said with every LED project I've ever done. I break everything with rainbows. Initially width and height weren't exposed so it was irrelevant.

idle owl
#

the library creates offsets for the rotations

tulip sleet
#

The 8 and the 4 in your examples above shouldn't be magic numbers: you can use the .width and .length or whatever they're called this minute.

#

so shape[0] and shape[1] define the range of the 0th and 1st subscript

idle owl
#

ok..

tulip sleet
#

that's certainly not familiar to most people, though

#

a.shape of some array returns something like (2,3), or (2,5,9) for a 3d array

#

i have to change the subject a bit completely: both crickit and cpx libs have this code:

sys.path.insert(0, ".frozen")   # Prefer frozen modules over local.

so there's actually no way to override a frozen module if you use one of those libraries without change. I could make this smarter, so it doesn't insert ".frozen" at the very beginning, esp if ".frozen" is already before "lib".

#

or we could just leave it alone and say if you're debugging, you have to take that line out

idle owl
#

I think we should update the libs.

#

We're fixing the issue globally, and with a purpose to allow debugging, so I feel like we should take advantage of it

tulip sleet
#

just take that out, or compensate for old CPy versions?

#

allow upward compatibility, at least approximately?

#

i guess I'll check for .frozen being after lib and insert it before only if that's true, and i'll insert it before lib but after anything else, so not at position 0.

fluid helm
#

Yay! just got my order confirmation for Hacktoberfest. Looks like contributing to CircuitPython topped off my 5 PRs!

idle owl
#

@tulip sleet Ok

#

@tulip sleet Sorry for delay I had the window scrolled trying to figure this out.

tidal kiln
#

@idle owl lots of scroll back on this, i may be too late, so may not help, but for xy coords and rotation - maybe look at how the GFX lib handles it?

idle owl
#

@tidal kiln isn't that arduino

tidal kiln
#

yep. so just in general - what do width/height or (x,y) mean when rotated? etc.

tidal kiln
exotic pumice
#

re-asking not at midnight
"I have an interesting symptom I'd like to run by you guys
when I run spi.write() to the neopixel, initially it does nothing, but if I then run spi.deinit(), the neopixel turns on. Why would this be?"

tulip sleet
#

@tidal kiln The integer 2**<large number> will not work on non-longint builds (non-express: Gemma and Trinket M0). it will generate an integer overflow. You can force these to floating point by making the 2 or the exponent be a floating point number (2.0, 65.0, etc.).

The range of the single precision floats is about 1-e38 to 1e38

#

@exotic pumice I think the deinit() turning on the neopixel is due to glitches on the signal line. It's probably not useful.

exotic pumice
#

ok

#

thanks

#

I've found a few cases where others have got it to work at 3MHz but I haven't had much success myself.

tulip sleet
#

we have seen this kind of glitch before when the Circuit Playground Express bootloader was switching states and hadn't disabled the NeoPixel pins.

#

I think without a more precise SPI clock rate, this is not going to work reliably

exotic pumice
#

I think I'll try DMA next to see if that helps

#

it's fairly stable at 3MHz

idle owl
#

@tulip sleet I reviewed both of those PRs, travis is unhappy with the constant name, fyi.

tulip sleet
#

ugh, ok, thanks. I should have pylint'd it in advance

#

@idle owl it's not even a constant

idle owl
#

@tulip sleet hah!

tulip sleet
#

i guess it's complaining because it's at the top level

idle owl
#

Silly pylint.

tidal kiln
#

@tulip sleet cool. thanks.

Adafruit CircuitPython 3.0.2 on 2018-09-14; Adafruit Trinket M0 with samd21e18
>>> 2**65
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: small int overflow
>>> 2**65.
3.68935e+19
>>> 
Adafruit CircuitPython 3.0.3 on 2018-10-10; Adafruit ItsyBitsy M4 Express with samd51g19
>>> 2**65
36893488147419103232
>>> 2**65.
3.68935e+19
>>> 
tulip sleet
#

right, exactly. are the coeffecients very small or very large also?

tidal kiln
#

can't remember. i think they're largeish. i can check real quick...

tulip sleet
#

are they ints?

#
>>> 1e-50
0.0
>>> 1e50
inf
tidal kiln
#

yep. unpacked from a block read of registers:

        coeff = struct.unpack("<HHbhhbbHHbbhbb", coeff)
#

i don't think they're that big

#
>>> raw = bmp._read_register(0x31, 21)
>>> coef = struct.unpack("<HHbhhbbHHbbhbb", raw)
>>> coef
(27561, 18848, -10, -295, -2856, 35, 0, 25751, 30855, -13, -10, 16140, 19, -60)
>>> 
#

yah. not even close to e50.

tulip sleet
#

@tidal kiln (sorry, talking to my wife about something) yeah, I was just worried about something like 1e-38/1e38

tidal kiln
#

no worries

#

any else other than convert exponents to float?

tulip sleet
#

looks ok otherwise

tidal kiln
#

ok. thanks. there's still the code review gauntlet if there are other tweaks.

tulip sleet
#

@idle owl fixed the pylint problems on those PR's. Now passing.

idle owl
#

@tulip sleet merged

tulip sleet
#

I'll make releases. thanks!

idle owl
#

Thanks for getting everything updated!

tulip sleet
#

it's always not quite as simple as it seems. And esp8266 has a weird sys.path, looking at that, but should have a 3.x PR soon.

sly wagon
#

I knew I got a notification but I couldn't find it cause it was from 1am haha! Glad you got it working @errant veldt !!! did you end up sticking w/ circuitpython or did you change things up a bit ?

upbeat plover
tulip sleet
#

@idle owl LIS3DH commits are way ahead of release; does it need a a new release?

idle owl
#

Oh probably if that's the case.

tulip sleet
#

maybe it's just examples

idle owl
#

Still needs a release if it's examples. But not a release for your purposes if that's all it is.

tulip sleet
#

a couple of other ones have commits ahead of release, like pylint fixes, etc. Should I make releasese for those?

idle owl
#

I mean we should always be doing releases for updates. Then we don't miss it when it's crucial, even if the update is a minor fix.

tulip sleet
#

ok, I'll make releases; it's easy

idle owl
#

Thanks!

marble hornet
#

@upbeat plover so, does the programs save to a file?

tidal kiln
marble hornet
#

or to nvm?

raven canopy
#

@tidal kiln its close!

#

actually...pretty much done. πŸ˜„

tidal kiln
#

@raven canopy awesome sauce

upbeat plover
#

@marble hornet I don't know how to save to file yet. I'd like to do b+ mode in open() and write to file, but instead of adding to it change values at addresses

raven canopy
#

mostly just need to refactor a nested try:. i don't like them...

sly wagon
#

quick question. I've seen this in a bunch of example code: PURPLE = (0x10, 0, 0x10), what's the benefit of me using hex notation like that to setup values vs PURPLE = (16, 0, 16) ? Is it just to give users the option to do it? Is it to make it easier for arduino only people to come to the circuit python side? Just curious

raven canopy
#

@tidal kiln sneek peek:

Found tag name: 1.3.1
Found status: behind
Compare adafruit/Adafruit_CircuitPython_Register status: behind 
  Ahead: 0      Behind: 1      Commits: 0
Found tag name: 1.1.0
Found status: behind
Compare adafruit/Adafruit_CircuitPython_OneWire status: behind 
  Ahead: 0      Behind: 1      Commits: 0
Found tag name: 3.1.0
Found status: behind
Compare adafruit/Adafruit_CircuitPython_INA219 status: behind 
  Ahead: 0      Behind: 1      Commits: 0
idle owl
#

@sly wagon Simply an option.

sly wagon
#

got it, thank you!

tidal kiln
#

@sly wagon yep. just different ways of representing numbers. normal numbers are fine. the0x in front means the numbers are in hex. you can even add a 0b in front to do binary.

>>> 10
10
>>> 0x10
16
>>> 0b1101
13
>>> 
#

@raven canopy neat

solar whale
#

@upbeat plover @marble hornet just a thought about using NVM. I have not seen you mention it so I want to be sure you are aware that the number write cycles is limited. It will β€œwear out β€œ. I’m not sure if the spec for these parts. Likely 10s of thousands but that is not hard to reach when logging data.

sly wagon
#

@tidal kiln awesome, many thanks !

upbeat plover
#

I end up reading more then writing, will that ware it aswell?

#

@solar whale

solar whale
#

No, reading is not limited.

slender iron
#

@solar whale did you try USB HID on nRF?

solar whale
#

@slender iron i idid a simple test for hatach a few months ago. Just a key code and a mouse motion.

slender iron
#

hrm ok, it looks broken to me in tinyusb but its possible it was broken later

#

thanks!

solar whale
#

I’m on the road so I can’t test it until next week. Sorry

marble hornet
#

@solar whale thanks for the heads up

solar whale
#

@marble hornet you’re welcome. I had visions of a rapid write cycle in a data logger test that could cause problems pretty quickly!

slender iron
#

nvm, I found what I was missing

sturdy furnace
#

Hi all,
I'm getting a bug which crashes my CPX when collecting temp data.
The error:

b'Traceback (most recent call last):'
b' File "code.py", line 247, in <module>'
b' File "code.py", line 233, in main'
b' File "adafruit_thermistor.py", line 88, in temperature'

Which I tracked to this line: steinhart += 1.0 / (self.nominal_temperature + 273.15)
in this repo.

I don't quite understand what is going wrong and can't seem to replicate it in the REPL for debugging.
I'm using the standard 25 deg C nominal_temperature.

Anyone have any ideas?

manic glacierBOT
#

To prevent memory-space support issues, put .frozen before /lib on sys.path. Users will no longer have to manually delete frozen libraries in /lib to avoid them being found first.

Update frozen libraries. We were accidentally freezing tests/ directory in libraries that had it; saved some space by removing that. Some libraries are larger due to more version information and/or minor additions. Adafruit_BusDevice has a large new method. Had to squeeze pirkey build a bit. CPX (not ...

solar whale
#

@sturdy furnace is there more to the error message. That says where but not what. Any chance self.nominal_temperature is β€”273.15? Causing divide by zero?

tidal kiln
#

@raiden#5305 was there more to the error message? the last output is usually something indicating what kind of error

sturdy furnace
#

No I think that's all I'm getting. But let me try again

#

and the value for the nominal temp is 25

solar whale
#

It was worth asking πŸ˜‰

sturdy furnace
#

@solar whale Oh fair enough, people do weird things πŸ˜†

#

@solar whale @tidal kiln nope that's all I'm getting as an error message. I've been trying to prdouce the error in the REPL wiht no luck.
It's pretty intermitent, maybe 40-50% of the time it happens.

#

I also have 4 CPXs and it's happening on all of them 😦 I've tried two different bootloaders as well

solar whale
#

Where do you see the error message?

sturdy furnace
#

I'm reading through the serial port on a raspberry pi

#

so either through, cu, pyserial, or node

solar whale
#

Makes no sense to me. Can you post the full code you are running? I can’t look at it much until tomorrow, but possibly someone can try to reproduce the error

sturdy furnace
#

Yup, shall I just upload the file here?

solar whale
#

Sure

sturdy furnace
#

@solar whale here you go, thanks for your help πŸ‘.
Line 102 is the thermistor initialisation

solar whale
#

Ok. Hope to be able to look at it tomorrow.

tidal kiln
#

@sturdy furnace your set up is a CPX attached to an RPi via serial? and that's the code running on the CPX?

sly wagon
#

ok, got another dumb question friends. I'm trying to make more sense of the wheel function that you can find all throughout a bunch of examples out there. Basically what i'm trying to do, is have wheel produce R.G,B values that are closer to the color purple instead of the usual rainbow. Doing it with red is super simple, but i'm having a brain fart moment. If you have a blog post you recommend i'd appreciate it πŸ˜ƒ

#

red only wheel func btw:

def wheel(pos):
    # print("func = 'wheel' pos='{}'".format(pos))
    # pos = 255 - pos
    # Input a value 0 to 255 to get a color value.
    # The colours are a transition r - g - b - back to r.
    if pos < 85:
        rgb = (int(255 - (pos*3)), 0, 0)
        print("Inside: pos < 85 ... rgb = '{}'".format(rgb))
        return rgb
    elif pos < 170:
        pos -= 85
        rgb = (0, 0, 0)
        print("Inside: pos < 170 ... pos = '{}' rgb = '{}'".format(pos, rgb))
        return rgb
    else:
        pos -= 170
        rgb = (int(pos*3), 0, 0)
        print("Inside: pos < 170 ... pos = '{}' rgb = '{}'".format(pos, rgb))
        return rgb
solar whale
#

@sturdy furnace do you have anything in your buffer.txt file when you run your code? if so , can you post a sample file.

tidal kiln
#

@solar whale i just made one with done in it to get past that. it doesn't look like it's doing anything with the parsing results. sda_port isn't used anywhere else.

solar whale
#

@tidal kiln sounds good. Do you get any errors?

tidal kiln
#

not by running it via repl, but it sounds like they didn't either

#

so must be something about the rpi setup

solar whale
#

I'm still unclear what the error is and where it is seen - is it in the code.py output to the REPL . TH CPX is not using TX/RX ( unless I am missing it) so it does know wha the RPi is doing.

tidal kiln
#

yah. same here. don't fully understand the hw setup. that's what i'm asking them about. it could be something hw vs. code.

solar whale
#

ok - glad you are on it.I do have a CPX with me and will poke at it tomorrow. Need to get some sleep now...πŸ’€

tidal kiln
#

yep. no worries. we'll see if they respond. later.

sturdy furnace
#

@tidal kiln @solar whale sorry guys went and grabbed lunch. I have 4 CPXs attached to the USB ports of the pi, each one with the same code.py. Only one of the CPXs fails when this error occurs.

The error is appearing at the command line in a seperate screen

#

buffer.txt is used as a file buffer to send non-blocking neopixel cmds. So an example is p 10, c 1 1 1. The temperature reading doesn't really rely on that at all.

#

Also the pi is running stretch lite, and I've tried two bootloaders: 3.0.0rc and 3.0.3

tidal kiln
#

When and how are your writing to buffer.txt?

sturdy furnace
#

A python script writes to the file (rpi side), and the CPX does reading (no writing)

tidal kiln
#

If you dont write to the file and just let the code run, does it get the error.

sturdy furnace
#

I'll give it a try

tulip sleet
manic glacierBOT
manic glacierBOT
solar whale
#

@sturdy furnace when I run your program , I don't see any output at all. You are only printing something if n0w-last > SAMPLE_RATE, but SAMPLE_RATE is 48000 so it will only print about once every 12 hours, Is that your intent? Or am I misreading the code?

#

BTW - I tried it with CP 3.0.1 but have not reproduced the error.

solar whale
#

@sturdy furnace I see I did misread the code and the print intervals are not using SAMPLE_RATE but now I am not sure why I see no output.

tepid sapphire
#

Hi, some news about BLE to NORDIC NRF52 ?

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 3\.1\.0
tulip sleet
#

@tepid sapphire still working on it.

solar whale
#

@sturdy furnace - ok -- I used a buffer.xt with just done and I get output -- with CP 3.0.1 I am seeing ```Press any key to enter the REPL. Use CTRL-D to reload.

Adafruit CircuitPython 3.0.1 on 2018-08-21; Adafruit CircuitPlayground Express with samd21g18

soft reboot

Auto-reload is off.
code.py output:
light: 10976
light: 11984
temperature: 24.3319
uid: ;DH1MPJ1.6&ΓΏ
light: 11808
light: 10400
temperature: 23.7407
uid: ;DH1MPJ1.6&ΓΏ
light: 11136
light: 11488
light: 7696
temperature: 24.4637
uid: ;DH1MPJ1.6&ΓΏ

#

same with CP3.0.3

#

same with 4.0.0 - alpha 2

#
Adafruit CircuitPython 4.0.0-alpha.2 on 2018-10-16; Adafruit CircuitPlayground Express with samd21g18
>>> import microcontroller
>>> microcontroller.cpu.uid
bytearray(b';D\x04\x1eH1MPJ1.6&\x1b\x07\xff')
>>> ```
solar whale
#

@sturdy furnace I have it running as code.py under CP4.0.0-alpha2 with buffer.txt done -- I am not seeing any errors. One thought, Depending on the values in your UID could the attempt to print them be causing some error? How often is buffer.txt updated? Do the errors coincide with the time of update of buffer.txt?

manic glacierBOT
#
[adafruit/circuitpython] tag deleted: 3\.1\.0
tulip sleet
#

NOTE Please don't use 3.1.0 - I tagged it on master by mistake. I'll make a 3.1.1 that's correct.

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 3\.1\.1
tulip sleet
upbeat plover
#

to update build stuff, i just use
cd circuitpython
and
git pull
?

tidal kiln
upbeat plover
#

thank you

#

i did something wrong... i ended up just backup up my board changes then doing git clone https://github.com/adafruit/circuitpython.git for fresh... dargh 😬

tulip sleet
#

Do you have a fork or just a clone?

#

also you need to do git submodule update --init --recursive

upbeat plover
#

just clone

tulip sleet
#

In the long run, it's a good idea to make a fork, so that you can back up and keep track of your changes (if you plan to make some).

upbeat plover
#

im okay with doing that all locally, not hard to copy paste

#

i got 700+gb free on this hd

tepid sapphire
#

thank you Danh

manic glacierBOT
#

I'd like to use supervisor.runtime.serial_bytes_available on the Trinket M0 basic.

I loaded the 3.1.0 firmware from https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/trinket_m0/ and it seems to work perfectly.

I loaded the newly released 3.1.1 and get this error:
AttributeError: 'Runtime' object has no attribute 'serial_bytes_available'

I loaded 3.0.3, 3.1.0 and 3.1.1, went into the REPL and used these commands:

import supervisor
help(supervisor.runtime...
tidal kiln
#

@upbeat plover are you actually making changes to the cloned copy?

upbeat plover
manic glacierBOT
tidal kiln
#

are you committing those to the main branch?

simple pulsar
#

Hi, I just put 3.1.1 on a CPX board. Am I expecting to see a new .frozen directory appear after the UF2 is applied? Or do I have to get it from somewhere? Or is not a real directory?

#

It appears to work ok without it

tough flax
#

Hey @tulip sleet - is there a reason serial_bytes_available isn't going into 3.x? One of the drivers was to use it as a work around until asyncio was in

#

It might be my fault (I just put it where I was told, but I could have been more specific)

slender iron
#

@simple pulsar the .frozen is fake and is used to represent the modules that are frozen into the firmware

manic glacierBOT
river quest
steep moth
#

Hello @solar whale!

solar whale
#

πŸ‘‹

median trellis
#

I got the new Neotrellis M4. The guide seems like a quick copy paste job and doesn't actually cover getting the example code going. I couldn't find a uf2 file for this board on the repo so I put the feather m4 express one on there based on the guide using it as an example. Now it never goes into boot mode so I dont know what to do.

simple pulsar
#

@slender iron Worth mentioning .frozen being a pseudo-direction a bit in things like release notes (and the annoucements during this transition) otherwise I think you'll bemuse and get questions, e.g.

tulip sleet
#

@tough flax The PR was a merge into master, meaning 4.0. Can you use the 4.0 alpha for your work? It's pretty stable on samd boards.

median trellis
#

Yeah I don't get TRELM4BOOT. I did once. What can I do now?

#

I tried using the same cable for an itsybitsy and it shows up just fine so the cable is good.

#

@tulip sleet

tulip sleet
#

@simple pulsar I added some explication to the release notes.

#

@median trellis what color is the RGB led on the bottom when you double-click?

median trellis
#

It never changes. Stays red/magenta

tulip sleet
#

I'm going to do some checking on the bootloader. back later. sorry about this.

median trellis
#

Oops let me clarify. I never ever got TRELM4BOOT. Thats why I tried to put a .uf2 on there

#

Thanks @tulip sleet

#

I just tried about 6 times and finally got it to boot

#

Maybe the switch isnt always working?

#

@tulip sleet do you know where the example code is for this board? For example the code they ran on Ask an Engineer?

tulip sleet
#

@median trellis no, I don't, it was done like two days ago. I saved the factory demo (which is very simple). Do you have a J-Link or similar?

exotic pumice
tulip sleet
#

ok, great thanks @exotic pumice !

median trellis
#

thanks @exotic pumice but those are the arduino examples. I want to use python. The example they were running was a sample sequencer written in python.

exotic pumice
#

you sure?

harsh rain
#

Hola

meager fog
#

@median trellis ill be writing up the drum machine demo for circuitpy shortly

#

@median trellis i could sneak it to ya πŸ˜‰

harsh rain
#

LADYADA IS HERE!!!

meager fog
#

did you get your trellis booting

harsh rain
#

Yay!!

meager fog
#

HI!!!!

#

YAY

median trellis
#

@meager fog or you could let me review it for you and give you feedback

meager fog
#

hahah

#

ok πŸ˜ƒ

median trellis
#

I do it for Neo sometimes

#

Noe

meager fog
#

who is Neo?

#

oh Noe yeah!

#

but is your trellis still 😦

#

or did you get it into bootloading mode?

median trellis
#

It booted!

meager fog
#

ooh ok!

#

first up you need the right cpy

harsh rain
#

Ladyada how do I wire a DPDT switch for Single pole usage??

#

First time 😦

median trellis
#

might be an issue of going through a USB C adapter... πŸ˜›

harsh rain
#

Off topic sorry :/

meager fog
#

@harsh rain all good - we have a guide on switches! just use one half of it

harsh rain
#

Ah ok thanks

meager fog
tulip sleet
#

@median trellis did you finally get double-click to work? How'd you get it back to ...BOOT?

meager fog
#

pig, check that out, it has everything u need!

harsh rain
#

Thanks so much!!

meager fog
#

np πŸ˜ƒ

#

and drag that to trellboot

#

then here's the code

tulip sleet
#

@median trellis ladyada and I were discussing your issue

harsh rain
#

You should make circuit python version of Metro board full size. Yes the feather is bueno but the Metro Logo looks beautiful

tulip sleet
#

@median trellis ladyada and I were discussing your issue

harsh rain
#

You should make circuit python version of Metro board full size. Yes the feather is bueno but the Metro Logo looks beautiful

median trellis
#

@meager fog got it

harsh rain
#

10/10 pcb board design

median trellis
#

now CIRCUITPY is mounted

meager fog
#

thanks blasted!

#

ok unzip the drumkit, drag those files onto CIRCUITPY

#

it should reboot once all are copied

exotic pumice
harsh rain
#

You guys gonna restock OG NeoTrellis?? β€˜β€˜Twas a great board

exotic pumice
#

SPI neopixels

meager fog
#

blasted, yep! just sign up

#

more coming

harsh rain
#

Will do!

meager fog
#

disurpt, use that ^

#

pretend you didnt see the other zip

harsh rain
#

Anyone know is Maker Space has CNC machines?

median trellis
#

thanks @meager fog . Gonna try that now. Thanks for your help! I'm sure you had better things to do. I am a software QA Automation Engineer by day and use Python and Selenium. Really excited to use CircuitPython and Micro Python for my maker projects.

meager fog
#

disrupt - awesome πŸ˜ƒ

#

disrupt - plz delete welcome.wav, i wasnt supposed to give that to you. its a sekret πŸ˜ƒ

harsh rain
#

πŸ˜‚πŸ˜‚

meager fog
median trellis
#

THANK YOU

harsh rain
#

@meager fog you should do a Ultimaker3 or OtherMill pro giveaway for Christmas πŸŽ„

meager fog
#

YAY

harsh rain
#

10/10 Corsair keyboard?

meager fog
#

blasted, we do giveaways every week on wednesdays!

#

why wait for holidays πŸ˜ƒ

median trellis
#

Its a Razer Ornata Chroma

meager fog
#

digikey does digiwish as well

harsh rain
#

Ah

#

Ladyada the Raspberry Pi Parts Kit is a great deal, has to buy one

#

All the parts for great price πŸ€—

median trellis
tulip sleet
#

@median trellis sorry to go back to the orig problem, but did you just have to wiggle the USB-C or unplug/plug or something? We could use your initial experience for future support.

#

to get to TRELM4BOOT?

harsh rain
meager fog
#

@median trellis sweet! hope you have fun, post here if you have questions

harsh rain
#

@meager fog You heard of the Midifighter 64?

meager fog
#

hmm i think so - that is from a few years ago right?

#

ok folks - itz zzz time for me

#

πŸ’€ nite nite!

harsh rain
#

Cya!! Thanks for talking

meager fog
#

cya blasted!

harsh rain
#

Wait

#

Anything new from State of the fruit??

tough flax
#

@tulip sleet this is more about the guide I'm writing... it goes into some detail showing how to use that feature to control CP from a PC/Mac using the serial port. What's the timeframe for 4.0's release?

tulip sleet
#

@tough flax it will be some months, because we have a lot of work to do on nrf52 and displayio, but you can point people to the alpha releases for now -- the code you show is runnable now with the alpha

tough flax
#

@tulip sleet are you open to me back-porting this?

#

It's pretty simple code

tulip sleet
#

I can discuss it with @slender iron - there's no inherent objection. We are trying not to do a lot with 3.x except when necessary. The latest release was to solve a persistent support problem. But you don't want to point to the alphas?

#

Scott is doing a complete rework of USB which will probably allow a second serial channel on USB CDC.

tough flax
#

@tulip sleet - I'm aware of the second channel - the point of this guide is to give a solution that works with the current USB code for folks waiting for it

#

In other words, I probably forked the wrong version

ruby lake
#

now that apple deathmarch is over, maybe I can get back to some cp

tough flax
#

I can use the 4.0 alpha for my work tweaking it (still working on that problem with linux)

#

But I'm willing to do the work to back-port it if needed

#

Are you an admin on the Learning System? I can send you a link to the WIP guide

tulip sleet
#

I can see in-progress stuff, I think, at least some

slender iron
#

@tough flax happy to accept a PR and make a new release to backport it

carmine wind
#

I think this is the correct topic for my question but I am new to this space so be gentle.
I am trying to get CircuitPython working on a Raspberry Pi Zero W. The adafruit page for Installing CircuitPython on Raspberry Pi states that CircuitPython works on a Pi Zero. When I try to run the blinkatest.py program I get a "NotImplementedError: Board not supported" error on the "import board" line of code. I modified board.py to print the board type and it comes back as "raspi_1". Tha adafruit page states that the Raspberry pi 1 is not supported by CircuitPython. Can anyone shed some light on this problem? Is Raspberry Pi Zero W supported by CircuitPython? Thanks in advance...

tall bay
#

Does CP support Python's requests library?

solar whale
solar whale
#

I have not tried the β€œstandard β€œrequests lib.

manic glacierBOT
#

I'll chime in on this too, since I recently ran into this limitation after switching a project from Arduino to CircuitPython. The project requires events triggered with at least 0.1 second resolution, but using monotonic() begins to fail. The only fix is to have the device reset as the resolution limit approaches. This is insufficient for my use case. I can't think of another way around it.

Even a rollover counter like millis() is preferable to monotonic(), as at least I can keep track of ...

manic glacierBOT
tough flax
#

@slender iron thanks. I want to make sure I’m using the right branch this time. Where do you want me to pull from? Also this is a simple PR but on more complicated ones is there’s process/tool for back porting? I should I just recreated it and we’ll deal with conflicts when 4.0 rebased?

raven canopy
#

installing travis CLI is... 😑

timber mango
#

@tulip sleet I couldn't figure out how to get to CIRCUITPY on Trellis M4 using the reset switch, but the boot drive was always accessible in Debian (amd64).

#

I copied CURRENT.UF2 off the shipped version (off the Trellis M4, as shipped) and put in a version of CircuitPython you linked last night.

#

lady ada's drum zip did what it is supposed to do, first try. I did not load a bundle lib; I only used the lib she provided in that zip.

#

I was able to rewrite code.py with a few mods (to dim the NeoPixels). I get the correct sounds (decently loud) in the headphone jack (to my usual headphones).

#

I don't have an elastomer keypad to check the buttons.

#

Adafruit CircuitPython 450c06e on 2018-10-28; Adafruit Trellis M4 Express with samd51g19

#

I don't know which lib bundle corresponds to that. ;)

tulip sleet
#

@timber mango Use the 4.x bundle

timber mango
#

"None of the above is a complaint - just information for you." hehe

tulip sleet
#

@tough flax start with the 3.x branch.

#

@carmine wind Most CircuitPython libraries are supported on RPi You use regular RPi Python and the blinks wrapper library. You can install our libraries using pupils, and blinka and other needed libraries will be installed automatically

manic glacierBOT
slender iron
#

<@&356864093652516868> The US shifts time this weekend so beware that if you are outside the US then the meeting time may change.

fluid helm
#

That's confusing πŸ˜„

#

is it +1 or -1? @slender iron

timber mango
#

spring forward, fall back

#

so what used to be 1 pm is now 12 pm

raven canopy
#

-1. "Spring forw..." @timber mango beat me to it... πŸ˜„

timber mango
#

hehe

#

1st Sunday in November daylight > standard time
2nd Sunday in March standard > daylight savings time
This always happens at 2:00 a.m. in the local time zone (in the timekeeping system to be replaced).

#

In this case, 01:59:59 EDT is followed (in the next second) by 01:00:00 EST.

#

So if you're planning on that electronic caper, that's the exact moment of change-over for ya. ;)

stiff cedar
#

Does circuitpython have all of the builtins that micropython has?

tough flax
#

Ok, I need some basic git help here. I feel dumb. I have an existing fork of CP that I made the changes for serial_bytes_available on... https://github.com/ATMakersBill/circuitpython I now need to redo those changes on a different branch (3.x). I'm OK with just starting from scratch and creating a new fork, but that seems like I'd litter both my GitHub account and anyone who might have used it with a bunch of cruft.

#

Is there a way to change what that fork is based on? Even if I have to recreate the changes manually it would be nice to keep the URL etc.

ruby atlas
#

@stiff cedar you can see a full list of builtins in the docs

tough flax
#

My current plan is to change the default branch on my repository, checkout a new copy, use standard ediff to move over the changes and create a new pull request. Does that work?

stiff cedar
#

@ruby atlas thank you!

#

hmm, is there somewhere that lists the amount of flash space that circuitpython requires?

tulip sleet
#

@tough flax Assuming you have a remote named adafruit, do:

git fetch adafruit                    # fetch anything new from adafruit/circuitpython
git checkout 3.x
git merge adafruit/3.x         # this should be a fast-forward
git checkout -b 3.x-serial_bytes_available       # or whatever you want to call it
...                   # make changes

If the changes are identical to master, you could "cherry-pick" the commit(s) on master, but it's a bit tricky

#

@stiff cedar CPy uses up all of flash on all the boards it supports

tough flax
#

No, that's what my plan was (I called adafruit 'upstream')

stiff cedar
#

@tulip sleet what? that doesn't make sense, you wouldn't be able to add any code yourself then?

tough flax
#

@tulip sleet and I added a "build this to make sure it works" before my branch πŸ˜ƒ

tulip sleet
#

your code is stored in an in-flash filesystem. On boards with no SPI flash chip, there's a tiny 64kB filesystem for you to use. On boards with an SPI flash chip ("Express" boards), all of internal flash is dedicated to CPy, and your files are stored on the 2MB or 8MB external filesystem in the SPI flash chip

tough flax
#

I will tell you that git has a much sharper learning curve than other cm tools I've used

idle owl
#

@tough flax I wrote a massive guide on it because of that.

tough flax
#

@idle owl link please?

stiff cedar
#

@tulip sleet, ok! I am using a non-express board (the adalogger M0 board), so that means I have 64k of flash for my code and libraries?

idle owl
#

But there could be a gem in there you could use.

tulip sleet
#

@stiff cedar right, only 64kB. So store only the libraries you’re using.

stiff cedar
#

danh, ok. What I'll likely do then is only have the sd card library on the chip flash and then put everything else on the sd card. πŸ˜ƒ Thanks

tough flax
#

My general CM and rev control background is pretty strong (SVN, ClearCase, RCS back in the day) but I'm just feeling my way through git - this will help

tulip sleet
#

Also there are features omitted on those boards to make room for the file system

#

You’ll have to mount the sd card as a file system before you import anything, and also add it to sys.path

stiff cedar
#

danh, is there a page that lists what is omitted?

#

and yes, I am reading a quick guide on mounting the sd card and adding it to syspath

raven canopy
stiff cedar
#

@raven canopy ok, so anywhere it says SAMD21 or all supported I should be good, thank you.

raven canopy
#

yep. yw! happy CircuitPython'ing! blinka

tough flax
#

@idle owl your guide is very helpful!

idle owl
#

Excellent!

stiff cedar
#

So, on and adalogger M0, if I am using python libraries on an sd card what happens if I take the sd card out while the adalogger is on?

#

will I just need to press the reset button when I put the sd card back in?

#

Or will it automatically reset?

manic glacierBOT
#

This PR adds the serial_bytes_available() code to the 3.x branch so that we don't have to wait for the 4.0 release to use it. This is important because it is essentially a stop-gap to make interactive serial usage possible until the secondary Serial connection is available in 4.x.

The code here should be identical to that in master (as of 11/3) including comments, etc.

tough flax
#

@idle owl my only glitch on following your guide is that it doesn't handle the case where you're working off of a branch other than master - not a big deal, and I figured it out, but I thought you'd like the feedback πŸ˜ƒ

#

@chrome perch and @slender iron I've submitted the PR - travis isn't done yet, but it's ready for your review (whenever)

#

I am getting this error on the 3.x build of CPX (Trinket built fine)


-40 bytes free in flash out of 253440 bytes ( 247.5 kb ).
4072 bytes free in ram for stack out of 32768 bytes ( 32.0 kb ).

Too little flash!!!

Is this my PR's fault or a known issue on 3.x right now?

idle owl
#

@tough flax It's probably worth adding to the guide. I've not done it much, and that guide is my workflow so that's probably why it was skipped.

tough flax
#

Even just a pointer that says "note, if you're working on another branch, this won't work πŸ˜ƒ "

manic glacierBOT
idle owl
#

Where's the breakdown occur? As in where in the workflow... when you're creating your branch in the beginning?

tough flax
#

When you're pushing it back to github

#

it says there's no upstream branch

#

And the PR needs to be against the right branch as well

idle owl
#

ah

tulip sleet
#

@tough flax the CPX build is very tight right now. Was 16 bytes free before your additions. Try setting CFLAGS_INLINE_LIMIT = 55, 50 or 45 in the mpconfigboard.mk for CPX. Keep reducing until it fits. Example in pirkey . If this is confusing, I can fix it later in your or

#

PR

#

(On phone)

tough flax
#

ok... checking to make sure it builds before my changes

#

Something to check next time πŸ˜ƒ

72 bytes free in flash out of 253440 bytes ( 247.5 kb ).
4072 bytes free in ram for stack out of 32768 bytes ( 32.0 kb ).

Before my changes πŸ˜ƒ

#

@tulip sleet that fixed it - btw is there a target to build all boards (like travis does) in the Makefile?

tulip sleet
#

No, but there’s a shell script in tools/

tough flax
#

Ok, I'll take a look

#

I'll commit that change to the .mk file

#

@idle owl here's the error I got that I needed to fix

fatal: The current branch serial_bytes_avail_backport has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin serial_bytes_avail_backport
idle owl
#

interesting. Good that Git is helpful at least.

#

well minus the typo I caught.

#

I'll consider explaining it more when I have time, but would that have been sufficient for you to at least know you needed to fix it?

tough flax
#

Yep - perhaps a pointer to ask here if stuck

#

but yes, it eliminates the "oh CR*#)P" thought when you see the FATAL error

idle owl
#

ok. good enough for now.

#

Thanks for the feedback!

#

I need to finish the page on updating your branch if you get behind too, but haven't had time

tough flax
#

Strange Q - is there a way in CP to redirect stdout to a file? debugging the serial port would be easier if I could add print() statements that went to a file instead so it wouldn't throw off the serial data

stiff cedar
#

the few places where the adafruit_gps.send_command function is listed show a standard string being passed. The examples in the adafruit_gps github repo show that those actually need to be binary strings.

#

e.g. if you don't append the passed string with a b it throws an error about unsupported types.

umbral dagger
#

Yeah... I found the same.

idle owl
#

@stiff cedar There's a feedback link on all guides, you can click it and provide the feedback there.

#

@tulip sleet Does that mean we never needed the self._i2c in the CPX lib either?

tulip sleet
#

@idle owl it looks like it, cause it's only used in one place, as far as I can tell. I thought there were more i2c devs on the CPX board, but that's not true, just the lis3dh

idle owl
#

Hmm ok.

#

I'm not going to bother to fix it, but wanted to make sure I understood it right

#

I changed it to the first way you suggested because that's always how we do it in code, so I wanted it to be as readable as if it were in code

tulip sleet
#

yah, could just be fixed later as part of any cleanup. Pretyt low priority. It probably saves 10-20 bytes or so.

#

@idle owl is the adxl345 easier to use and/or cheaper than the lis3dh?

idle owl
#

@tulip sleet Not sure. @pastel panther wrote the lib for the ADXL345 so would know how easy it is to deal with, but I don't think has looked into LIS3DH to have a comparison. Can't be worse, I'll tell you that much.

#

Not sure about cost.

tulip sleet
#

it's more expensive in the store, but the product description for the previous generation of the part says "our favorite"

#

ok, just curious

pastel panther
#

I wish the bot would just tell me what word I said was so horrible so I could correct it.. 😦

cunning crypt
#

Starts with a "d"

pastel panther
#

and holds back water?

cunning crypt
#

Yep

pastel panther
#

😐

idle owl
#

The bot isn't smart.

cunning crypt
#

Except the version you used was more of the religious condemnation type

pastel panther
#

I forgot what it was but it let something by the other day that was surprising

cunning crypt
#

I've seen a few things, and have to agree with @idle owl - The bot is not smart.

pastel panther
#

@tulip sleet IRREGARDLESS the 345 driver was rather easy to port however I haven't worked on the more advanced features like tap so it may get more gross, but I don't expect it to. The datasheet is delightful. The comparing it to the LIS3DH, the 343 is apparently functionally equivalent to the 345 and substantially cheaper

stiff cedar
#

@idle owl thanks for the heads up about the feedback!

manic glacierBOT
solar whale
#

@idle owl FYI getting β€œ404” on the link to the new trellism4 library release.

idle owl
#

Yeah because I deleted it. There's a major issue with it.

solar whale
#

😟sorry to hear that. Good luck!

median trellis
#

ok @meager fog the NeoTrellis is working and I am very VERY happy with it but my mind is already running wild with all of the things I want to do with it. The first thing I want to try is giving the option of holding down any of the first buttons on the far left for 2 seconds to allow you to change the sample to another for that section by having groupings by bass, snare, hihat etc. I have a bunch of samples from my Ableton Live library that I have selected but I'm trying to figure out how to get them into the right format. I noticed the wave_parsing.py file checks for a chunk_id, subchunk_id, audio_format, and a number of others. All I know is that my wave files are 2304kbps compared to your 768kbps and when I try to drop them in they throw a bunch of those RuntimeErrors. Chatting with Noe I know you are seriously busy right now, even more than usual... so if your answer to this is "It will be in the full guide" I can more than except that. The question being, of course: How do I get my wave files into the right format?

exotic pumice
#

audacity?

steep moth
#

That's what I used.

median trellis
#

I tried audacity. Couldnt get it right.

#

@steep moth could you point me in the right direction?

steep moth
#

It was a bunch of trial and error for me, but sure I can try to help you in a little bit.

median trellis
#

I have four files I'm trying to convert. I spend two hours trying to make them work and I couldn't.

steep moth
#

@median trellis you need to change the refresh rate. When you change the refresh rate, you will notice that the audio plays slower, you will have to select the audio and set the speed of it. It has been a while since I have done this, but I think that is what I did to get it to work.

idle owl
#

@solar whale I had to revert a change. Not a huge deal. But I wanted to make sure there wasn't a way around it. There was not.

solar whale
#

@idle owl I have one arriving Monday. Looking forward to playing with it.

idle owl
#

@solar whale Nice!

steep moth
#

@solar whale are you going to make the NeoTrellis M4 play cat sounds?

solar whale
#

Possibly 🐱

tight garden
#

In circuit python, how do I access the TFT to draw/fill rectangles for a Hallowing?

stiff cedar
#

Hmmm, can someone help me figure out why some data from the gps library would be getting truncated? The latitude and longitude numbers I'm getting only have 4 decimal places instead of the 6 I'm expecting.

timber mango
#

The US Post Office delivered my Trellis M4 today (Saturday) from a Wednesday night purchase time (after the show) to Connecticut. I was surprised to see the package. ;)

stiff cedar
#

that function takes in a value such as "3908.5481" and should return something like 39.1424683

#

instead all I'm having printed is 39.1425

#

OH! Circuitpython's floats are single precision, not double!!

#

Is there any way to use doubles in circuitpython?

steep moth
#

@solar whale did you ever get your TFT stuff working?

solar whale
#

For some boards, but I don’t have the information @tight garden is looking for. I did not do much with the Hallowing. It is supported by the new displayio module.

steep moth
#

Ah.

solar whale
#

It may work with adafruit_rgb_display as well. I have not tried.

tight garden
#

yes I can use the 4.0.0 alpha with display.io to display bitmaps. But I didn't see a way to draw/fill primitives like rectangles

solar whale
tight garden
#

@solar whale what is D2? I wasn't able to import it

#

let me try to make sure I have the updated libraries

#

got build_adafruit_circuitpython_bundle_4.x_mpy_20181102 libraries. Still fail to import D2

tight garden
#

I can work around that since I know D2 is 39. But running it gives me an error SCK in use

timber mango
#

props on the short nick aw ;)

manic glacierBOT
slender iron
#

@tight garden displayio shapes are not supported yet

solar whale
#

@tight garden can you post the code you are running. Im not sure where D2 is imported.

tulip sleet
#

@stiff cedar Nope, no double precision, sorry. the single precision is 30-bits, not actually 32 (22 bits of mantissa) due to the way numbers are encoded in MicroPython/CircuitPython. This is about 6 digits of accuracy.

#

you could parse it yourself and split the numbers up, but that's a lot of work

manic glacierBOT
tight garden
#

@slender iron wt thanks for the info. I hope it will be supported soon

#

I noticed circuitpython is slower than running Arduino. I suppose that's normal since C vs python. I noticed this when running neopixels code that does the rainbow wheel. The python code ran a lot slower.

manic glacierBOT
slender iron
#

@tight garden yup, if you need execution speed use arduino. if you need development speed use circuitpython

manic glacierBOT
manic glacierBOT
manic glacierBOT
tough flax
#

Just a thought on this Sunday evening - this channel is perhaps the most welcoming, helpful, useful place in all of tech right now. Heck, perhaps anywhere. Thank you all.

river quest
raven canopy
#

@river quest one of the best piano/synth lines in all of history! Trent is such a master...

sly wagon
#

Work in progress led display for a Black Panther Cosplay I’m working on, powered by circuit python πŸ˜ƒ

onyx hinge
#

I didn't get to anything circuitpython this weekend, but did a heap of 3D printing and got an electronics project with python on a raspberry pi going so that was nice. too bad the weekend is practically over, back to real life tomorrow.

steep moth
#

This weekend went by really fast for me.

umbral dagger
#

I spent some time watching BlizzCon coverage and writing modules in C for CircuitPython.

#

Weekends go by fast, so do whole weeks.

steep moth
#

Very true.

manic glacierBOT
slender iron
#

@umbral dagger what C modules?

slender iron
#

<@&356864093652516868> Here is the meeting notes doc for tomorrow: https://docs.google.com/document/d/1wWPuqbIkO3v3ixij9Nh-RgBKz43yejuqcpTDMgjSd0o/edit?usp=sharing

manic glacierBOT
#

For the mixer, I'd suggest using "level" instead of "gain" to describe the control over the volume of a track. That's closer to the terminology of hardware mixer sliders. Gain or Trim usually refers to an relatively uncalibrated adjustment to the amplifier that precedes the level control.
Logarithmic level control values would be ideal, BTW. However, most folks could live with a linear value.

manic glacierBOT
umbral dagger
#

@slender iron For a guide on doing so.

manic glacierBOT
solar whale
tepid cape
#

πŸ‘ that worked!

manic glacierBOT
meager fog
#

@tidal kiln ahhh bmp is behind a big circuitpython travis build πŸ˜ƒ

#

in abut 30 minutes when its done we can merge

tepid cape
meager fog
#

@tepid cape thanks we will add this to the uf2 guide page

tepid cape
#

Super-useful! I resurrected 3 boards I presumed dead. I wish I could tell you how I ruined them, tough. The chance that PlatformIO eats bootloaders is slim, right?

meager fog
#

its not so slim, sadly

#

we've heard more 'brickings' with platformio

#

altho we are not sure why - we dont use it 😦

#

the good news is once you lock the bootloader, it should never happen again

#

(not m4 bricking, but we did hear of some m0's from another company)

#

lock the bootloader by dragging the update uf2 on - its easier than doing it thru jlink

tepid cape
#

πŸ‘

tidal kiln
#

@meager fog bps for wavefile? looks like it's out of the oven now.

meager fog
#

@tidal kiln bmp3xx

#

but i think its done now

tidal kiln
#

ohhhh. too many pr's. cruising through and tweaking about half a dozen right now. πŸ˜ƒ

meager fog
#

i saw zooooom

timber mango
#

I bricked a Feather M4 Express using atmel start. I thought it was a lost cause, as I could not find it in Jlink (but I have zero experience with jlink and gdb).

#

There was nothing special I remember about that particular event -- was deep in the middle of the development of the program (a forth interpreter). The PiUART CP2104 was connected at the time.

#

Forth most likely had a stack underflow which caused arbitrary execution of code -- that's my best guess. Did not brick during a flash update (I use the Arduino bossac to flash all my Atmel Start projects to MCU).

manic glacierBOT
solar whale
timber mango
#

I could not get Segger Jlink EDU to recognize it, but the same setup works with the M0 feather, so maybe I had an intermittent. My assumption at the time was that the segger could not (in principle) communicate due to <foo> -- this (today's) conversation did two things: a) gave me confidence that I didn't do anything wrong by working in atmel start in this way and b) gave me hope to unbrick it.
I don't really care about unbricking it; I worked around it (moved onto Metro M4 Express for the time being). I care a LOT about a) and now I can move forward in a) with confidence. ;)

#

I tell people to put such matters into the junk drawer and address them on a snow day in February, which is probably where this ends up.
I do (presently) have a Feather M0 all ready to go with JLink, so I need to practice with that to get it deep in my bones, what is supposed to happen, so I won't waste time when I add the unknown of a bricked M4 to the mix. ;)

#

(Scott's tutorial there was invaluable to me)

solar whale
#

@slender iron I will be lurking today. On an airplane-spotty Wi-Fi. Group hug. Status- grandkids are fun!

slender iron
#

@timber mango I've been able to recover with an atmel edbg when a jlink fails

#

I made one by removing the samd21 from an arduino zero

timber mango
#

I do have a working Arduino M0 Pro with the EDBG stuff on it.

#

removal of samd21 is lots easier than installation. thanks!

slender iron
#

np

inland tusk
#

@slender iron tan I will be lurking today.

slender iron
#

kk

#

<@&356864093652516868> meeting in two minutes!

neat folio
#

hmmm thought I was an hour late...... πŸ˜‰

gusty kiln
#

date math: hard.

timber mango
#

I am microphone-less but not exactly lurking.

errant grail
#

No mic today.

#

Need to put a decent mic out here in the workshop, I guess.

pastel panther
#

I'm lurkin'

#

please read my stuff in the notes

idle owl
#

@pastel panther Will do πŸ˜ƒ

pastel panther
#

😊

slender iron
#

πŸŽ‰

idle owl
errant grail
#

Group hug to the CircuitPython team and community. Fun to watch the progress on MIDI, USB, and audio mixer (multi-track!). Looking forward to updated support for displays. Amazing group effort with excellent leadership.

tidal kiln
#

@pastel panther woot!

pastel panther
#

πŸ•Ί

timber mango
#

no mic
Impossible to put into words, but just a general appreciation of the boldness and uniqueness and new new new-ness of what I call (internal to my self) the Adafruit Culture.
pt is often in my thoughts, for what he brings to the public face of adafruit industries. ;)

solar whale
#

Plane landingβ€”will catch up via recording. πŸ‘‹

timber mango
#

(that's just plane great)

raven canopy
#
  • @tannewt & @kattni for the merges
  • @danh, @jerryn, and those who's names escape me, for support in discord this week.
  • Group hug^2.
umbral dagger
#

Quick update: I'm currently working on a guide for extending CP by writing modules in C. Also, I'll be speaking about CP at PyCon Canada next weekend.

idle owl
#

@umbral dagger Added to the notes!

tidal kiln
#

oooo cool guide idea @umbral dagger

timber mango
#

not an illusion.

idle owl
#

πŸŽ‰

neat folio
#

gratz!

timber mango
#

πŸ””

errant grail
#

Congratulations!

umbral dagger
#

@tidal kiln Limor's suggestion

gusty kiln
#

congrats @slender iron . :)

timber mango
#

🏈 go long

pastel panther
#

πŸŽ‰

raven canopy
#

"Information Czar" is a similar term/idea... πŸ™‚

errant grail
#

Distracted from CPy work – writing some basic analog electronics articles. Did have time to throw together a CV gesture controller using CPy, a Feather, and a ToF sensor. Had the prototype up and working in about 10 minutes! Simultaneous MIDI output is next. (CV is the term for Eurorack musical synthesizer Control Voltage – a universal way to control note pitch, filter characteristics, and just about everything else in the analog synth domain.)
For this week, I’ll be focusing on finishing the authoring tasks and the mechanical assembly of the UFO model for a local film group. I’m sure there will be a few more tweaks to the UFO’s CPy code, but will be able to do that with my tablet in the video studio.

neat folio
#

How am i ever going to learn Python when everyone keeps dangling these juicy carrots?

pastel panther
#

@umbral dagger I look forward to your c helper guide!

timber mango
#

New bare-metal port of Brad Rodriguez' CamelForth (using Atmel Start) for the Trellis M4 (SAMD51G19A).

Trellis M4 is crystal-less.

To get the clock oscillator going on Trellis M4, I used the 32k ultra low power clock.

This was the first time that the crystal oscillator (XOSC) specification, in the clocks section of the Atmel Start web GUI, was not used in a project of mine.

I had USB bidirectional connectivity (a text-based interpreter, running CamelForth) going on Trellis M4 in a matter of hours (just yesterday!) No Ringbuffer - it is a kludge. ;)

https://github.com/wa1tnr/CamelForth-SAMD51-SAMD21

pastel panther
#

I AM ONLY ONE MAN

raven canopy
#

The Corporate Overlords are proud of your ascendence, @pastel panther. #GanntChartIt

pastel panther
#

we're leaving for the con next wednesday morning

raven canopy
#

FRAM Library: I2C merged; will update SPI branch with changes and put in PR later today.

Adabot:

  • "Library needs release" validator merged. Along with an upgrade to the requests module to mitigate a CVE.
  • Run/cron on Travis is mostly working. Still tweaking the yaml.

This Week:
Adabot:

  • work on library download stats
  • get Travis run to a PRable state.
  • Better & further implement request.get(timeout=n), which documentation encourages to use in "production environments".
tough flax
#

Hold on

#

Come back to me

timber mango
#

β›³ 🏌 πŸ•³ πŸ‡

#

bill: git diff thisfile is very nice on the command line

tulip sleet
timber mango
#

I say "kwispy" now for QSPI ;)

#

be bolder - you cannot jump over a chasm in two successive leaps /aphorism

gusty kiln
#

that's an interesting notion - maybe the ones that're assigned to circuitpythonlibrarians?

raven canopy
#

feels additional adabot work creeping πŸ˜„

gusty kiln
#

i tend to see PRs eventually but not feel particularly qualified to review.

raven canopy
#

I've learned plenty from the less-than-stellar reviews I've done.

idle owl
pastel panther
#

@idle owl is a Guide swiss army knife

raven canopy
#

Blog up a "call to arms" on a regular basis?

timber mango
#

You can do a lot with screenshots to communicate difficult ideas on Discord

errant grail
#

... and if you hold a workshop like that, please record it for time-zone challenged learners.

raven canopy
#

Like the new lib list...

gusty kiln
#

yeah, i'd be happy to sit in on a live code review session periodically.

#

or something along those lines.

timber mango
#

a weeds without Muckies is more than one can stand .. 🎡

tough flax
#

People love to watch over shoulders

#

I watch @timber mango all the time

pastel panther
#

CP is the perfect "I wanna do this open source thing but I don't know a git from a refrigerator" project/community. Lots of small things to do and many very helpful people

tough flax
#

And people watch me adapt toys etc.

timber mango
#

Just because code isn't right doesn't mean it is wrong. ;)

raven canopy
#

Don't fear the "blame" button...

tough flax
#

FYI - I just saw that CP has 99 releases πŸ˜ƒ #100 will have my backport in it

neat folio
#

thanx all

pastel panther
#

@slender iron I'll totes give you my twitch prime sub

timber mango
#

you can also put up your own github and let someone more experienced look at what you wanted to do in a pull request

neat folio
#

I'll bring the enthusiasm

timber mango
#

bell and howell filmstrip ;)

pastel panther
#

Also just remember that git has REALLY GOOD memory and just about any mess-up can be reversed

tough flax
#

I think the only rare hardware I have is the sip/puff sensor (and I'm happy to test)

timber mango
#

PowerPoint style graphics can work, too

neat folio
#

"too many toys"

stuck elbow
#

No, sorry

errant grail
#

Thanks everyone. Excellent discussion.

raven canopy
#

Thanks everyone! Have a great day. blinka

neat folio
#

woof

timber mango
#

@raven canopy I have a new green download arrow in the discord client.

pastel panther
#

ta ta all πŸ‘‹

raven canopy
#

@timber mango hopefully it contains bug fixes, and not "features". πŸ˜‚

slender iron
raven canopy
#

Gotta scoot. ttfn

gusty kiln
#

off a minute to get some lunch - later y'all.

errant grail
#

Time to head out. Need craft supplies and more heat shrink.

timber mango
#

beginners learn a lot in pairs of beginners, but you have to find two beginners and put them in the same place at the same time

#

eat as much as you want -- we'll make more. -Frito Lay

neat folio
#

it's fun(ny) where we can find "words of wisdom" πŸ˜ƒ

#

everything can be an opportunity for education

#

hate to run off, but have to go develop a residential zone in Minecraft πŸ˜ƒ have fun all... looking forward to "coding more"

manic glacierBOT
#

Thanks! Could you say a little something about how it differs from ubluepy and your thinking when making the changes?

It differs quite a lot since I made many breaking changes. I wanted the API to be something that I would find intuitive and easy to use, to be like other CP APIs, easy for beginners.

Truth be told, it's been some time since I wrote this and I should've pushed it earlier, because now I have a hard time remembering all the details of my decisions.

Also, as you say, I'...

slender iron
#

<@&356864093652516868> Here are the recordings of today's meeting: diode.zone YouTube

manic glacierBOT
tidal kiln
slender iron
#

yup! of course

#

next time you can add "Fixes #1303" to the commit description and github will do is automatically for you

tidal kiln
#

ok. will try to remember. i thought it also triggered off being mentioned in the PR comments also?

slender iron
#

I don't thiiiiink so but I could be wrong

#

I think the first PR comment is used in the merge commit

raven canopy
#

@slender iron on adabot "separate stats", are you thinking all stats including the current core stats? or just bundle+pypi (that's what i was meaning)?

slender iron
#

whatever you want

raven canopy
#

πŸ˜†

#

breaks out the Pros-n-Cons notepad

warped pendant
#

Good night - i'm totally cheating - i'm trying to integrate accelerometer to play wav and also some lights getting error when i'm trying to merge 2 code.py like I'm calling the board twice or something - thanks for any help

#

they sent me over from projecthelp

tidal kiln
#

can you share your full code somehow?

tulip sleet
slender iron
#

@tulip sleet its been public awhile. I just used it at google

tulip sleet
#

i misunderstood, but glad it's available

harsh rain
#

@meager fog you there??

slender iron
#

@harsh rain please don't ping specific people. ask your questions generally so anyone can help you

steep moth
#

Ladyada is usually really busy.

slender iron
#

@tulip sleet ya, its super handy

tidal kiln
#

@warped pendant sry - that question was for you - can you share your code?

warped pendant
#

one sec @tidal kiln

#

i'm trying to get it back to where i was it's the ValueError: Pin PA30 in use error - bbut now it's not working at all ugh.. one more min or so

tidal kiln
#

ok. np. just report back when you get back to the issue again.

sturdy furnace
#

@solar whale hey sorry I had to jump on to a different problem. I've removed the temp sesning and 87887........................................................

warped pendant
#

well that's where the issue was i was able to use the ears - circuit-playground-express-head-tilt-ears to merge in order to make it print but then it gave me an error and i think i undid too much - basically it was just this and i was trying math.fabs and such but i can get it to print just not play the wav b/c Pin PA30 in use (from in the top i think...)

#

If I add the play for the audio then it messes up but the print would work

audiofiles = ["recy1a1.wav", "recy2a2.wav", "recy3a2.wav", "recy4a2.wav"]

while True:
x, y, z = cpx.acceleration
print((x, y, z))
time.sleep(0.5)
if x < 0 :
print(("reycle"))
cpx.pixels[0] = (255, 0, 0)
cpx.pixels[9] = (255, 0, 0)

#

well it won't now - maybe just let me copy and paste more and try and figure out where i'm making the messup please don't laugh at my errors.

tidal kiln
#

they both work separately, right? it's just the attempt to merge them together where you're running into issues?

warped pendant
#

yes i was the
ValueError: Pin PA30 in use
like it was
from adafruit_circuitplayground.express import cpx
messing up
spkrenable = digitalio.DigitalInOut(board.SPEAKER_ENABLE)
spkrenable.direction = digitalio.Direction.OUTPUT
spkrenable.value = True

tidal kiln
#

and the board you are using is a CPX?

warped pendant
#

or also saying
import board
in the same thing

#

yes it's CPX
cause in the other functions it's saying
while True:
x, y, z = cpx.acceleration
and
cpx.pixels etc etc.
so i shouldn't put the import board and then the from adafruit_circuitplayground.express import cpx
at the same time

tidal kiln
warped pendant
#

yes head tilt ears because i was trying to find something to make a call from the accelerometer from the tutorial

# this is python
audiofiles = ["recy1a1.wav", "recy2a2.wav", "recy3a2.wav", "recy4a2.wav"]

while True:
    x, y, z = cpx.acceleration
    print((x, y, z))
    time.sleep(0.5)
    if x < 0 :
        print(("reycle"))
        cpx.pixels[0] = (255, 0, 0)
        cpx.pixels[9] = (255, 0, 0)```

 merging in (speaker etc.)

this is python

audiofiles = ["recy1b1.wav", "recy2bb2.wav", "recy3b2.wav", "recy4b2.wav"]

def play_file(filename):
print("Playing file: " + filename)
wave_file = open(filename, "rb")
with audioio.WaveFile(wave_file) as wave:
with audioio.AudioOut(board.A0) as audio:
audio.play(wave)
while audio.playing:
pass
print("Finished")

while True:
if touch1.value:
print("A1 touched!")
play_file(audiofiles[0])```

#

so trying to put in the

# this is python
play_file(audiofiles[0])```
after the 

this is python

while True:
x, y, z = cpx.acceleration
print((x, y, z))
time.sleep(0.5)
if x < 0 :
print(("reycle"))
play_file(audiofiles[0])

it would print recycle (sorry for typo) but then not play the audiofile  and the pin PA30 error and i think it was error on the play_file line as well
SORRY! i'm so confused
tidal kiln
warped pendant
#

can i edit that?

tidal kiln
#

also - you can go back and edit your previous posts with that markup

#

^^ yep

#

up arrow to edit last post. otherwise however mouse over to right side of a post until you see the 3 dots, which brings up a menu that has an "edit" option

warped pendant
#

more edits

#

hold on that is not working let me read the support

solar whale
#

@sturdy furnace no problem - i know all about getting distracted πŸ˜‰ Have you resolved you problems wit the CPX?

steep moth
#

I get distracted all the time. Hmm... I should go do some Circuit Python... Hmm... I should go do some Arduino.

sturdy furnace
#

@solar whale oops, that was sent prematurely. I'm debugging it now (no luck yet). Running through the stability and checking bootloaders etc.
I think the issue persists without the thermistor library. So it's something else. It seems one (with the 3.0.0rc bootloader) is stable, yet one with 3.0.3 is not... which is odd.

I'm seeing the error every second reboot on the failing ones, which might be telling?

#

Anyway, I'm doing a deep dive now. So will get back with my success or failure πŸ‘

solar whale
#

@sturdy furnace good luck -- It'll be interesting to find out what your learn.

sturdy furnace
#

Thanks for your help, and more importantly your moral support πŸ™

warped pendant
#

@tidal kiln hoping that's right lol

#

discord 101

tidal kiln
#

looks like maybe the start/stop marks didn't line up correctly or something

#

^^ that becomes this:

#

here's a simple example:

# this is python
foo = 23
warped pendant
#

oh

tidal kiln
#

@warped pendant don't worry if you can't figure it out - don't want to diverge you from your original question

warped pendant
#

is that right? i need to know how to discord properly

#

Q: can you undo undo in MU ?

#

is there a key command?

#

i mean redo

slender iron
#

its usually ctrl-shift-z I think

steep moth
#

Wow @slender iron you guys really need more people to run the forums, wow, so many unanswered posts, that much be a lot of work.

slender iron
#

@steep moth It is a lot of work. How old are they?

steep moth
#

There are a bunch from just over the course of a few days.

slender iron
#

got an example?

steep moth
tidal kiln
#

@warped pendant markup looks better. i think you were on the right track with your issue. you are trying to import the adafruit_circuitplayground.express lib, but also access things directly - so that's conflicting with the cpx library's internal use of those items

stiff cedar
#

@tulip sleet, re: floating point precision. I did end up splitting up the number and printing out the separate parts for higher precision.

#

Now on to my next problem! πŸ˜ƒ

#

Does the uart try to allocate a buffer the same size as the baudrate or something?

#

I'm trying to adjust baud rate on my adalogger M0 to 56700 and it is giving me a memory allocation failed error

slender iron
#

@steep moth kinda unfair to look at it that way because you aren't seeing what was answered. We do have systems in place to find those posts though

tidal kiln
steep moth
#

@slender iron True, I am still pretty new to the forums, still, that must be a lot of work, people have a lot of questions.

slender iron
#

ya, it is. Adafruit pays a number of folks to answer as many as they can

steep moth
#

It looks like the time is off on the forums, or it is a different time zone? Sorry that none of this is related to Circuit Python.

slender iron
#

ping me in a different channel and we can keep chatting about it

steep moth
#

Okay.

warped pendant
#

hey thank you @tidal kiln --- will try another day 😦 working and making light hapen, just no sound

tidal kiln
#

@warped pendant hopefully that helps / makes sense. it might also help to look at the code of the cpx library:
https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/blob/master/adafruit_circuitplayground/express.py
and you can see how it imports board and does things like configure the speaker enable pin:
https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/blob/master/adafruit_circuitplayground/express.py#L104
so if you also tried to do that after importing cpx, you would get that error about the pin already being used - because the cpx lib was using it

slender iron
steep moth
#

Hmm... Strange.

warped pendant
#

thanks so much @tidal kiln need to sleep on it and maybe just make my thing capacitive again for tomorrow - it's just a lot of rain so was trying to put it all in a ziplock. πŸ˜‰

tidal kiln
#

@slender iron no. and reading that sounds like they might be beyond the pullup error and now it's something else. but they don't say what. just "It was working then stopped working".
it's not clear what the nature of it not working now is, but it sounds different.

#

@slender iron they are not updating val in the loop

slender iron
#

@tidal kiln ok, I'll wait for them to reply before responding

stiff cedar
#

@slender iron Do you know why if I was using the gps library and tried to change the baudrate after starting the gps I would get memory allocation errors?

tough flax
#

@slender iron - should I say yes about the i2c pullup errors? I mean, we had to add external resistor & cap, right?

raven canopy
#

in case anyone is wondering:

Adafruit_CircuitPython_Bundle downloads in the past week:
{
'adafruit-circuitpython-bundle-py': 67,
'adafruit-circuitpython-bundle-2.x-mpy': 61,
'adafruit-circuitpython-bundle-3.x-mpy': 335,
'adafruit-circuitpython-bundle-4.x-mpy': 131,
'adafruit-circuitpython-bundle-examples': 65
}
#

and the PyPi downloads winner for the last week should come as no surprise:

'Adafruit_CircuitPython_NeoPixel': 151
manic glacierBOT
tidal kiln
neon briar
#

I'm enjoying working with CircuitPython on the M4 Express ( https://www.adafruit.com/product/3857 ), but I'd love to be able to run Scala native ( http://www.scala-native.org ) on something like this sooner or later. The Scala native team is working on support for 32-bit ARM, but I'm hearing recommendations of "a few megabytes" of RAM for running it. Can anyone tell me if an M4 Express with more RAM is in the works? Who could I prod to make that happen? I'd be happen to test an early version with larger RAM capacity. πŸ˜ƒ

pastel panther
#

@slender iron, I have problems

#

in this case with my new board

slender iron
#

@neon briar Its not likely because the SAMD51 tops out at 256kb memory

#

@pastel panther sounds like usb is unhappy

#

is it a '51? clock setup may be wrong

neon briar
#

ok, thx @slender iron

glacial lichen
#

Hello πŸ˜ƒ I was wondering if it is possible to flash circuitpython on a fresh https://www.adafruit.com/product/3406 that comes with the arduino bootloader without using a programmer.....? Would very much appreciate some help please!

pastel panther
#

@slender iron It is a '51. does uf2-samd include some clock setup in the board config?

#

there is this

#
 #define BOOT_GCLK_ID_CORE                 SERCOM0_GCLK_ID_CORE
 #define BOOT_GCLK_ID_SLOW                 SERCOM0_GCLK_ID_SLOW
slender iron
#

@glacial lichen it is possible but the support is very early still

pastel panther
#

and #define BOOT_USART_BUS_CLOCK_INDEX MCLK_APBAMASK_SERCOM0

slender iron
#

@pastel panther I think it just starts crystalless

glacial lichen
#

@slender iron I would need a little help with the bootloader stuff and programming. A buggy circuitpython would be okay and I am using the nordic sdk for work, just do nt have a programmer around at home

slender iron
#

did you load uf2 and a circuitpython build?

glacial lichen
#

have the page open

slender iron
#

we're mainly focussed on the 840 though since it has usb

glacial lichen
#

oh nice, thanks for the link!

#

sry, 840?

#

oh the new version

#

got it

lone sandalBOT
pastel panther
#

I can't get the bootloader to load the BLABLABOOT drive, so I haven't been able to load CP yet

#

I verified the copy of the bootloader onto the '51 with the JLink, so I'm pretty sure it's at least on there

slender iron
#

@pastel panther you can do it with jlink too

pastel panther
#

I have to give it an offset, right?

slender iron
#

@pastel panther through gdb I don't since the linker script encodes it

pastel panther
#

hmm. I've been using JLinkExe to load .bins but I can try gdb

tulip sleet
#

@tidal kiln I think the M4 erase bootloader doesn't aactually work. Not sure what the user is using.

tidal kiln
#

i think they are confusing bootloader with firmware and seeing the eraser as a cure-all

tulip sleet
#

the erase .uf2 probably doesn't work on the itsy because the QSPI pins may be different

tidal kiln
#

anyway it would mess up the bootloader?

slender iron
#

@pastel panther I like gdb because I can see how far the code gets after I start it

tulip sleet
#

the itsy m4's were shipped with an unprotected bootloader. It's possible, but I don't understand whether they no longer see ITSYM4BOOT or not

tidal kiln
#

as i understand it - they can get that ok

tulip sleet
#

they should just forget about using M4_erase.uf2 or something like that. get them away from that. I can build a special itsy m4 CPy .uf2 that erases CIRCUITPY

#

maybe they have a hard-crashing main.py

tidal kiln
#

yep. that was my general suggestion. pointed them to the itsy CP firmware, etc.

#

would a hard crashing main.py prevent REPL connect?

tulip sleet
#

possibly, I'm building a special UF2 now. Will upload it here shortly

pastel panther
#

@slender iron sorry to be that guy, but what is the gdb command to load a bin (or should it be the elf?)

tidal kiln
#

interesting - is a special UF2 the only way out then? since they can't see CIRCUITPY to rename or edit main.py

#

and can't connect to REPL

slender iron
#

same process for

#

51

tulip sleet
#

occasionally - not exactly sure why. It should go into safe mode the next time, but it doesn't

pastel panther
#

oh duh

#

🀦

tulip sleet
tidal kiln
#

does that / can that set prot bit also? in case it's not set?

manic glacierBOT
pastel panther
#

@slender iron I should probably do a DEBUG=1 build, huh?

tulip sleet
#

maybe do that first, then the ERASE-CIRCUITPY, and finally regular 3.1.1.

#

wait at least 15 seconds for the update-bootloader to finish

#

the blinking light will change when it's done

slender iron
#

@pastel panther if you want to see where the code ends up

tidal kiln
tulip sleet
#

@slender iron I cleaned out the bogus 3.1.0 release from AWS S3. I notice that none of the artifacts seem to be older than about last May. Did you clean up the S3 buckets at some point in the past?

slender iron
#

ya, I did

tulip sleet
#

ok, maybe i'll do another one with the builds with dates, from say September and earlier. aws s3 cli is kinda terrible, but I got it to do what I want

slender iron
#

k thats fine. don't delete tags though

pastel panther
#

@slender iron , it looks like it's getting to the main loop at main.c:220 on

#

so it's at least running?

slender iron
#

yup, sounds like a usb issue

tulip sleet
#

no just PR builds, etc.

slender iron
#

kk

pastel panther
#

I'm going to look at it with the microscope and the maybe try reflowing or replacing the socket?

#

if you have any tips for things to look for other than continuity or shorts, that would be much appreciated

idle owl
slender iron
#

@pastel panther thats where I would start

tidal kiln
#

@idle owl review or test? i don't have the hw.