#circuitpython-dev

1 messages ยท Page 266 of 1

meager fog
#

first step is documentaiton ๐Ÿ™‚

ionic elk
#

@meager fog sure thing. Are you still getting that I2C display error? rigging that up now

meager fog
#

@ionic elk yah i have moved on to test other sensors

ionic elk
#

oh darn it I don't have an I2C one, just the SPI version. And the little one doesn't have the I2C jumpers

meager fog
#

@ionic elk ok plz get....

#

yeah thats a good range

#

one of each, then you can test i2c/spi very well

ionic elk
#

You want me to stick to 1 or 2? With 2 I can have a parallel control with a SAMD. But either is fine

#

I'll stick to 1 that's a lot of boards

timber mango
#

Is anyone else playing with the Serpente CircuitPython boards?

tawny creek
#

@timber mango got an inquiry?

timber mango
#

Mine don't seem to be functioning like other CP boards I've used in the past. The serial port isn't responding, and the reset button doesn't respond either, but they show up as drives OK in Windows 10

tawny creek
#

how are you trying to connect via serial? Mu? Terminal?

timber mango
#

serial, the port shows up, but nothing comes across

#

Putty with 9600 baud to be specific

tawny creek
#

I haven't actually tried Putty for Cp stuff.. imma try

timber mango
#

Wait

#

What's it called when you try several times before asking for help, then it starts working?

#

Serial is responding ๐Ÿ™‚

ionic elk
#

Tuesday?

#

Everyday?

tawny creek
#

haha walkiing the duck? or something

#

Next time, try Ctrl+D or C ... maybe it was running some code? with no output

timber mango
#

It's my sample code so it's likely all me ๐Ÿ™‚

ionic elk
#

@meager fog you know what? I bet it's a timeout error

#

All hal functions have timeouts. If it takes a super duper long time, maybe it exceeded my timeout value

#

I'm going to throw in a cheap cheaty fix for it, could you try the I2C one again and let me know if it works?

#

Also, I'm sorry to ask this but could you throw in another feather in the RMA if you have one? I didn't have those stacking headers for the existing one, and I won't be able to plug in any of those nice wings ๐Ÿ˜

meager fog
#

@ionic elk i can!

#

please make sure to put RMA FORPHIL

#

and then email us ASAP

ionic elk
#

Yep I just put one in, can you pop the F405 in there?

meager fog
#

its an assembled f405 feather

ionic elk
#

you and PT are forwarded

meager fog
#

gr8

ionic elk
#

Commit with my I2C fix is also live in branch

#

Let me know if it fixes the problem. Otherwise I'll probably revert it to avoid breaking anything else accidentally

meager fog
#

ok one moment

#

im testing airlift which is intense

#

ok there's also some max-buffer issue in SPI

ionic elk
#

Ok, that's no good

#

that has a massive timeout time

meager fog
#
code.py output:
ESP32 SPI webclient test
ESP32 found and in idle mode
Firmware vers. bytearray(b'1.2.2\x00')
MAC addr: ['0xa0', '0x7c', '0x12', '0x12', '0xcf', '0xa4']
    Adafruit        RSSI: -53
    Adafruit        RSSI: -58
    embedded        RSSI: -63
    consulatewireless        RSSI: -64
    Consulate Guest        RSSI: -64
    Adafruit        RSSI: -65
    Consulate Guest        RSSI: -66
    consulatewireless        RSSI: -67
    consulatewireless        RSSI: -72
    Consulate Guest        RSSI: -72
Connecting to AP...
Connected to Adafruit     RSSI: -58
My IP address is 10.0.1.191
IP lookup adafruit.com: 104.20.38.240
Ping google.com: 10 ms
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
----------------------------------------
This is a test of Adafruit WiFi!
If you can read this, its working :)
ionic elk
#

so that can't be it

meager fog
#

but...

#
----------------------------------------

Fetching json from http://api.coindesk.com/v1/bpi/currentprice/USD.json
Traceback (most recent call last):
  File "code.py", line 54, in <module>
  File "/home/travis/build/adafruit/Adafruit_CircuitPython_Bundle/libraries/helpers/requests/adafruit_requests.py", line 270, in get
  File "/home/travis/build/adafruit/Adafruit_CircuitPython_Bundle/libraries/helpers/requests/adafruit_requests.py", line 236, in request
  File "/home/travis/build/adafruit/Adafruit_CircuitPython_Bundle/libraries/helpers/requests/adafruit_requests.py", line 220, in request
  File "/home/travis/build/adafruit/Adafruit_CircuitPython_Bundle/libraries/drivers/esp32spi/adafruit_esp32spi/adafruit_esp32spi_socket.py", line 106, in readline
  File "/home/travis/build/adafruit/Adafruit_CircuitPython_Bundle/libraries/drivers/esp32spi/adafruit_esp32spi/adafruit_esp32spi.py", line 679, in socket_read
  File "/home/travis/build/adafruit/Adafruit_CircuitPython_Bundle/libraries/drivers/esp32spi/adafruit_esp32spi/adafruit_esp32spi.py", line 315, in _send_command_get_response
  File "/home/travis/build/adafruit/Adafruit_CircuitPython_Bundle/libraries/drivers/esp32spi/adafruit_esp32spi/adafruit_esp32spi.py", line 304, in _wait_response_cmd
  File "/home/travis/build/adafruit/Adafruit_CircuitPython_Bundle/libraries/drivers/esp32spi/adafruit_esp32spi/adafruit_esp32spi.py", line 302, in _wait_response_cmd
  File "/home/travis/build/adafruit/Adafruit_CircuitPython_Bundle/libraries/drivers/esp32spi/adafruit_esp32spi/adafruit_esp32spi.py", line 254, in _read_bytes
OSError: [Errno 5] Input/output error```
#

so like, when we fetch a big-ass file, it fails ๐Ÿ™‚

#

we need to split up the SPI transactions, so when we request like, 1024 bytes

#

it will chunk em into smaller bits

#

still, very impressive it got that far ๐Ÿ˜„

ionic elk
#

Is that something the other ports can do?

meager fog
#

i dont know for sure but i assume so

#

there's usually a limit to how much a HAL can transfer in i2c/spi

#

for example the ft232h can only do max 16KB

#

that's a question scott/dan can help with more

ionic elk
#

I'm not using DMA for my current implementation

#

its possible it could do more with that

meager fog
#

that makes it easier

#

try transmitting/receiving larger and larger buffers

#

until you hit the ioerror

ionic elk
#

I'll make a project out ofit

meager fog
#

ok for now im ok with merging what we got

ionic elk
#

Yeah this is kind of unrelated

#

To flash SPI at least

meager fog
#

and make an issue to investigate - you can test the i2c buffer stuff with the OLED, and the spi buffer stuff you'll hit with the airlift

ionic elk
#

I'll make it a new issue

meager fog
#

nice!

ionic elk
#

yeah that

meager fog
#

featherwings make it easy to test, at least. pop em on

ionic elk
#

It's my first time using them, definitely looking forward to the handyness

#

Still want to make an Omnitester with Circuitpython with my crosspoint switch, but it's a bit slow going

manic glacierBOT
ionic elk
#

A board that'd let me plug any breakout in and test it

meager fog
#

intense!
ok i gotta get ready for shows

#

much success, we can now really test those peripherals

#

good work today!

ionic elk
#

Thanks! Did you get a chance to run that last I2C test before you head out?

meager fog
#

ahh i would need a binary

#

cause right now travis is failing?

ionic elk
#

oooh is travis no good

meager fog
#

it only generates files on success

ionic elk
#

I don't know what it's deal is it's griping about a file I made no changes to ๐Ÿ˜

#

Anyway we can put it off to tomorrow or whenever I know show and tell is coming up

meager fog
#

i think when you added the new SPI chip

#

maybe some entry is missing from the table

#

so its included but then causes some parsing error

ionic elk
#

Oh wait, nope yes you're right

#

I wasn't reading it properly

meager fog
#

comment

#

needs moving

ionic elk
#

yep just fixed it

meager fog
#

@ionic elk ok we can check later

raven canopy
#

AWS administration is way more involved than i imagined... ๐Ÿ˜ฌ

ruby atlas
#

@raven canopy depends what you're doing, but... ya...it is. "cloud" is not the magic panacea of simplicity that people claim it is.

raven canopy
#

hehe. i just wanted an S3 bucket to test deployments on, instead of just "pushing to prod".

#

though i will say, Azure isn't that much easier in the little experience i have there too.

errant grail
#

StringCar M0 Express: It's alive and running CircuitPython 5.0.0-alpha.4-127-g25232cc5b with just two PCB bodges. I'll submit it as a CircuitPython board after the revised PCB is tested.

#

(A scrap from the Blinka sticker was used to diffuse the 5050 DotStar.)

tawny creek
#

That's a nice tip @errant grail !

meager fog
#

@ionic elk the SSD1306 / I2C issue is now fixed, good debugigng!

manic glacierBOT
meager fog
#

@ionic elk i dont see issues you've made for the bugs we've found today

#

please put in bug/issues asap when we find them because otherwise they can be forgotten

ionic elk
#

I will first thing tomorrow, sorry! I have them all down on various post-its, I'll make sure they all go up

manic glacierBOT
#

We need to be able to choose which files to freeze and which to skip for a given frozen module. First use case: A bluefruit.py will be added to the CPX library, but there's no reason to freeze it on the CPX, since that board doesn't have BLE capability.

Originally I thought we might notate in a particular file whether it should be frozen or not for a particular board. However, it's probably easier to include some value in mpconfiboard.mk that specifies which files to skip (or include) ...

manic glacierBOT
manic glacierBOT
orchid basinBOT
manic glacierBOT
#

you're really close!
it looks like the flash memory wired as plain-SPI not QSPI, that's OK, you can use the SPI Flash setup like from the feather m0 express
https://github.com/adafruit/circuitpython/tree/master/ports/atmel-samd/boards/feather_m0_express

SPIFlash arduino library should work, if you have to have the SPI peripheral set up for use, which depends on your board definition. but if you pick the right SPI port and the right CS pin, then you should be able to read the JEDEC ID, at...

manic glacierBOT
manic glacierBOT
broken hedge
#

Hi. Iโ€™ve got about 100 CPXbfs enroute and hope to start intro exercises with new-to-code uni students. Where is the best place to share issues with CircuitPython 5a4? Will an express lib be available? When I include from adafruit_circuitplayground.express import cpx I get an error โ€œhome/travis/build/adafruit/Adafruit_CircuitPython_Bundle/libraries/drivers/circuitplayground/adafruit_circuitplayground/express.py", line 53, in <module>
ImportError: no module named 'audioio'โ€. Was going to use Bluetooth so I have been assuming sticking with v5 makes sense, but advice is appreciated. Thx

stuck elbow
#

@broken hedge I think the adafruit_circuitplayground.express library doesn't have support for the bluefruit boards yet

manic glacierBOT
#

The MINIMAL_BUILD flag currently removes a number of modules by default that are not HAL dependent. These include OS, Struct, Storage, and potentially others. Modules that aren't dependent on a common-hal component should be sorted out and not excluded via MINIMAL_BUILD, which will be less confusing for new port builds and remove unnecessary restrictions on ongoing ports like the STM32.

#

For boards like the F411, which do not have SPI or QSPI flash available, the internal filesystem is currently very slow, since the flash library as written does not contain a cache and writes inefficiently. Additionally, boards with dedicated CCRAM like the F405 should use it to enable use of larger 64KB flash sectors for the filesystem, and even boards without it can make use of at least a 16KB chunk of larger sectors to free up more filesystem space.

#

Current implementation of the STM32 has too much overlap of features that are related to a specific MCU package (such as pin definitions, available peripherals, etc) vs a specific development boards (Status LEDs, clock settings, debugging availability).

All features that are directly related to the board should be sorted to the board module, leaving only MCU-specific features in the peripherals directory. Additionally, a better package/pin sorting system should be implemented in the Micro...

ionic elk
#

@meager fog if you have a minute today, you could check out my commit to #2186 and see if it solves the SPI data cap issue

manic glacierBOT
meager fog
#

@ionic elk will do!

#

i got the feather working with micropython last nite, was fun!

#

today will try arduino

#

@ionic elk solved!

#
----------------------------------------
{'time': {'updated': 'Oct 3, 2019 16:32:00 UTC', 'updatedISO': '2019-10-03T16:32:00+00:00', 'updateduk': 'Oct 3, 2019 at 17:32 BST'}, 'disclaimer': 'This data was produced from the CoinDesk Bitcoin Price Index (USD). Non-USD currency data converted using hourly conversion rate from openexchangerates.org', 'bpi': {'USD': {'code': 'USD', 'description': 'United States Dollar', 'rate_float': 8177.78, 'rate': '8,177.7767'}}}
----------------------------------------
Done!```
ionic elk
#

is that the SPI block?

meager fog
#

yah

#

i will try even chunkier SPI transfers

#

but it was choking there

#

before

ionic elk
#

Yay!

meager fog
#

ill try an eink next

ionic elk
#

Ok yeah so it sounds like it was just the timeout triggering on really big transfers

#

I took it up from like 2ms to 500 so that should cover everything... right?

#

No 1 second long single I2C transfers I should be worrying about?

meager fog
#

500ms is plenty for now

#

lets see, if we have 100khz that would be...

#

10 kbps

#

5KB - yeah i think thats ok

#

is there a way to know if it was a timeout from the HAL

#

or a general failure?

manic glacierBOT
meager fog
#

@ionic elk ok with that PR done, whats next?

ionic elk
#

Cleanup or UART/DAC?

#

I put up a bunch of issues this morning

#

Some higher priority than others

meager fog
#

ok lets look!

#

alright dont forget to add an issue for the missing 'random' module

#

thats not os.random its different

ionic elk
#

Ohhh

#

Is random HAL dependent? Does it fall under #2191?

meager fog
#

i dont know

#

sry

ionic elk
#

That's fine. Let me do that one right now, I think this is a pretty high priority/low effort issue

meager fog
#

okidoke

ionic elk
#

For the others, anything in particular you'd like me to tackle right now, or should I just skip right to UART?

#

And do them after DAC?

meager fog
#

@ionic elk nah skip em, go to UART

ionic elk
#

Sounds good, I'll get right to work then.

meager fog
#

add an issue to remind yourself to add the default I2C/SPI/UART busses

#

so you can call board.I2C()

ionic elk
#

yeh it's up there

meager fog
#

k thanx

#

yep uart is next!

meager fog
#

there's RX/TX uart pins

ionic elk
#

You want me to do the defaults today too?

#

also easy

meager fog
#

nah not necessary

#

might as well wait till uart is done

#

then do it after, so its easy to test completely

ionic elk
#

reasonable

meager fog
#

uart will likely be a fairly straightforward peripheral

ionic elk
#

here's hoping, I said that about I2C, and then I ran into the eratta x_x

meager fog
#

nahh i2c is always the worst

#

uart is so old, we really figured that sh out

ionic elk
#

@meager fog should I wait on @slender iron to submit the SPI PR or do it now?

meager fog
#

@tidal kiln ok when ya hav ea moment lets archive that max library

#

and then i hvae a QUEST

#

@ionic elk leave the PR as is - when he's available he'll review it. you can work on UART in a separate branch/PR

#

yay

tidal kiln
#

@meager fog ok. gotta go deal with a water/house thing. want me to ping you later?

meager fog
#

@tidal kiln yes! ill do the issue be-closing

#

and you can maybe decide on the QUEST

tidal kiln
#

w0rd

meager fog
#

its optional side quest but i think fun

slender iron
prime flower
#

@slender iron Thx, replying after lunch. I know the issue, libs arent up to date (new version of mmqt needs to match up with latest esp32spi)...shouldnt have broke though

manic glacierBOT
pearl notch
#

@idle owl , @slender iron , @errant grail Hi again. I added some timings to the note playing code and discovered that, as I originally thoughtโ€”though as a result of a faulty reading of the codeโ€”a new sample is generated for each pair of start_tone/stop_tone. Take a look: ```
def stop_tone(self):
โ‹ฎ
self._sample = None

Without regenerating, things are much faster.

Generate sample: 0.092773 Start (including generating): 0.0947266 Stop:0.0107422
Start: 0.000976563 Stop:0.0332031
Start: 0.000976563 Stop:0.0458984

Perhaps I should create an issue for this, where I can document everything in one place, and get advice.
manic glacierBOT
#

I don't understand why we'd ever be explaining that only part of the library is available - the things added to the bluefruit module will not work on the CPX anyway. None of the current example code will change. I wanted to keep it together because we designed this library to be expandable and I want to use it that way. The naming convention makes sense. I feel a separate library could prove to be confusing if/when someone tries to use this library on the CPB since it is named Adafruit_Circ...

tough flax
#

Great new on the XAC support changes! Thanks @tulip sleet and @slender iron!

manic glacierBOT
meager fog
#

@slender iron we need to have pulseio for stm before we can enable displayio rite?

manic glacierBOT
#

I was thinking about a library kind of like the Crickit library, not necessarily Circuit-Playground dependent, so yes, it could be separate. But a CPB-dependent library could know about the accelerometer, etc. (but maybe it shouldn't).

This is probably not the place to discuss the library. I opened this issue on a mistaken assumption about a decision, so I think I'll close it for now.

slender iron
#

@meager fog ya, for backlight I think

#

@pearl notch interesting! Ya, an issue would be good

pearl notch
manic glacierBOT
pearl notch
#

Thatโ€™ s a simple, compatible change to stop_tone, adding a clear_sample keyword parameter:

def stop_tone(self, clear_sample=True):
    if self._sample is not None and self._sample.playing:
        self._sample.stop()
        if clear_sample:
            self._sample.deinit()
            self._sample = None

But perhaps the sample never needs to be cleared. Iโ€™ll create an issue.

manic glacierBOT
#

I'm thinking that if any of these values are set, then USB_RELATIVE_EP_NUM should be 0, since join_interfaces() is either going to renumber interfaces or it isn't. So I don't think you need a separate --relative_ep_num argument.

I think ideally the validation in the scripts would do the following: if any *_EP_NUM_* is set, then it should be the case that all used EP_NUM values should be set, and it should be an error if they're not. Since not all devices might be enabled, you do...

#

Note that if you format the filesystem with Arduino, it may not set the fslabel to CIRCUITPY like the formatter in CircuitPython will. It should still show up though I think.

One thing to try is from the REPL do:

import os
os.listdir()

That will tell you if CircuitPython sees the flash but the USB isn't happy.

You can also try formatting the flash from CircuitPython with these instructions: https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#easiest-way-use-...

meager fog
#

@ionic elk ๐ŸŽŠ ok how is UART looking

ionic elk
#

I've gotten my control setup done, and then took a quick diversion to get that random PR up

#

Moving on to reading the HAL docs now

meager fog
#

@ionic elk kool thanx

tidal kiln
#

@meager fog ping. ok. im back.

meager fog
#

@tidal kiln hihi ok i archived the max31855 repo so thats done

#

so if you have, say, an FT232H, you can control neopixels with it

tidal kiln
#

side quest accepted

meager fog
#

first thing you have to verify is that bytes are sent in perfect sequence

#

start with making a simple SPI writing test that writes 3 bytes, look at the clock pin, it should be a contiguous square wave

tidal kiln
#

for the neopixel timing requirements

meager fog
#

@tidal kiln yes

tidal kiln
#

@meager fog ok. added a basecamp. so can add progress updates there, etc.

meager fog
#

@tidal kiln nice!

tidal kiln
#

and thanks for doing the housekeeping on the old MAX repo

meager fog
#

@tidal kiln yep! next is LSM303

#

but ya can take a break to do this more-fun-hacking quest ๐Ÿ™‚

#

@tidal kiln do you have an LSM303 sensor? if not plz order

tidal kiln
#

yep. have a PID1120.

pearl notch
#

I havenโ€™t yet clearly explained what Iโ€™ve done, but perhaps some of @slender iron , @idle owl , @tulip sleet , and @errant grail will take an early look. https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/pull/71

ionic elk
#

@meager fog should I be using ST's UART or USART drivers for the module? They're distinct on the F4. USART is a superset with the synchronous option but is higher power than the UART.

meager fog
#

@ionic elk higher power is ok

raven canopy
amber bronze
#

Hopefully multi-line suggestions is soon to follow ๐Ÿ™

manic glacierBOT
ruby atlas
#

it's odd to click in here and see recent activity be mine...

crimson ferry
#

@sly falcon I'll be afk again this w/e, but Discord mention will get my attention ๐Ÿ™‚

sly falcon
#

@crimson ferry sounds good. I didn't have time this week to do more than read some code...I'm planning on actually doing some coding this weekend ๐Ÿคž hope you have a good weekend!

crimson ferry
#

@sly falcon Thanks. You too. I'll be around more after this one for awhile.

pearl notch
#

Back on the CPX audio fun: A square wave requires just two points per sample (vs. 100 currently used for the sine wave), and itโ€™s much louder. @idle owl, did you consider other waveforms than sine?

meager fog
#

@pearl notch doesnt sound as nice ๐Ÿ™‚

stuck elbow
#

actually I like square wave sound more, it's more like computer games

manic glacierBOT
pearl notch
#

Hi @meager fog. Are you speaking generally, about the sound of square waves vs. sine waves, or after hearing the sound from this program running on a CPX? I can see the sine and square waves on ground and A0 on the oscilloscope (thanks @errant grail , for that suggestion), but when I record the sound coming from the speaker and look at that wav file in Audacity, the waveforms look very different. I assume itโ€™s because of resonance or something.

errant grail
#

@pearl notch In my experience, square waves are harmonically rich and can pierce through the spectral bandwidth limitations of some speakers. Depending on the output device, the fundamental musical tone of a square wave can occasionally be obscured, depending on frequency. A triangle or sawtooth waveform may be a way to compromise, preserving more of the root tone (that a sine wave naturally produces) while maintaining enough harmonic content to help with listenability.

pearl notch
#

Interesting, @errant grail , thanks!

slender iron
#

@tulip sleet I realized that scan() should return an iterator in the shower this morning

#

that way you can read results as they come in

meager fog
#

@ionic elk hihi lemme know if yr workin today and how UART is going

ionic elk
#

@meager fog workin, punchin in pin defines and excessive macro ifdefs

meager fog
#

@ionic elk okidoke!

#

let me know when you want me to test a PR and ill toss it onto my feather

ionic elk
#

@slender iron I'm getting weird non-ascii stuff in my terminal instead of my messages. It didn't happen with the atmel feather. Do you have any ideas what that could be? Stuff like "hัช(Ajm&--hัช(Ajm"

slender iron
#

is that over usb or uart?

ionic elk
#

UART

slender iron
#

with uart it's likely a baudrate mismatch

ionic elk
#

that's what I thought but everything is lined up

slender iron
#

how are you printing it?

#

maybe you are interpretting bytes as unicode?

ionic elk
#

I tried moving it to ASCII, but I just get different garbage

slender iron
#

what is producing the uart data?

ionic elk
#

It's the HAL_UART_Transmit() function, which transmits an array of uint8_t, running on the F405

#

It produces the same characters if I pass in a b"string" in my python code, or if I declare a const char array "string" in c right before the transmit function and pass that instead. So at least it's consistent.

slender iron
#

and then you read it back in on rx?

ionic elk
#

I'm reading it with an ft232. But that's a good idea, I should try a linked transfer and see what that looks like

#

oh, hmmm. We don't have a uart transfer function

slender iron
#

maybe the transmit is the incorrect baudrate

#

a logic analyzer can usually guess the baudrate

ionic elk
#

Yeah I can try that next

#

I notice the UART management is very different from the I2C and SPI systems across both ports. NRF uses interrupts, and atmel also seems to have an unusual buffering system.

#

Whereas ST just handles it the exact same way as the other two. So I'm struggling a little bit to make it fit, because there's no way of knowing in ST land how many characters you received, for instance.

#

I might have to go LL again for this one

slender iron
#

that seems weird it doesn't tell you character count

ionic elk
#

Yeah they just... don't have it.

#

I'll look into how micropython does it

slender iron
#

what function are you using for it?

ionic elk
#

HAL_UART_Transmit()

#

just to get things up and running - there are IRQ and DMA options as well, as with all STM32 peripherals

#

Seems that micropython goes the raw register route, and just cycles waits on the TXEmpty and RXNotEmpty flags to read things one at a time.

slender iron
#

ah, and always reads the full length?

manic glacierBOT
slender iron
#

@ionic elk you can always read one byte at a time

ionic elk
#

That's true, I could have a blocking loop for it. That won't play nice with reading from itself, though I guess that's not a huge priority

slender iron
#

write blocks anyway

ionic elk
#

So if I tried to write to myself, it would never complete, right? Because the write would be waiting on read? (I can read through the whole documentation of it again, just trying to get a sense)

#

I should just look at the HAL transmit_recieve function, see how that does it

slender iron
#

I wouldn't worry about it. in practice you'll never do that

#

whether it works depends on the implementation and if it buffers the read

raven canopy
raven canopy
#

nope. nevermind. it just returns the status.

manic glacierBOT
#

@tannewt I revised my test which was missing several module dependancies. USB HID and MIDI are out, but Storage and Random only rely on stub-level implementations of Microcontroller and OS (they use functions that use only CMSIS or don't suffer from being empty/returning 0). Should we consider these stubs a part of the "base build" of Circuitpython? Or should I exclude them?

timber mango
#

Do you wait for the tx buffer to clear? Don't know how big it is, may e 1 byte? This definitely works on STM32F407:

ionic elk
#

Yeah checking the flags is no problem. I'll simply have to loop and increment how many bytes have been read.

meager fog
#

@ionic elk hi did you get baudrate for uart going

#

im outta meeting now

swift arrow
idle owl
#

@swift arrow For the BLE lib right now, you want the pre-release which is only available at the link you included.

tulip sleet
#

@slender iron I started pulling the thread on moving vfs from extmod, and it continues to unravel, because most of the file reading/writing code in various native modules is oofatfs-specific. Looks like I really should make all that code be filesystem-agnostic, so I'll start to do that. If you have any comments let me know.

#

OnDiskBitmap and AudioFile and main.c are using oofats calls, but probably should be using stream objects, to generalize the reads.

raven canopy
#

@gilded cradle we're were both ๐Ÿ‘€ like a hawk i'm sure. this is a good sign:

creating circup-0.0.3/circup.egg-info
copying files to circup-0.0.3...
copying CHANGES.rst -> circup-0.0.3
copying MANIFEST.in -> circup-0.0.3
copying README.rst -> circup-0.0.3
copying circup.py -> circup-0.0.3
copying setup.py -> circup-0.0.3

๐Ÿคž

gilded cradle
#

It worked

raven canopy
#

๐ŸŽ‰

swift arrow
#

@idle owl I got it working. I am doing the Blog tie thing from John Gallaugher.. except only using the CPX bluefruit's Neopixels. It's very cool.. I have gotten it to lock up, so I'm curious if that happens to others.

#

Traceback (most recent call last):
File "code.py", line 241, in <module>
File "/home/travis/build/adafruit/Adafruit_CircuitPython_Bundle/libraries/helpers/bluefruitconnect/adafruit_bluefruit_connect/packet.py", line 128, in from_stream
File "/home/travis/build/adafruit/Adafruit_CircuitPython_Bundle/libraries/helpers/bluefruitconnect/adafruit_bluefruit_connect/packet.py", line 89, in from_bytes
ValueError: Bad checksum

raven canopy
#

@swift arrow /home/travis/build/adafruit has me rather confused... leads me to believe that its due to how the bundle is being created. looking at the code though, nothing is jumping out at me that would cause a namespace to look like that. i'll dig more over the weekend (but i have no hardware to test with)

swift arrow
#

@raven canopy it's the adafruit_circuitpython_ble that we have to get from outside the regular lib bundle.

raven canopy
#

right. but it runs through the same bundler script as the "big bundle" when its released. all of which happens on TravisCI.

swift arrow
#

ah

#

I have not looked at the source.. but what if it did get a bad packet.. should it error out or just drop it and wait for the next?

#

since it is in a library.. there is nothing a user can do

raven canopy
swift arrow
#

if a bad packet was to come in

raven canopy
#

on the user side, you could wrap it in a try and catch the ValueError.

swift arrow
#

hmmm.. maybe I will "try" and modify the test code I am using to use a try.. and see if that helps

raven canopy
#
try:
     packet = Packet.from_stream(uart_server)
except ValueError:
    continue # or pass or however you want to handle it
#

gotta run. ๐ŸŽฅ time...

swift arrow
#

thanks for the ideas!

#

so far so good.. just had to change one part of the code.

#

if this keeps working I'll let John know for his guide that is on the Adafruit Blog

upbeat plover
#

will that new I2C security chip be able to store secrets.py for wifi logins?

manic glacierBOT
#

Hi there

I'm having a similar issue. I have connected the RFM96W according to the tutorial here: https://learn.adafruit.com/lora-and-lorawan-radio-for-raspberry-pi/raspberry-pi-wiring. I have two of these modules, one of them is detected but one of them keeps spitting out this error. Is it possible that the module is broken? How can I test if the module is actually broken? Could it be another issue? Your help would be appreciated. Thanks.

manic glacierBOT
manic glacierBOT
quasi fjord
#

@upbeat plover maybe, but it wouldn't gain you much because you'd still have to read it into python and send it to the esp in the clear. If your WiFi is a complicated enterprise setup that uses certificates you could probably extend the ESP firmware to request that python ask the security chip to do the certificate authentication magic, but ain't nobody got time fo that.

pearl notch
quasi fjord
#

you're probably hitting the mechanical limits of the buzzer. It's probably incapable of moving any more air

pearl notch
#

Thanks, @quasi fjord . An experiment comes to mind: try again in warmer air, or helium.

manic glacierBOT
pearl notch
errant grail
#

@pearl notch Interesting experiment but not too surprising given the increased spectral energy of the square wave as compared to sine and triangle waveforms.

broken hedge
#

@swift arrow thanks for improving the Python tie with the try. Just merged. I was noticing too many presses from Bluefruit crashed things. This is helpful. Cheers!

swift arrow
#

@raven canopy and I were discussing if it was an issue with the library and he was just like "why not try a try" ๐Ÿ™‚

#

I learn a lot hanging around here. That is a great project/Guide you made. Kudo's!

#

I changed it to just use the neopixels on the CPX Bluefruit as I really wanted to learn about BLE. Very cool stuff

idle owl
#

<@&356864093652516868> Here is the notes document for Mondayโ€™s CircuitPython Weekly meeting. Everyone is encouraged to attend! Please add your hug reports and status updates even if youโ€™ll be attending the meeting - itโ€™s super helpful! If you are unable to attend but would still like to include updates, feel free to include them in the notes and Iโ€™ll read them off during the meeting. Hope to see you there! https://docs.google.com/document/d/1suvCpQSY2tuw4wjyZ9G-BFId2iovcZSiA07r3W7gmrs/edit

gilded pewter
#

which microcontroller supports cicruitpython and has the capability of wireless programming like ble?

exotic pumice
#

nrf52840 has ble

ruby atlas
#

@slender iron I've managed to make subclassing mostly work for pixelbuf. The one thing left is figuring out how to call a python override from the native class? I've tried mp_load_method then mp_call_method* and mp_call_function_1 but feel like mp_load_method is the wrong thing here. I'm spending some time in the debugger hoping to figure out the right calling convention ๐Ÿ™‚

slender iron
#

@ruby atlas I've not done it before myself. I think it's something like that

ruby atlas
#

@slender iron any tips for debugging what object instance self_in refers to in gdb? ๐Ÿ™‚

raven canopy
#

@ruby atlas i've used display pointing at the object struct indexes...

ruby atlas
#

@raven canopy what file should I look at? (I'm working on making _pixelbuf subclassable, and i'm having issues calling the python show() method from the native PixelBuf class. Specifically, from non-subclassed methods on the native, I'm trying to call the .show() during auto_write=True)

raven canopy
#

my best guess would be pixelbuf_pixelbuf_type. so with an instance of pixelbuf created, and the board halted, i'd try:

display pixelbuf_pixelbuf_type[0]->auto_write
#

gdb will save the display entry, and auto show it on every break. (iirc, this is automatic..)

gilded pewter
#

can u upload code through bluetooth for nrf52840?

raven canopy
#

@gilded pewter do you mean upload a file (code.py)?

gilded pewter
#

yes? (just to know i never worked with circuit python)

#

for some ble controller, u can upload code through arduino sketch without wire, some thing like that

raven canopy
#

i was more trying to get to a clearer question, as i am not all that up-to-date on the BLE stuff.

i think your arduino reference would be more of an over-the-air firmware update. i'm almost 100% sure we can't do that (yet). there is a mobile app under development to remotely update the program to run (code.py or main.py).

gilded pewter
#

main.py is where you write you code right? so u can update that through blue tooth?

ruby atlas
#

@raven canopy i'll try display. i'm used to using print

raven canopy
#

@ruby atlas print would probably work too... ๐Ÿคท

ruby atlas
#

@raven canopy 4: *self = {base = {type = 0x3fa7c <pixelbuf_pixelbuf_type>}, pixels = 32, bytes = 96, pixel_step = 3, byteorder = { bpp = 3 '\003', byteorder = {r = 2 '\002', g = 1 '\001', b = 0 '\000', w = 0 '\000'}, has_white = false, is_dotstar = false, order = 0x376}, bytearray = 0x20002cd0, rawbytearray = 0x20002d00, brightness = 0.049999997, two_buffers = true, offset = 0, rawbuf = 0x20002e70 "", buf = 0x20002e10 "", write_function = 0x0, write_function_args = 0x0, auto_write = true} now the question is - is that the subclass or is that the native? ๐Ÿ™‚ Or are they the same?

raven canopy
#

๐Ÿ

#

thats the only answer i have. ๐Ÿ˜„

ruby atlas
#

llol

#

@idle owl can attest to the llol

#

at least i no longer feel bad about poking around in the dark here

raven canopy
#

thought: i don't expect it to work, but maybe just try print pixelbuf_pixelbuf_type without the index? it might just print the whole kit-n-kaboodle.

and yeah, if Scott hasn't seen it...i definitely haven't. ๐Ÿ˜„

ruby atlas
#

I think I'm going to need to set breakpoints within the bytecode executor...

#1  0x0002293a in pixelbuf_pixelbuf_subscr (self_in=0x20002ef0, index_in=<optimized out>, value=0x20002d50)
    at ../../shared-bindings/_pixelbuf/PixelBuf.c:430
#2  0x00015778 in mp_obj_subscr (base=0x20002ef0, index=<optimized out>, value=0x20002d50) at ../../py/obj.c:493
#3  0x0002688a in instance_subscr (self_in=0x20002c20, index=0x20002d60, value=0x20002d50) at ../../py/objtype.c:853
#4  0x00015778 in mp_obj_subscr (base=0x20002c20, index=<optimized out>, value=0x20002d50) at ../../py/obj.c:493
#5  0x00035ae8 in mp_execute_bytecode (code_state=code_state@entry=0x2002fe88, inject_exc=<optimized out>, inject_exc@entry=0x0)
    at ../../py/vm.c:467
#6  0x00036d28 in fun_bc_call (self_in=0x20029980, n_args=<optimized out>, n_kw=1, args=0x0) at ../../py/objfun.c:284
...```
#

I feel like self_in=0x20002c20 might be what I want, not self_in=0x20002ef0 but not sure yet

raven canopy
#

need a good canary...

ruby atlas
#

i misread that and thought you said cannery.

#

but no, you mean the relative of a ๐Ÿฆ†

raven canopy
#

well, it might help. Balmer thought so.. ๐Ÿป

onyx hinge
idle owl
#

@onyx hinge Sounds good! Keep having an amazing time!

slender iron
#

@ruby atlas the first member of all object instances should be a pointer to the type

#

if it says pixelbuf then it's native already

#

@gilded pewter Updating over ble is not currently possible but I'm working on adding it alongside some refactoring

ruby atlas
#

@slender iron hmm... i'm actually trying to call a non-native subclass method from the native method. When I invoke a helper (see below) from pixelbuf_pixelbuf_subscr (on the native), it seems to call the native method, not the python subclass method.

mp_obj_t call_show(mp_obj_t self_in) {
    mp_obj_t dest[2];
    mp_load_method(self_in, MP_QSTR_show, dest);
    return mp_call_method_n_kw(0, 0, dest);
}

specifically, what I wanted to be able to do is have

class NeoPixel(_pixelbuf.PixelBuf):
    def show(self):
        neopixel_write(self.pin, self.buf)

as the glue to write pixels in neopixel.py

gilded pewter
#

@slender iron sounds good.. please give update when u guys are done!!

#

I have seen some companies doing with at command

umbral abyss
#

Can CircuitPython be used to generate a 2MHz toggling IO on a SAMD21 (aka Trinket M0)?... I've used the simpleio.tone library to generate kilohertz signals. Is there a library for MHz outputs?

raven canopy
#

@umbral abyss 2MHz is about the max i ever got out of the M0 using pulseio.PWMOut

quasi fjord
#

I don't think 2MHz is unreasonable, because the hard work is done by the TCC module not python anyway

slender iron
#

@ruby atlas seems like that should work to me. I'd expect self in to have the subclass type.

#

@gilded pewter I'd suggest following the circuitpython release notes. my plan is to have a custom ble service for circuitpython that enables it

ruby atlas
#

@slender iron i'll spend more time in the debugger tomorrow evening ๐Ÿ™‚ Unfortunately, i'm pretty sure I won't make tomorrow's weekly.

slender iron
#

kk, feel free to add notes though! I'm excited to hear how things are coming along

orchid basinBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
ionic elk
#

@tulip sleet the new tinyusb/dcd update has broken usb for the F412 - was there a piece of upkeep I was supposed to do but missed?

plucky flint
#

@idle owl @slender iron alas (again!), the combination of my son, Tae Kwon Do and my ability to drive him places has misaligned so I won't be able to make today's meeting. However, I've added stuff to the doc linked to above. Thanks!

manic glacierBOT
#

Sadly, this has broken USB on the STM32F412, by excessively restricting the FS endpoints. There are 6 FS endpoints on the F412, should be enough to support all circuitpython devices. Specific error:

0x0804a8aa in dcd_edpt_open (rhport=0 '\000', desc_edpt=0x8068862 <usb_desc_cfg+194>) at ../../lib/tinyusb/src/portable/st/synopsys/dcd_synopsys.c:273
273	  TU_ASSERT(epnum < EP_MAX);
ionic elk
#

^it isn't the ST definition, my bad

#

does have something to do with endpoint count though.

manic glacierBOT
idle owl
#

@plucky flint No worries! Thanks for adding updates to the notes!

ionic elk
#

@tulip sleet how would I go about making the autogen of the usb descriptor a prerequisite for make? Having to make clean and recompile everything just to get the usb descriptor seems like it ought to be fixed, but I'm not sure how python stuff is triggered via the makefile.

tulip sleet
#

@ionic elk it already is, but maybe there are some missing dependencies (like, it should be dependent on the script)

#

i'll look

#

@ionic elk it's in supervisor/supervisor.mk

ionic elk
#

does make just not recognize changes to it because it's a py file?

tulip sleet
#

the depedencies look ok; are you saying it doesn't get rebuilt properly if you change the script?

ionic elk
#

yes

#

never

tulip sleet
#
# autogen_usb_descriptor.intermediate: ../../tools/gen_usb_descriptor.py Makefile | $(HEADER_BUILD)
slender iron
#

does it have to do with the .intermediate? I'm not sure what that does

ionic elk
#

also, I found the usb issue - Audio is taking 2 endpoint slots

#

I was under the impression it was supposed to take 1

#

and that only CDC was supposed to take 2

tulip sleet
#

there is some weirdness i had to add re intermediate; I don't remember why I did that

#

i'll try to reconstruct why it's the way it is

ionic elk
#

@tulip sleet sorry, on the USB-audio issue or the regen issue?

tulip sleet
#

| $(HEADER_BUILD) means it's an "order-only" prerequisite

ionic elk
#

Gotcha. Would I just activate that via an ENV flag HEADER_BUILD=1?

tulip sleet
#

@slender iron did the MIDI stuff; usb-audio needs two endpoints for MIDI

ionic elk
#

Oh. Well crap then yeah we can't support that on basically any ST chip

tulip sleet
#

well, if someone needs it they can drop HID

slender iron
#

I don't remember

tulip sleet
#

i think you saw the same two-endpoint thing with all the USB-to-MIDI adapters you tried?

#

i have an elderly USB MIDI device I can extract the desciptor from, but I'm not sure we'll discover anything we don't already know.

ionic elk
#

I don't know what's up in the python, I only see a single endpoint address described

tulip sleet
#

@ionic elk yeah, that's why I put in the compile-time choice, and we would like to have a run-time choice

#

of HID devices

ionic elk
#

And the debugger is slightly weird about it. It doesn't increment through them the way it does with CDC, the assert for the endpoint pops up only once, but it's at 2 already

#

@tulip sleet oh sure I meant that I don't see how audio is taking 2 endpoints

#

I don't see the descriptor for the second one, unless it runs it twice?

tulip sleet
#

there's an audio midi interface and an audio control interface; you need both. this is vaguely like why CDC needs two

ionic elk
#

Ok. I feel weird that I didn't pick that up when we talked about this before, I could have sworn it was only CDC that needed 2. Did this only come up recently?

#

But in any case, mystery solved, etc.

#

it was old man MIDI all along

tulip sleet
#

yeah, I just plugged in my ancient MIDI USB dongle, and it asks for two interfaces, according to wireshark

idle owl
#

@gilded cradle Have a minute to test my audio setup with me for the meeting?

ionic elk
#

Ok, so the official baseline for Circuitpython's endpoints is 7 including control. To clarify, this will exclude all STM32 chips except the F446/69/79

gilded cradle
#

Sure @idle owl

ionic elk
#

@gentle bronze I notice that tusb is capping out for the F405 at 4 endpoints, which implies it's stuck in FS mode and not touching HS, which has 6 endpoints - is this changeable by a setting?

tulip sleet
#

@ionic elk I think we don't have to say that's the "baseline". We have been able to have MIDI in the past due to lotsa endpoints. We can say in the doc (and set in the makefiles) that MIDI is not included in the STM builds by default.

#

i thought F405 had no PHY for the HS endpoints

#

i think hathach tried some tricks on that, but failed to get it to work

ionic elk
#

We might have covered that and I forgot. What's the PHY? I don't think I ever asked.

tulip sleet
#

the electrical driver circuit that you'd connect the socket to

ionic elk
#

Oh so as in "Physical"?

tulip sleet
#

right

ionic elk
#

Weird, why even have the HS at all then? In any case, not a big deal.

gentle bronze
#

@ionic elk hs usb on f405 has more endpoints, but require external PHY to operate at highspeed mode.

tulip sleet
#

it has data lines, but they need some circuitry to actually talk to a USB cable

ionic elk
#

Ah, gotcha. So it's an additional circuitry thing

gentle bronze
#

Though many people mentions that it is possible to have the hs usb work with builtin PHY (full speed), but I failed when giving a try

tulip sleet
#

why they left it off, I dunno, since it's a pain otherwise. It might have been a chip design issue

#

i certainly wouldn't set out to spec a chip that needed off-chip PHY

gentle bronze
#

It probably need external rc or something but I am not sure. I am not an hw expert ๐Ÿ™‚

ionic elk
#

Well, if you have the time @gentle bronze it might be a nice feature, since it'll let us get HID on there alongside CDC and MSC. But it's not too big a deal.

#

I can look into the guts as well

gentle bronze
#

I tried but I really need an board that physically work first though.

ionic elk
#

Some Discovery boards might support the PHY, I'll look into that

#

This probably occurs on the F407 and F427 too, so I'm sure it's not the first time anyone's run into it.

tulip sleet
#

the pyboard has this problem, and there are ways to specify which combo of HID devices

gentle bronze
#

@ionic elk I will check to see if there is any dev board that we can test with the hs core

#

Though it is up to @meager fog to decide on the pcb hw

pastel panther
manic glacierBOT
modern wing
#

Good afternoon all you wonderful people! I'll be lurking today, nothing to share other than a desire to listen in and catch up on what's going on. ๐Ÿ™‚

gilded cradle
#

If anybody else is lurking please let me know so I can update it in the meeting notes. Thanks!

river quest
#

@gilded cradle have the notes link handy? need to add mine

gilded cradle
#

or feel free to put it in the docs yourself. ๐Ÿ™‚

trim elm
#

It's pinned

gilded cradle
modern wing
#

Loud and clear @idle owl

stuck elbow
#

good evening

river quest
#

i'll be a couple mins late but there in a few mins

idle owl
#

@river quest No worries

modern wing
#

๐ŸŽต

stuck elbow
#

"no one listens to my lyrics, they just want to see me dance"

modern wing
#

Former high school & college musician here -- did bass clarinet & bari sax (along with other clarinets and saxes) in concert, ensembles, musicals, etc. Some of the most fun I've had.

tidal kiln
#

lurking

trim elm
#

Lurking

modern wing
#

๐Ÿ‘ @gilded cradle

errant grail
#

^ "You're never more than a half-step away from the right note."

modern wing
#

@errant grail And if you are, call it "jazz" ๐Ÿ˜›

river quest
#

hi

ivory yew
#

I'm gonna lurk as well.

slender iron
#

yay!!

ivory yew
#

Also, hi!

slender iron
#

๐Ÿ‘‹

turbid radish
#

Lurking

river quest
#

hi @ivory yew !

turbid radish
#

Hi Thea!

river quest
ivory yew
#

Oh rad. ๐Ÿ™‚ Thank you so much.

river quest
#

stories about cats are good too

turbid radish
#

Equal Dog and other pets lovers too

river quest
#

Happy Ada Lovelace Day! TOMORROW!
Ada Lovelace Day (ALD) is October 8, 2019, it is an international celebration of the achievements of women in science, technology, engineering and maths (STEM). It aims to increase the profile of women in STEM and, in doing so, create new role models who will encourage more girls into STEM careers and support women already working in STEM - findingada.com.

#

Thank you Mitsuharu Aoyama, CircuitPython book is out
https://ameblo.jp/steamtokyo/

turbid radish
#

Would love if Adafruit carried the shirt

river quest
turbid radish
#

I did too

river quest
#

EuroPython 2019 videos posted
https://www.youtube.com/user/PythonItalia/videos
Talks include: Radomir Dopieralski โ€“ Game Development with CircuitPython, Nicholas Tollervey โ€“ Tools of the Trade: The Making of a Code Editor, Florian Wahl โ€“ Building logistics applications with MicroPython and ESP32 MCUs, and Ben Nuttall โ€“ Astro Pi: Python on the International Space Station.

modern wing
#

๐Ÿ“ฐ ๐Ÿ‘

river quest
#

thankya!

ivory yew
#

alpha worked really well for my project. ๐Ÿคท I'm almost sad I haven't found bugs.

slender iron
#

don't worry, you'll find some

#

most of the churn is on the nrf though

pearl notch
manic glacierBOT
#

We're currently using the mbedTLS implementation of the TLS and SSL protocols on the ESP32 Co-Processor/AirLifts by communicating with an ESP32 running nina-fw from CircuitPython. While this solution is stable, a native CircuitPython SSL/TLS library would be faster, remove the hardware dependency for an ESP32 and allow for different transports (not just wifi).

Some embedded ssl/tls implementations:
BearSSL: https://bearssl.org
AxTLS: http://axtls.so...

pearl notch
#

Amazing how many accomplishments people have.

modern wing
#

It's a side effect of gathering a group of talented, caring people and setting them loose on a worthwhile project ๐Ÿ™‚

tidal kiln
#

oh yah. thanks for testing neopixel spi @gilded cradle

gilded cradle
#

yw

raven canopy
#

now, breathe.... thanks for speaking for all us no-shows/no-mics, @idle owl!

pearl notch
#

The BLE work sounds fun

errant grail
prime flower
#

@pearl notch I've seen the bubblesort dance video during a lecture, it stuck with me ๐Ÿ™‚

stuck elbow
#

yes

gilded cradle
#

No

ionic elk
#

Hang on bad discord

turbid radish
#

no

slender iron
#

I can't

ionic elk
#

UGH DISCORD

#

Yeah come back to me

#

soryr

#

ok I might be good when jason is done

slender iron
#

yes! that'd be cool

old smelt
#

Thanks!

#

Have to get to a 2:00pm meeting. Have a great week, all!

raven canopy
#

SysTick is already highest priority on the NVIC, iirc.

errant grail
#

Yes, an external speaker sounds quite nice.

slender iron
raven canopy
#

Right, but pewpew13 isn't a defined board.

stuck elbow
#

what does it compile?

#

I see, should I make a PR for removing it?

#

I'm fine with just one version

#

and it takes up resources

slender iron
stuck elbow
#

But there is no PewPew 13.x board

#

10.x is the last one

slender iron
stuck elbow
#

thanks

raven canopy
#

๐Ÿ‘‹ thanks everyone!

errant grail
#

Thanks!

gilded cradle
#

Thanks everyone

pearl notch
#

Thanks! So long.

modern wing
#

Thanks!

ionic elk
#

cheers !

idle owl
#

@pearl notch Can you hop back in for a moment

pearl notch
#

One sec

modern wing
#

๐Ÿ”ฅ ?

idle owl
#

I could hear you

#

Can't hear you now

#

I can hear you again.

idle owl
#

@pearl notch I can type it out, it's not a huge deal.

modern wing
#

I'm gonna drop -- ya'll have a nice one, thanks again. Stay safe @slender iron

idle owl
#

@gilded cradle Thank you again for taking notes!

slender iron
#

@modern wing it's 8 blocks away and lots of fire folks are on it

pearl notch
#

Done. Thanks.

idle owl
#

@pearl notch Thanks so much for doing that!

pearl notch
#

Quality. ๐Ÿ™‚

manic glacierBOT
#

I've tried modifying the code for playing wav files, but notice on the fifth button press things seem to crash, with a buzzing sound from the speaker & the sound playing continuously. Sprinkling in print statements shows it hits audio.play(wave) before choking, so maybe this a bug in the current libs? Ctrl-C stops in the while audio.playing: loop. Here's a GitHub repo that has the short file (detects a button A press as well as A1 cap touch), and plays two sounds based on the current CPXb tut...

marble hornet
#

@idle owl I though cirpy gfx development was ceased when displayio was released?

idle owl
#

@marble hornet What is the context you're referring to

marble hornet
#

The recent issues filed on the gfx repo

idle owl
#

I'll need to look into it, but you may be right. In which case we need to at least update the README to reflect that, or deprecate the library.

#

@slender iron The Adafruit_CircuitPython_GFX lib - is that deprecated by displayio?

manic glacierBOT
slender iron
#

it won't be deprecated until blinka has displayio as well

idle owl
#

@slender iron Ok thanks.

tulip sleet
#

@slender iron re the BLE scanning iterator: I think it might be good to have a timeout specified so that if no advertisement is received within the timeout, it either terminates, or it returns None. It also doesn't necessarily have to be a real iterator (though that's elegant): it could be a function that takes a timeout value (optional) and returns either the next scan entry or None.

slender iron
#

ya, it's still possible to provide the timeout when starting the scanning

tough flax
#

3 BLE CPX's on the way! (Yay! AT w/iOS just got lots simpler!)

slender iron
#

it'll just return STOP_ITERATION in that case

ionic elk
#

@slender iron I thought I could figure this out from the other ports but I guess I'm stumped. What exactly is the expected behavior of busio_uart_read? I thought it was to attempt to read anything off the UART line and return 0 if it didn't find anything. But it's causing all kinds of weird behavior even when returning 0. How do I get it to just be inert if there's nothing on the UART line to read?

slender iron
#

lemme look

orchid basinBOT
slender iron
ionic elk
#

Yeah that's what I have

#

the error code passing, etc

slender iron
#

what is the behavior you are seeing?

ionic elk
#

It's constantly acting as though empty material has been sent,

#

so a lot of spaces, etc

#

is that the expected behavior, though? It should just ignore the return if it has that error attached, right?

slender iron
#

are you returning MP_STREAM_ERROR?

ionic elk
#

yes

#

It might be the HAL being annoying though on closer look

idle owl
#

I am unreasonably excited about this.

manic glacierBOT
onyx hinge
#

I bet all my tests construct the audio object just once...

#

@ivory yew great blog post and welcome to the discord community!

ivory yew
#

Thank you. :3

timber mango
#

MP_STREAM_ERROR is not 0 though, it's -1 (but as unsigned)

onyx hinge
#

I think it would be reached after 4 never-free objects were listed, but it looks like only displayio is using this feature, so it doesn't happen in practice

manic glacierBOT
#

The full report from scan-build-7 is here: http://media.unpythonic.net/emergent-files/sandbox/report-3d3d49.html#LN954

Basically, in the case where the first block of 3 "never free" objects is filled, the code needs to allocate a new block and hook it into the linked list that goes via the [0] index of each block. The logic to chain the blocks together erroneously tries to use current_reference_block[0] but current_reference_block is guaranteed to be NULL at this point, by the cond...

onyx hinge
#

OK now it won't be forgotten

manic glacierBOT
onyx hinge
#

hm except a number of tests fail.

#

๐Ÿ˜–

#

wait, they fail at adafruit master as well

#
pass  micropython/viper_binop_multi_comp.py
b"(<class 'ZeroDivisionError'>, ZeroDivisionError('division by zero'))\n(<class 'ZeroDivisionError'>, ZeroDivisionError('division by zero'))\n(None, None)\n"
### Actual
b"(<class 'ZeroDivisionError'>, ZeroDivisionError('division by zero',))\n(<class 'ZeroDivisionError'>, ZeroDivisionError('division by zero',))\n(None, None)\n"
FAIL  misc/sys_exc_info.py
``` this ring any bells?
#

the difference is an extra comma in the repr of ZeroDIvisionError, I think

#

oh it's a python3 incompatibility

#

3.7: ```>>> ZeroDivisionError("test")
ZeroDivisionError('test')

3.5: ```>>> ZeroDivisionError("test")
ZeroDivisionError('test',)
raven canopy
#

pyenv to the rescue... ๐Ÿ˜„

onyx hinge
#

travelling by train in japan + hacking on circuitpython = living the dream

raven canopy
#

look! i'm on a train. well, my words are... ๐Ÿ˜‰

onyx hinge
#

too bad that the station where I decided to stage my photo was kinda ugly

raven canopy
#

i still haven't been to Japan. def need to get there some day.

onyx hinge
#

I recomend it for anyone who enjoys travel, it has been pretty amazing. there are streets clogged by western and chinese tourists, but there are also neighborhoods that look exactly like what you see in 20th/21st century movies and anime. I'm even learning enough to appreciate the shrines and temples.

#

and you can absolutely do it without more japanese than "please/thank you/excuse me/1/2/3"

#

and did I mention the food?

raven canopy
#

Japanese presentation of anything is always so appealing.

onyx hinge
#

In an American restaurant, all the plates would be the same boring style. Here, you get 9 things in 9 bowls that don't match and it's beautiful

#

train's arriving soon, ttyl!

raven canopy
#

๐Ÿ‘‹

#

and coincidently, i just hit a Python 3.7 syntax error with something. async is now a keyword, so using it as a function kwarg is apparently frowned upon.

manic glacierBOT
manic glacierBOT
gentle bronze
timber mango
#

I'm running into an error building ports/unix
../../py/sequence.c: In function โ€˜mp_seq_multiply_lenโ€™: ../../py/sequence.c:40:5: error: implicit declaration of function โ€˜__builtin_mul_overflowโ€™ [-Werror=implicit-function-declaration] if (__builtin_mul_overflow(item_sz, len, &new_len)) {

onyx hinge
#

@timber mango first guess would be gcc version incompatibility. What compiler are you using?

timber mango
#

@onyx hinge clang version 3.4.2 under centos 7.7

#

I was able to compile micropython with it but not circuitpython.

onyx hinge
#

@timber mango it's possible that circuitpython is using gcc extensions not in clang, but I don't know the specifics about __builtin_mul_overflow. patches to build on more compilers would make great pull requessts.

wind trellis
#

@timber mango I ran into that using GCC but not a super recent version. Looks like __builtin_mul_overflow() premiered with GCC 5 and is also reported to be in newer Clang releases. Wikipedia says 9.0.0 is the current stable so updating probably fixes it. Or you can do what I did, because I'm naughty, and make this change in circuitpython/py/sequence.c:// Detect when a multiply causes an overflow. size_t mp_seq_multiply_len(size_t item_sz, size_t len) { #if 0 size_t new_len; if (__builtin_mul_overflow(item_sz, len, &new_len)) { mp_raise_msg(&mp_type_OverflowError, translate("small int overflow")); } return new_len; #endif return item_sz * len; }

manic glacierBOT
tough flax
solar whale
tulip sleet
#

We've seen ...BOOT visible - gotta go out in a minute but I believe it's visible. There are issues with the .Trashes file on iOS. We use a .Trashes file (not dir) to suppress having a trash can on iOS, but it's confusing iOS.

solar whale
#

OK -- I have to go as well -- will try again later

prime flower
#

We're going to need a larger ceiling...

tulip sleet
#

@solar whale there is an issue with the USB descriptor asking for too much power, we need to fix the bootloader

manic glacierBOT
ionic elk
#

@tulip sleet @slender iron could I talk to one of you about UART on a call today? I've got a basic UART system working ok, but the existing port code makes it seem like a LOT more is going to be required. Would like to go over priorities.

slender iron
#

@ionic elk I can chat in 10 minutes or so

tulip sleet
#

@ionic elk i'm also avail

ionic elk
#

Ok let me chat with @slender iron first if that's ok Dan, your code is a lot more complex due to the IRQ and buffer structure.

tulip sleet
#

np

manic glacierBOT
slender iron
#

@ionic elk ok, at my desk

ionic elk
#

Ok I'm around, should we just do the discord call thing?

#

or actually let's just hop in circuitpython

slender iron
#

๐Ÿ‘

manic glacierBOT
ionic elk
#

@tulip sleet Ok chatted with Scott and it looks like we definitely should talk! Can you hop in CircuitPython?

#

(chat channel)

timber mango
#

@wind trellis That was my temporary fix as well.

swift arrow
#

How can we listen in to the CP chat?

#

or is it over ๐Ÿ™‚

slender iron
#

@swift arrow voice channel in the list on the left

tulip sleet
#

this is not a meeting chat ; we are talking development

idle owl
#

@gilded cradle Blinka question. Do you know if we have the following working yet: USB HID, pulseio, analogio. (I know we don't have displayio yet)

timber mango
#

The 'better' fix to compile circuitpython's port/unix on Centos 7.7 turned out simply using a newer compiler the the default.

yum install centos-release-scl yum install devtoolset-8 scl enable devtoolset-8 -- bash source /opt/rh/devtoolset-8/enable

And compile as usual.

gilded cradle
#

@idle owl, sorry. Discord didn't ping me. I think pulseio is present for some boards, but I don't think the other stuff is working yet.

idle owl
#

Ok, I'll call it a no across the board for now.

gilded cradle
#

Ok then

idle owl
#

I went through the PyPI spreadsheet from that project, and there are a few libs that are marked as on hold waiting on Blinka support for the things I listed, so I wanted to check whether it was worth adding them yet. It is not if it isn't consistently supported.

gilded cradle
#

Yeah, the main problem is that so many boards/os combos support things differently.

idle owl
#

Understandable

gilded cradle
#

Just getting the basics like I2C/SPI, and UART working can be a challenge, so we've had to mark some boards as not supporting it if the steps to get it working were way too complicated for the average user.

idle owl
#

Ah. That makes sense.

solar whale
#

@tidal kiln just hooked up an ft232h to my Linux box and tried "blinka" blinka So far just blinking and LED and read from an adt7410 temperature sensor. Works great!!

errant grail
manic glacierBOT
#

I was wondering if it is possible to connect an external SPI Flash module (I was looking at one that uses the Winbond W25Q64) and communicate with it in CircuitPython and over USB? In particular I was looking to do this with the ItsyBitsy M0 Express.

I am new to CircuitPython but have been trying to pour over the docs and repo to see what I can find. I found this issue #1764 which is similar, but it seems that it is still on the 'long term' milestones list.

I would gladly try to take th...

manic glacierBOT
#

That is not currently possible. You can mount an external file system (easiest to do currently with an SD card) to be visible to your code, but it won't be accessible over USB to your computer.
I suppose the easiest way that would work out of the box is to use an SD card, and use an external SD card adapter to put the files on it.
You could also probably replace the flash chip on your ItsyBitsy with a bigger one (most of them have the same pin-out), but I'm not entirely sure what sizes are ...

slender iron
#

thanks @errant grail !

solar whale
#

@prime flower Is there an "official" place to grab the 1.4.0 version of the nina firmware?

#

In fact, I don't see it in the nina-fw repository to build.

#

ah -- found it PR-11 -- not yet merged -- I'll try to test this tomorrow.

manic glacierBOT
#

Thank you both for your quick responses!

I understand what you are saying, the SD card option did seem the most straight forward approach. I was trying to keep the price of the project down as much as possible and wanted to put it in an enclosure. For those reasons I was leaning away from an SD card. I also don't think I personally would be able to replace the flash chip on the ItsyBitsy since it is physically smaller than on some of the other express boards.

So even though this functio...

manic glacierBOT
#

The CIRCUITPY filesystem that is exposed via USB is a single FAT filesystem. The USB mass-storage mechanism ("MSC") exposes a block-oriented low-level view of a single disk (and therefore a single filesystem, or at best multiple filesystems on a single block-oriented device). USB MSC cannot present a unified view of all the mounted filesystems, unless it somehow pretended it was one disk, which would be very tricky.

It would be nice if the USB interface were file-oriented, instead of block...

manic glacierBOT
prime flower
#

@solar whale it will be merged tomorrow, binary will be released under Releases for now until we have a travis script to build it

#

not sure how many nina-fw build's we'll actively be releasing so that's where they'll be for now

solar whale
#

working so far -- have not tried new stuff, just making sure nothing broken....

prime flower
#

I checked a bunch of pre-existing tests, but please break things if you can ๐Ÿ˜„

manic glacierBOT
torpid osprey
#

I could use some feedback on my project was thinking of going with the SAMD51 But anyone else have any thoughts. Does anyone know if circuit python would work with this. I have no experience with it

#

Open Power is about providing Makers, Students, and Hobbyist with a Portable, Versatile Intuitive and Cheap power supply for all their projects.

Prototype 1: Simple and Cheap Constant Voltage/ Constant Current Power Supply variable from 0.6V to 12V with led voltage indicat...

manic glacierBOT
manic glacierBOT
#

Gotcha, I didn't realize all of those endpoints are set even when not in use.

I have another idea for how I can at least "expand" my flash storage. If I connect the SPI Module (Winbond W25Q64 or W25Q128 if I want 16MB) to the board and then modify the Itsy Bitsy's mpconfigboard.h to use the external flash module rather than the onboard flash, I should be able to use the external module just like the onboard flash is normally used. In this case the onboard flash would not be used by CP bu...

meager fog
#

@tidal kiln hiya not sure if yr around, i was just testing my USB C FT232H and all is good - was gonna try neopixels next

manic glacierBOT
#

Add support for Spresense. It is a compact development board based on Sonyโ€™s power-efficient multicore microcontroller CXD5602. This port uses the built and exported NuttX SDK.

Supported features:

  • analogio
  • board
  • busio
  • digitalio
  • microcontroller
  • os
  • pulseio
  • rtc
  • supervisor
  • time

Unsupported features:

  • audioio
  • audiobusio
  • i2cslave
  • rotaryio
  • touchio
  • gamepad
  • neopixel_write
  • nvm
  • displayio
  • freqencyio

Refer to [developer.sony.com/devel...

stuck elbow
#

@torpid osprey does it have an USB port?

onyx hinge
#

Seems like the latest prototype schematic shows the USB data pins as no connects

onyx hinge
#

#almostontopic spotted some Python being used to set up an art exhibit at the 21st Century Museum of Contemporary Art in Kanazawa Japan

torpid osprey
#

@stuck elbow Yes it is on the bottom though

stuck elbow
#

as long as you can connect your computer to the usb, you should be able to run circuitpython on it

trim elm
#

Does anyone have an ili3940 screen that would be willing to test an example from the circuitpython_gfx library?

manic glacierBOT
trim elm
#

sorry, I meant ili9341

prime flower
#

@trim elm did you find one?

trim elm
#

@prime flower no

solar whale
#

@prime flower Just FYI -- I seem to get fewer "failed to find SSID" errors with IDF3.3 than with 3.2. I often have seen those when connection to my AP -- When I build nina 1.4 with 3.3 I just accepted all the default changes to the sdconfig. seems to be working well. Not a big deal and no reson to rush to 3.3, but it does seem to help with that one issue I have seen.

#

@prime flower do you have an example of how to use the new certificate feature in 1.4 ?

prime flower
#

@solar whale I do in MiniMQTT

#

Didnt release yet but it's merged, you'll need latest ESP32SPI. I'm assembling an AWS IoT library the next two days for CircuitPython

#

How are you building nina with 3.3, btw?

solar whale
#

great -- thanks -- I'll take a look

#

just downloaded the IDF 3.3 (as the repo says but use 3.3 instead of 3.2) and did make clean/make firmware -- accept all the default changes to sdconfig.

prime flower
#

I may have been building nina-fw 1.4 with 3.3 in that case...

solar whale
prime flower
#

Yeah, I have been. I'm going to release fw 1.4 with ESP-IDF 3.3

solar whale
#

cool!

prime flower
#

We're not "shipping" (as in physically shipping from the factory) fw 1.3.1, so I'll release 1.4 for those who want it and see if people hit issues with 3.3. I noticed the increase in AP-connection-stability as well

solar whale
#

I have it running on sevreal boards -- Airlift breakout, airlif featherwing, Airlift shield , metro_m4_airlift and a huzzah esp32.

prime flower
#

I do want to add pre-shared-keys (PSK) to WiFiClientSSL, though.

#

Mosquitto uses it, but it seems that's one of the only brokers so far. Most commercial IoT brokers use a root CA cert and device cert/key pair.

solar whale
#

I have to do some reading re:certs -- all a black box to me.... looking forward to learning....

prime flower
#

It's a black box I've been trying to make more transparent ๐Ÿ˜„

solar whale
#

I have to go off for a while - more time to play later...

#

@trim elm I have a tft featherwing (ili9341) and can do some testing this afternoon.

tidal kiln
#

@solar whale cool. thanks for trying out ft232h.

prime flower
#

@solar whale Going to do a fresh install of esp-idf 3.3 so I can get these instructions correct for everyone ๐Ÿ™‚

crimson ferry
#

@prime flower I'd like the NINA pin read changes we're working on to use 3.3 as well. I haven't built NINA before, can beta test the new instructions.

prime flower
#

@crimson ferry I'm about to PR a 3.3. sdkconfig and readme update.

#

running tests to ensure I dont break things first, one of the new sdkconfig options will free up 10k of IRAM which is great for us.

#

@crimson ferry I'll have build instructions in the PR, I've made it easier with the makefile that's currently within master (make firmware, make load-passthrough, make load-nina, make load-circuitpython), keep in mind you'll need a UF2 for the USB/Serial passthrough and CircuitPython UF2

crimson ferry
#

Ah yes, I used to have some standalone ESP32s wired up as Airlifts, but they've all been repurposed now (I'm setting up an array of wi-fi station probe request detectors to triangulate on where some unknown probe requests are coming from ๐Ÿ˜‰

prime flower
prime flower
crimson ferry
#

@prime flower Process question... The version shows 1.4.0 in CommandHandler.cpp, but I didn't see CommandHandler.cpp in the files changed. Should we update version number when code or build changes, since either will result in a unique binary whose version can be queried by CircuitPython? Or does the build process change that version number in CommandHandler.cpp?

prime flower
#

Do you have the latest master?

#

I manually set the version number in CommandHandler.cpp and Partitions.csv before bumping the version

crimson ferry
#

Maybe I'm mising something, I'm a bit of a n00b still at github.

prime flower
#

I didn't update to 1.4.1 or something similar since no code changed, just the build environment

crimson ferry
#

Right, that's my point... even a build change will result in a unique binary (different hash), and could affect functionality, even if no core code changes... shouldn't it deserve a new version number?

prime flower
#

It should, I didn't release a binary of 1.4.0 yet, though

crimson ferry
#

ah, gotcha

prime flower
#

You are correct, I just didnt want to release firmware (it's manual rn for nina-fw) until I had a binary built with 3.3 for the wifi patches

crimson ferry
#

cool, much ado about nothing... thanks!

prime flower
#

np!

#

thanks for bringing it up to me

manic glacierBOT
prime flower
crimson ferry
#

Cool! Would it make sense to put the shipping binary there too? (1.2.2, I think)

#

@prime flower If I read all of that right, there are three procedures to upgrade NINA firmware... one for all-in-ones (e.g., *passthru.UF2 on PyPortal), second using SerialESPPassthrough.ino and esptool onto a separate Airlift co-processor board, and third (implicitly) using esptool directly on a standalone ESP32 board like ESP32 Huzzah Feather or ESP32 Huzzah Breakout.

idle owl
#

@hexed pawn Thank you for writing a driver for the MCP9600. It is my understanding the updated board will be in the store this week. Until then, I can work with you to get a PR in for the driver. You'll submit it to this GitHub repo: https://github.com/adafruit/Adafruit_CircuitPython_MCP9600 There are step to follow to get it set up for a PR involving using a tool called cookiecutter to create the base set of files we include, and then you'll have to go through and update those files. We have a guide that covers a lot of it, but I am also available to discuss it if you run into issues or if you learn better that way. Let me know when you're around and ready, and I can point you to the right places to get started.

crimson ferry
#

@prime flower How are the separate co-processor boards wired differently to the all-in-ones such that the *passthru.UF2 process wouldn't work?

meager fog
#

@ionic elk hiya are ya hackin today

ionic elk
#

@meager fog hiya I'm hacking away

#

Just about done with DAC, had to put UART on hold until I get the GPS

prime flower
#

@crimson ferry the passthrough process works, with those too - the uf2 file can be obtained by loading the Serialpassthrough ino file via arduino onto the board, then double clicking RESET to launch into BOOT. Then use that CURRENT.UF2

solar whale
#

@prime flower Nice job on the new commit/release -- just built and loaded to an Airlift shield - on a GCM4 - no problems.

prime flower
#

The all-in-one-boards have fixed pinouts, compared to how someone might wire up a shield or wing so it's easier to provide a Uf2 for them.

slender iron
#

catalina hates arm gcc ๐Ÿ˜ฆ

prime flower
#

@solar whale thanks!

solar whale
#

@slender iron glad I waited ....

slender iron
#

will try the latest and see if it's signed

#

#compilerupgrade

solar whale
#

was going to try it later today -- I have a spare system to test on -- it has catalina on it now but I need to do a full install of the build tools -- will give it a try later today or tomorrow,

#

@prime flower serailpassthrough.ino worked fine on the GCM4

crimson ferry
#

@prime flower Pin differences could be a bear, but I was just thinking that someone who does CP but not Arduino may want to easily update their Airlift FeatherWing on a Feather M4, or their Bitsy Add-On.

solar whale
#

just had to set pins

prime flower
#

Yeah, I have a UF2 for the FeatherWing that I reuse during building nina-fw (see the Makefile in nina-fw for how it's used)

crimson ferry
#

Since those pinouts are fixed for the wings, I wonder if there could be standard UF2s for those, so CP people don't have to install and learn Arduino.

prime flower
#

There could be, I'll a TODO. The shield gets reused btween diff form factors (uno/gc)

#

some people use the wings with female-to-male headers, to breadboard

crimson ferry
#

True, there are tons of variations. Before all the airlift stuff, I had a Feather M4 + Feather ESP32. I don't recomment it.

prime flower
#

You can use miniesptool, the guide doesnt list it bc it's a lot slower than esptool

crimson ferry
#

Nice! Speed probably less of an issue for someone who doesn't have an Arduino env.

idle owl
tidal kiln
#

yep. should. header pins are common on all pis.

idle owl
#

Ok thanks.

tidal kiln
#

except for some very early ones, but doubt you'll ever run into those, they're rare, museum pieces

idle owl
#

Right. We still sell the tinier version of that too.

stuck elbow
#

I have one of those, only a little burned

#

(I didn't understand why using 5V signal on a 3.3V device is bad back then)

idle owl
#

Now you know!

stuck elbow
#

it worked fine for a year!

tidal kiln
#

"tinier" = for the 2x13 header?

idle owl
#

Yah.. I thought it was shorter.

tidal kiln
#

yep. even those pins are common.

#

the newer models with 2x20 header simply added additional pins

idle owl
#

Ah. explains the "downgrade cable".

tidal kiln
#

but there are some super early revs where a few pins on the 2x13 changed

idle owl
#

Ahh ok

#

@tidal kiln Do you have a TMP006 sitting around?

#

And an RPi.

tidal kiln
#

probably and yes

#

let me check

idle owl
#

Do you mind testing it with Blinka and a fritzing diagram I did?

#

I don't have a Pi set up here yet. Ordering it now, but would rather not wait.

tidal kiln
#

yep. have 006 and 007.

idle owl
#

Updating the 006 guide with CircuitPython/Python usage.

tidal kiln
#

are you putting together a Pi set up for general testing?

idle owl
#

I will be, yes.

#

Well to continue the PyPI project we started and never finished.

#

Which means testing sensors on Pi with Blinka.

manic glacierBOT
#

This PR adds dual channel DAC support to STM32 boards that support the feature, such as the STM32F405 found on the Pyboard and Feather F405. Both channels can be used simultaneously.

@tannewt let me know if you'd like me to add a struct in here that tracks whether each channel is on, and de-inits the clock if both are turned off. I haven't seen a lot of meta-level tracking of what features are on or off on the common-hal layer so I wanted to check if you thought that was a good idea style...

tidal kiln
#

makes for a nice tidy pi testing setup

idle owl
#

ahhhhh ok

ionic elk
#

@meager fog DAC PR ready to test as soon as CI is done

idle owl
#

@tidal kiln Kind of like the plate like that for the Metros?

tidal kiln
#

yep

#

do you need the TMP006 tested with a specific model Pi?

idle owl
#

No. Simply tested in general.

#

Can you still mount a Pi 4 on that plate? Have you tried?

tidal kiln
#

yep. they also standardized the mounting hole pattern. somewhere around B+?

idle owl
#

Ah nice ok

tidal kiln
#

what's the code to test with TMP006?

idle owl
#

or hold on

#

I made the REPL test simpler

meager fog
#

@ionic elk nice, the 405 has 2 dacs

#

@ionic elk did you get storage included as a module?

ionic elk
#

Yes, I sorted out all the modules that should be included with every board last week

meager fog
#

awesome! plz ping me whe its ready to test

#

im gonna send the feather 405 out for fab soon

#

did you find anything you want fixed/adjusted?

ionic elk
#

I don't think I have any input besides moving the SWD header slightly. It's pretty nice the way it is

tidal kiln
#

@idle owl sorta worked. got a few random i2c comm errors on temperature read:

OSError: [Errno 121] Remote I/O error

investigating...

idle owl
#

Hmm ok

#

Thanks for looking into it

tidal kiln
#

yay. must've just been wiring and/or breadboard.

#

re-did the setup and it's working fine now

#
pi@raspberrypi:~ $ python3 tmp006_simpletest.py 
Object temperature: 26.025*C / 78.845*F
Object temperature: 26.139*C / 79.051*F
Object temperature: 26.390*C / 79.502*F
Object temperature: 26.958*C / 80.524*F
#

and via REPL:

pi@raspberrypi:~ $ python3
Python 3.7.3 (default, Apr  3 2019, 05:39:12) 
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import board
>>> import busio
>>> import adafruit_tmp006
>>> i2c = busio.I2C(board.SCL, board.SDA)
>>> sensor = adafruit_tmp006.TMP006(i2c)
>>> sensor.temperature
26.47104378525455
>>> sensor.temperature
26.402765856877352
>>> sensor.temperature
26.266072340923756
>>> sensor.temperature
26.2762707720172
>>> sensor.temperature
26.25347433579782
>>> sensor.temperature
26.116588253247926
>>> sensor.temperature
26.207866122041878
#

@idle owl โฌ†

idle owl
#

@tidal kiln Thank you so much!

tidal kiln
#

np

manic glacierBOT
ionic elk
#

@meager fog give that attached binary a shot when you have a minute.

meager fog
#

@ionic elk will do, gotta get a TFT going ๐Ÿ™‚

manic glacierBOT
#

Ok, so the build is failing because the ST hal doesn't include empty defines for boards that don't support the DAC, like the F412 and F411. However, since there's no way to exclude the Analogio module specifically without also excluding analogin, I'm forced to add ugly #if defined(HAS_DAC) statements around everything.

If there's a more elegant way to not included the entire incompatible AnalogOut module, please let me know.

#

The problem is that "stm32f4" is kind of not sufficiently fine-grained. We do have similar #if or #ifdef stuff to differentiate between SAMD21 and SAMD51 in the atmel-samd common-hal. So this is not unprecedented.

If you want to make it a little neater you could do something like:

#ifdef HAS_DAC
void common_hal_analogio_analogout_construct(analogio_analogout_obj_t* self,
        const mcu_pin_obj_t *pin) {
    // regular impl
}
#else
void common_hal_analogio_analogout...
hexed pawn
#

Thanks @idle owl I'll look at the learning guide and let you know if I get stuck along the way.

idle owl
#

@hexed pawn Do you need the link? Also let me take a look at it quickly and make sure there aren't any caveats. It has been updated piecemeal along the way but we may have missed something.

ivory yew
#

Heh I was just looking for this guide myself.

manic glacierBOT
meager fog
#

@ionic elk ok i am floating back to this now

#

so

#

should i wait for a new bin

#

or use the one u attached

ionic elk
#

@meager fog attached one is fine

#

all this other stuff is just compiler nonsense

meager fog
#

okidoke

#

@ionic elk hmm testing ...

#

isnt working?

#

oh wait no it is

#

ignore me

#

lol

#

@ionic elk tested!

#
from analogio import AnalogOut

analog0 = AnalogOut(board.A0)
analog1 = AnalogOut(board.A1)

while True:
    # Count up from 0 to 65535, with 64 increment
    # which ends up corresponding to the DAC's 10-bit range
    for i in range(0, 65535, 64):
        analog0.value = i
        analog1.value = 65535-i
idle owl
#

Welcome @ivory yew and @swift arrow to CircuitPythonistas! We're super happy to have you!

swift arrow
#

lol @ivory yew that's awesome

ivory yew
#

I'm just super stoked that it comes with a purple username.

idle owl
#

Right?

swift arrow
#

@tidal kiln and @ivory yew it worked!!!! my new PR worked in one try!

ivory yew
#

Rad!

#

๐Ÿ‘

swift arrow
#

So much time and energy wasted doing it the wrong way.. gitdesktop for the win!