#circuitpython-dev

1 messages Β· Page 130 of 1

manic glacierBOT
unique turret
#

So I am almost finished with my thermometer, but ran into an issue with the Adafruit MCP 9808. It has been getting colder here and temperatures below 0 C do not have a negative sign when I poll my sensor.

#

Here is a look at some data that should continue down but does not:

#

Sorry for putting that data twice.

#

This is how I read the sesnor: with busio.I2C(SCL, SDA) as i2c: #read the current temperature t = adafruit_mcp9808.MCP9808(i2c) tempf= fahrenheit(t.temperature) tempc= t.temperature

#

Is there another value ( 1, -1) that I should be pulling from the sensor?

manic glacierBOT
solar whale
#

@unique turret I think there is an erro in the CP code for this ```def temperature(self):
"""Temperature in celsius. Read-only."""
self.buf[0] = 0x05
with self.i2c_device as i2c:
i2c.write(self.buf, end=1, stop=False)
i2c.readinto(self.buf, start=1)

    # Clear flags from the value
    self.buf[1] = self.buf[1] & 0x1f
    if self.buf[1] & 0x10 == 0x10:
        self.buf[1] = self.buf[1] & 0x0f
        return 256 - (self.buf[1] * 16 + self.buf[2] / 16.0)
    else:
        return self.buf[1] * 16 + self.buf[2] / 16.0
tidal kiln
#

@solar whale i'm looking too, what do you see?

solar whale
#

I think it should be; ```def temperature(self):
"""Temperature in celsius. Read-only."""
self.buf[0] = 0x05
with self.i2c_device as i2c:
i2c.write(self.buf, end=1, stop=False)
i2c.readinto(self.buf, start=1)

    # Clear flags from the value
    self.buf[1] = self.buf[1] & 0x1f
    if self.buf[1] & 0x10 == 0x10:
        return (self.buf[1] * 16 + self.buf[2] / 16.0) - 256
    else:
        return self.buf[1] * 16 + self.buf[2] / 16.0```
#

compare to C++ lib ``` float temp = t & 0x0FFF;
temp /= 16.0;
if (t & 0x1000) temp -= 256;

return temp;```

tidal kiln
#

hmmm. datasheet:

if ((UpperByte & 0x10) == 0x10) {    //TA < 0Β°C
  UpperByte = UpperByte & 0x0F;   //Clear SIGN
  Temperature = 256 - (UpperByte x 16 + LowerByte / 16);
} else {                           //TA > 0Β°C
  Temperature = (UpperByte x 16 + LowerByte / 16);
}
solar whale
#

sorry - my suggestion is not right, but still the code is missing something. thinking...

tidal kiln
#

@solar whale i agree though, the CP and C++ code look different, also thinking...

solar whale
#

right - I can't make sense of the data sheet.

#

when the sensor goes negative it should read 0x1fff( 13 bit 2's complimnet) if you strip of the sign bit you get 0xfff and and then divide by 16 to make an 8 bit value 0xff 0r 255 which shoul dbe interprted as 255 - 256 = -1 -- the data sheet says it is 256 - 255 which is 1 but that is wrong.

opaque patrol
#

@solar whale If subtracting 256 results in the correct temperature, then that is the correct order

#

Occam's razor πŸ˜ƒ

unique turret
#

Thank you all for troubleshooting this issue!

solar whale
#

if you look at the box in the upper right of the datasheet page I think I see the problem they don't strip the sigh bit off the upper bit in that algorithm so ther is an extra 256 that is not being subtracted in the code.

#

I think the datasheet code example is just wrong.

#

so I think this would work ``` def temperature(self):
"""Temperature in celsius. Read-only."""
self.buf[0] = 0x05
with self.i2c_device as i2c:
i2c.write(self.buf, end=1, stop=False)
i2c.readinto(self.buf, start=1)

    # Clear flags from the value
    self.buf[1] = self.buf[1] & 0x1f
    if self.buf[1] & 0x10 == 0x10:
        return (self.buf[1] * 16 + self.buf[2] / 16.0) - 256
    else:
        return self.buf[1] * 16 + self.buf[2] / 16.0```  I can test it tonight.
#

sorry not right

#

mixed my fixes.

#

this is what I meant ```def temperature(self):
"""Temperature in celsius. Read-only."""
self.buf[0] = 0x05
with self.i2c_device as i2c:
i2c.write(self.buf, end=1, stop=False)
i2c.readinto(self.buf, start=1)

    # Clear flags from the value
    self.buf[1] = self.buf[1] & 0x1f
    if self.buf[1] & 0x10 == 0x10:
        return 256 - (self.buf[1] * 16 + self.buf[2] / 16.0)
    else:
        return self.buf[1] * 16 + self.buf[2] / 16.0```
#

leave the msb in place.

tidal kiln
#

@unique turret could you test?

unique turret
#

@tidal kiln I will test this in about 30 mins.

#

Should I comment out the mcp9808 library in my code? And paste this into my code as a replacement?

tidal kiln
#

change is only one line

#

sry. line 98 (fixed)

solar whale
#

I think my suggestioin is flawed because it reuslt in an 8bit (2's compliment value) that is 255 is -1 but the return type is is not really an 8 bit sighned value. It's hrd to know what python is doing with types! . I think the case like the C++ is the way to go - strip the MSB then subtract 256

#
        """Temperature in celsius. Read-only."""
        self.buf[0] = 0x05
        with self.i2c_device as i2c:
            i2c.write(self.buf, end=1, stop=False)
            i2c.readinto(self.buf, start=1)

        # Clear flags from the value
        self.buf[1] = self.buf[1] & 0x1f
        if self.buf[1] & 0x10 == 0x10:
            self.buf[1] = self.buf[1] & 0x0f
            return (self.buf[1] * 16 + self.buf[2] / 16.0) - 256
        else:
            return self.buf[1] * 16 + self.buf[2] / 16.0```
#

so just change line 99 to moke it subtract 256 rather than subtract from 256.

#

sorry for all the false starts....

opaque patrol
#

I just plugged in my circuit playground express and typed in help("modules") in the repl, The list seems to include more items than I remember

#

I don't remember seeing anything in "examples/" before

#

now I have examples/click, examples/spinner and examples/spinner_advanced...

solar whale
#

@opaque patrol is this a new build of CP - what version - are you importing anything when you start up?

opaque patrol
#

I might have a newer version of the libraries

solar whale
#

but the libraries should not show up in help("modules")

opaque patrol
#

right, it still shows the version number as 2.1.0, would that be different if I had put a newer uf2 file on? I could have and just forgotten

#

Anyway, the reason I was looking....Is there a builtin map() function?

solar whale
#

ReadtheDocs implies that it should be there but I can't check.

opaque patrol
#

found it, or at least something in simpleio named map_range()

unique turret
#

When I open CIRCUITPY/lib/adafruit_mcp9808.mpy it looks like gibberish in Atom. @tidal kiln

tidal kiln
#

@unique turret edit .py

unique turret
#

k

tidal kiln
#

do you have that? or only the .mpy?

unique turret
#

I just got the py from github that you linked, should I also make the change @solar whale suggested in line 99?

#

Currently I only commented 88

#

98

solar whale
#

@unique turret I think only the change in line 99 is needed. - leave 98 in

unique turret
#

So far so good, I am going to take it outside to test below zero

solar whale
#

glad it's winter πŸ˜‰

unique turret
#

Yup, that change on line 99 fixed it πŸ‘

#

'''2017-12-7 11:40:49, 34.3625,1.3125
2017-12-7 11:41:06, 32.5625,0.3125
2017-12-7 11:41:19, 31.775,-0.125
2017-12-7 11:41:32, 30.2,-1.0
2017-12-7 11:42:16, 29.4125,-1.4375
2017-12-7 11:42:34, 29.3,-1.5
2017-12-7 11:42:49, 28.175,-2.125
2017-12-7 11:43:02, 27.3875,-2.5625
2017-12-7 11:43:18, 26.825,-2.875
2017-12-7 11:43:27, 26.375,-3.125
2017-12-7 11:43:38, 25.8125,-3.4375
2017-12-7 11:44:07, 24.6875,-4.0625
2017-12-7 11:44:46, 23.3375,-4.8125
2017-12-7 11:45:03, 23.45,-4.75
2017-12-7 11:46:38, 28.5125,-1.9375'''

tidal kiln
#

yay! good sleuthing @solar whale

solar whale
#

Glad it worked - how do you want to handle getting it fixed in the repo.

tidal kiln
#

create issue, then fork and pr the fix, referencing the issue

solar whale
#

Do you want me to do it - or @unique turret would like to do it.

#

I can't do it until this evening. happyh to do it then or happy to have either of you take care of it.

unique turret
#

I have never edited on GitHub, but it would be a good thing to learn

#

I will investigate how to do it.

tidal kiln
#

this would be a good first one to try

unique turret
#

😺

tidal kiln
#

@unique turret do you have a github account?

solar whale
#

@unique turret Nice job finding this error, reoporting, fixing and testing it. It will be a good first issue and pull request. The nice thing about the way it works is there are pleny of peolple watching and reviewing the changes. I would not be surprized to see some discussion regarding the proposed change.

tulip sleet
#

@silver hill native iOS support for external drives is limited to camera-esque applications. Apparently a third-party application can use an external drive in certain ways, but the only ones I see are special USB drives that come with their own apps.

We're looking at Bluetooth in the long run for connecting from iOS.

unique turret
#

I do have a github account

tidal kiln
tidal kiln
#

step two, fork the repo into your github account
(use "Fork" button in upper right of repo main page)

#

step three, make changes to the code in the fork you just created

#

there are many ways to this, but since the change is simple and this is your first go, i'd suggest just editing the code directly on github, there's a little pencil icon

#

you "save" the changes by "committing" them, should be a button for this once you start editing

unique turret
#

Yay, my first commit! πŸ˜€

tidal kiln
#

step four, make a pull request to have your changes added to the original repo

#

look for "New pull request" button on the main page of your repo, near top, leftish

#

and there it is

#

now for the waiting.....will anyone ever look at the PR and merge it?

solar whale
#

If you don't mind, I will add a note explaingin the change a bit.

unique turret
#

Of course @solar whale

tidal kiln
#

@unique turret thanks for the contribution!

idle owl
#

@unique turret Great job!

unique turret
#

This community has given me SO much help with this project, it is the least I can do. Hugs for all of you!

slender iron
#

@timber lion I added you to a number of lint reviews. I'm not picking on you. Its just that you've been really busy lately and I'm starting with repos that have been updated most recently.

ornate nimbus
#

anyone have trouble getting circuit playground express to mount on a recent macbook pro? I have tried a number of cables with no luck

slender iron
#

@ornate nimbus I develop on a macbook pro. What version of CircuitPython are you running?

ornate nimbus
#

@slender iron I am not running it yet, I am just starting and I have this new CPE, but I can't get it to mount to load circuitpython... I have tried a usbC to microB as well as a usbc to female usbA adapter to a usbA to microB

slender iron
#

are you double tapping reset?

#

or maybe single tap

idle owl
#

If it's new, it's single tap, yeah.

ornate nimbus
#

yeah, single tap gets me all green

#

but nothing mounts

slender iron
#

it should show as CPLAYBOOT

ornate nimbus
#

it does mount on this windows10 box I have sitting here as well

#

but not on the mac

slender iron
#

what version of mac osx do you have?

ornate nimbus
#

I want to use the mac πŸ˜ƒ

#

the latest version

slender iron
#

high sierra?

ornate nimbus
#

yeah

#

10.13.2

slender iron
#

thats what I have too and it works ok

idle owl
#

Did you try rebooting?

ornate nimbus
#

no, but I certainly can πŸ˜ƒ

idle owl
#

See if maybe USB is unhappy

#

Worth a try anyway

ornate nimbus
#

ok, brb

timber lion
#

@slender iron yeah what's the ask of lint reviews? i'm fine to see them integrated if the code changes are tested and guides updated

#

API breaking changes are good too as long as guides are updated is my take

slender iron
#

most of the changes are minimal and don't change the api

timber lion
#

and ideally called out explicitly in the release notes for the library

ornate nimbus
#

no joy, just doesn't mount but I do get all greed LEDs

#

green rather

slender iron
#

@timber lion I don't have all of the hardware so it'd be great if you'd test it as needed. Most of the changes (whitespace and renames) don't need it though IMO

timber lion
#

hrm that's a tricky assumption, i don't have the cycles right now to go back and test everything

idle owl
#

@ornate nimbus Are you using a hub? Did you try plugging it in directly? Do other things work with the cables you're using or does your PC have USBC as well, so you know for sure they're good cables? I'm reaching here, it should be working, so I'm suggesting whateved I can think of.

timber lion
#

we can keep these pulls open perhaps but really if i were you i'd order the hardware and test

#

or start with libs that you have hardware for

slender iron
#

@timber lion well take a look at changes and let me know which need testing

timber lion
#

my take, anything that modifies code since a typo can break it all

#

but there are static analysis checks that might work

slender iron
#

the linter is checking some of that yeah

timber lion
#

or you could check the lib imports and you can create an instance

#

but most initializers look for the hardware so could be tricky

slender iron
#

yeah, just to make sure it imports

ornate nimbus
#

@idle owl I have tried a usbC to microB as well as a usbc to female usbA adapter to a usbA to microB cables... all direct connect to usbC on macbook pro

idle owl
#

Hmph.

slender iron
#

@ornate nimbus are you looking in finder to see if it mounts?

#

did you try different usb ports?

ornate nimbus
#

the same usbA to microB does work on the win10 box

#

yes and yes

slender iron
#

take a look in your dmesg for any usb related messages please

#

its possible you have a driver thats interacting with it badly

timber lion
#

it's also good if you test on the hardware you can get new guide pics etc and update them as you go

slender iron
#

@timber lion most of the APIs are identical so ntohing in the guide will change

#

the sea level thing was the only thing so far I've changed

#

and @solar whale is helping get that fixed up

timber lion
#

hrm what about tweaking the lint rules

#

they appear to aggressive and are squashing style decisions

slender iron
#

in what way?

slender iron
#

yeah, I'm pretty impartial about it so I went with the default. I'm not sure all of those defines are that useful anyway

timber lion
#

oh i missed it on that example πŸ˜ƒ

ornate nimbus
timber lion
#

but yeah i'd put the import down in the usage even though that's not what pep8 says

#

so what i could do is review the changes later and add comments where i think it's too aggressive

#

and we could iterate on that

ornate nimbus
#

@slender iron not sure if that's helpful... that a dmesg right after resetting CPE

timber lion
#

but i probably won't have time until friday, i want to finish some other stuff

slender iron
#

@timber lion I think consistency is king here and the linter can give us that

#

@ornate nimbus do you have a micron related driver installed?

timber lion
#

also why is time pulled out separately from busio and board in module import orders (i.e. with newline) ?

#

i kind of think of busio and board as core circuitpython modules like core python modules time etc

#

you can't 'remove' busio, board etc

slender iron
#

pylint has builtins separate from third party imports

#

pylint isn't smart enough to know busio is built in since its made for CPython

timber lion
#

right why i don't think we should trust all pylint's assumptions out of the box

slender iron
#

I didn't πŸ˜ƒ

ornate nimbus
#

@slender iron not that I am aware, I do some searching and see if a file search shows anything

timber lion
#

totally, i like linting and want to add it too

slender iron
#

I disabled and tweaked a few things

timber lion
#

but yeah i'll review the changes and add a few comments, IMHO it's worth watching the hettinger beyond pep8 too.. we should deviate where it makes sense

slender iron
#

I've watched it and do πŸ˜ƒ

timber lion
#

like in some of the hairy bit manipulation code i go beyond 80 char line length

#

because adding \ and breaking apart makes it harder to read

#

vertical alignment etc i like to keep too

#

and pep8 is pretty silent on that unfortunately

slender iron
#

pylints default is 100

timber lion
#

ah nice

#

yeah i'll add comments to the pulls tomorrow so we can iterate a bit more

#

we'll see how much time i have, for these accels i might be able to set them back up

slender iron
#

I'm burning through them so the sooner the better

timber lion
#

but IMHO i'd order parts and test as you go too to make it faster

ornate nimbus
#

@slender iron I can't find anything... I guess I'll try some more googling that dmesg doesn't mean much to me

timber lion
#

sure but I have to balance this with other work

#

like i said best to start with parts you have and order those you don't

slender iron
#

I think I'm faster doing the changes all at once and then testing as needed. That way others can help test too. Thats why I'm PRing all the changes rather than committing directly

timber lion
#

the setting call will set it explicitly

#

so i left it out to save space

#

sure it's fast to change the code but these are pretty big functional changes to the code and need to be tested is my take

slender iron
#

pylint expects to see them explicitly done in __init__

solar whale
#

@slender iron @timber lion - I "think" I updated the BME280 guide - text and screenshots now use same code as in the example.

timber lion
#

hrm gotcha, i dunno is pylint helping us there though?

slender iron
#

@timber lion I don't think they all will need to be and will test those that need it later.

timber lion
#

it's no different from pulling in any other code changing PR is my take

slender iron
#

@timber lion I like that it means all attributes are plainly visible in __init__

ornate nimbus
#

@slender iron yes, I see those, maybe they are old cruft idk... do you have them on your high sierra install?

timber lion
#

i guess i'm trying to see what's gained by pulling in untested code changes to all the libs?

slender iron
#

@ornate nimbus I just see the USBMSC Identifier (non-unique): 0x239a 0x18 0x4201 message in my dmesg

#

@timber lion I'm not. right now I'm only making the PRs

ornate nimbus
#

@slender iron /System/Library/Extensions/SATSMARTDriver.kext
/System/Library/Extensions/SATSMARTLib.plugin
/Library/Extensions/SATSMARTDriver.kext
/Library/Extensions/SATSMARTLib.plugin

#

do you have those files?

slender iron
#

nope

ornate nimbus
#

ok cool, I wonder what installed them, I'll try moving them out and restarting

timber lion
#

yeah totally cool to do them as PRs, i guess just if you need me to test them it's not going to happen today/tomorrow.. let's keep them around until they can be validated

slender iron
#

sounds good @timber lion

silver hill
#

@tulip sleet I think iOS is able to see the Trinket M0 as a serial device, though the only evidence is that it does not throw an error like when I connect my PL2303 cable (sad about that). What I don’t know is how to access the serial port; the only program I have doesn’t recognize it as valid. I’m poking at Pythonista to see whether it can talk to the serial device.

ornate nimbus
#

@slender iron looks like Samsung SSD T5 drive may have installed it

slender iron
#

@ornate nimbus that seems related

ornate nimbus
#

@slender iron joy, that was it, thanks for your help!

idle owl
#

@ornate nimbus Nice!

slender iron
#

no problem @ornate nimbus !

#

its good for us to know

#

first time we've seen something like that on Mac OSX

ornate nimbus
#

@slender iron so specifically, it is the drivers that Samsung T3 drives install, though I assume other external samsung drives install them also

slender iron
#

good to know!

#

@timber lion I'm adding the constant whitespace back. I can disable the whitespace check for that block.

#

@fading solstice I'll file an issue for the lint stuff with a big long check list

tulip sleet
#

@slender iron @timber lion apologies; I did not read discord until just now. I'll stop approving the library merges (though I might still comment).

slender iron
#

@tulip sleet you can approve after they are tested

#

or if you don't feel they need testing

tulip sleet
#

the ones with just renames seemed obvious, but Tony's right that there could be typos. I don't own most of these sensors. I have a bunch of humidity sensors, and lots of htk1633 stuff. I can test the htk1633 one.

slender iron
#

between all of us we can sort it out

manic glacierBOT
#

I'm going through and updating the libraries to our new build process and to turn on lint. Here is the process:

  1. Copy .pylintrc from the cookiecutter repo into the new repo.
  2. Add this to .gitignore
.env
build*
bundles
  1. Copy .travis.yml from cookiecutter into the repo overwriting the old version.
  2. Update lines 1 and 3 of the script section of .travis.yml to reflect the driver name.
  3. Add this to all modules in the driver with the correct repo url below the ...
slender iron
#

gah, generated the wrong urls

#

urls fixed

#

time to get outside

idle owl
#

Have a good one

slender iron
#

thanks! I'll be back later

idle owl
#

Ok see you later then

silver tapir
#

Watching ask an eng (I always watch them off-live, I teach a class at that time)

#

Oh, I love the mosfet caracter... now I'm just wondering what would be a cool name for the 555 πŸ˜ƒ

slender iron
silver tapir
#

❀

#

Oh yeah, hans.. I'm halfway through the video...

timber lion
#

yeah whitespace for the constants makes sense I think and is worth disabling or working around with pylint @slender iron the big use for it is looking up both ways the name and value of registers. you do it a lot when working on a library, like when debugging you get back hex values and need to quickly see what register it was easy. easy to do with 2 nice columns.. harder when it gets squished in. all the arduino libraries we wrote do it this way too so i think it's good to be consistent.

slender iron
#

ok sounds good @timber lion its easy enough to have pylint ignore the section

timber lion
#

if it can disable or add libraries to the core that would be awesome too for pylint

#

it's annoying if it forces us to break up time and such into a new set of libs

#

i like following pep8 there, first block is the built ins, second are external libraries, third are user libraries

#

it's worth stepping back to ask if pylint is helping in some cases.. you don't want to write code that passes a machine's check

#

you want to write human readable code πŸ˜ƒ

slender iron
#

I think its ok to split circuitpython builtins from CPython built ins

#

I have thought about that. I'm happy to incorporate your feedback though

timber lion
#

it's ok but I think breaks from python conventions only to make a tool check not fail

#

which is a big anti pattern IMHO

slender iron
#

what breaks python convention?

timber lion
#

core libs broken apart into different import sections

#

Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants.

Imports should be grouped in the following order:

standard library imports
related third party imports
local application/library specific imports
You should put a blank line between each group of imports.

#

i'm not so strict to say it always have to be that way

#

but breaking into 4 blocks just for pylint's happiness doesn't seem worth it IMHO

slender iron
#

I don't know how you got to four blocks

#

standard cpython libraries go before others

timber lion
#

time

circuitpython libs

third party libs

user libs

slender iron
#

I don't usually separate the last three

timber lion
#

yeah and busio, board, etc. are standard _circuit_python libraries πŸ˜ƒ

slender iron
#

I think its good to separate CPython libs from circuitpython ones

#

and thats what pylint cares about

timber lion
#

but this isn't cpython code is my point, cpython tools are going to run into weird issues

#

it

#

ack

#

it's a pedantic point i know and i'm will to go for adding the line

#

but the precident to trust pylint first without good justification is what i don't want to set

slender iron
#

you keep implying I haven't thought about it

#

and thats really bothering me

timber lion
#

i'm not implying that though? sorry if so.. perhaps the pull should indicate why changes were made?

#

all i see are the code changes so i'm teasing out the motivation for them

slender iron
#

I evaluated the warnings of pylint and agreed with them

timber lion
#

alright cool so my natural inclination was to wonder why a change was added that might go against convention

slender iron
timber lion
#

we discussed and can decide it's not worth the pain of fighting pylint's knowledge of libraries

#

i'm cool to make the decision πŸ˜ƒ

#

but yeah that would be good to add to the discussion there so if folks in the future wonder or want to change back, can point to it to say 'here's the convention'

#

4 blocks:
standard python

circuitpython core

third party libs

user libs

slender iron
#

I don't think that will work because pylint doesn't enforce that

#

if its not enforced by pylint, it won't happen

timber lion
#

i wouldn't say that's always the case

#

we can have a convention and enforce it ourselves right?

timber lion
#

it would be awesome if pylint did it

slender iron
#

I think automation is the only reliable way to enforce conventions

timber lion
#

i think it's an ideal but it's not perfect, like the issues we're running into

#

and should lack of automation block a convention we want?

#

we name libraries adafruit_circuitpython_xxx etc. and don't have automatic checks for it for example

ornate nimbus
idle owl
#

Yes.

#

Learn is currently not working.

slender iron
#

I think its ok to have higher level things we're working on but I don't expect them to be perfectly executed until there are automated checks

timber lion
#

sure, i think we both agree here

#

so my thought is lets keep pylint happy but call out our convention is 4 blocks:
core python (to make pyline not complain)

core circuitpython

third party libs

user libs

slender iron
#

I don't really understand the difference between third party libs and user libs

#

could you add a section to the design guide with examples?

timber lion
#

ah user libs are what you have locally

#

like if you're importing from a lib you don't have installed

#

it's not super common

#

and not in any of our examples

ornate nimbus
#

is it normal to just have boot_out.txt on the CIRCUITPY volume after installing "adafruit-circuitpython-circuitplayground_express-2.1.0.uf2" ?

timber lion
#

but if you have a big project with submodules internally, that's where they go typically

#

so for most things we'll still see 3 blocks

idle owl
#

@ornate nimbus Yes

timber lion
#

but for something super advanced, it might go to 4

idle owl
#

@ornate nimbus That's the basic CircuitPython install before you add any libraries or code

ornate nimbus
#

ok, now I just put the /libs on it

idle owl
#

Nice!

slender iron
#

@timber lion sounds good, please add it to the design guide

timber lion
#

cool which design guide? πŸ˜ƒ

#

we have two guides on the learning system and RTD stuff.. not sure is there one spot in particular that covers pylint right now?

slender iron
timber lion
#

let's toss it in there IMHO so it's clear to people writing code what to expect from the tool output

#

perfect

slender iron
#

it doesn't mention lint yet though

manic glacierBOT
timber lion
#

yeah i can start a new 'Conventions' section that links to pep8 and then can have a little list of our own stuff

lethal plaza
#

HI! Sorry if this is the wrong area, but I recently got a trinket with my last adafruit order, and it has made me curious about circuit python and what I could do with it. I have messed around with Raspberry Pi a lot, but never arduino.

idle owl
#

@lethal plaza Welcome!

#

This is exactly the right place.

slender iron
#

@rustic forge sounds perfect!

lethal plaza
#

Sweet πŸ˜ƒ

idle owl
#

Have you looked at the Learn Guide yet for your Trinket?

lethal plaza
#

Yep! That's how I ended up here.

idle owl
#

Ok nice!

lethal plaza
#

I know some python, but admittedly I am very much a beginner

idle owl
#

That's great! We all started there. You're in a good place!

lethal plaza
#

I was curious how it can be used for various projects...

#

awesome, thank you!

idle owl
#

Ok, so there are a bunch of projects in the Learn system that use CircuitPython and more are getting added all the time.

#

System is down right now or I'd link you to the right search.

lethal plaza
#

Ok cool...yeah I thought there were sample projects etc, but I couldnt find them in that learn section for the trinket.

idle owl
#

I can try to answer a few general questions for you though. Did you have any projects in mind?

#

Ah yeah, there's a CircuitPython section that has them

#

A lot of the projects work on multiple boards, so they might not be under a specific board section

lethal plaza
#

Ah ok I see

tidal kiln
#

@idle owl looks like learn's back

idle owl
#

@tidal kiln Thank you!

#

That includes projects, sensors, drivers, everything, but it should give you some ideas.

lethal plaza
#

thanks!

idle owl
#

For sure!

lethal plaza
#

i guess i dont have anything specific in mind quite yet

#

id love to just do something fun and simple to start

idle owl
#

Got ya. Well hopefully that gives you some ideas!

lethal plaza
#

looks like there is a lot to look through there

tidal kiln
#

@lethal plaza have you blinked an LED yet?

lethal plaza
#

no not yet but i read that in the guide

opaque thicket
#

Hey gang! Just grabbed my first Trinket M0 - how tiny and cute!

slender iron
#

yay @opaque thicket !

#

Your code has been rated at -7.82/10 😬

opaque thicket
#

pylint?

slender iron
#

yup

opaque thicket
#

Been there!

slender iron
#

going through our backlog of libraries

#

I am finding bugs with it though πŸ˜ƒ

opaque thicket
#

My code would be absolute spaghetti if it weren't for pylint.

slender iron
#

πŸ˜ƒ

#

@opaque thicket is this your first time trying CircuitPython? sounds like you've got a background with python

opaque thicket
#

Yeah - first time with CircuitPython - I'm a comp.sci/comp.E major, but haven't touched microcontrollers since graduation back in 2010.

slender iron
#

nice! I graduated in '09

opaque thicket
#

Nice! Note to self: things have gotten much easier. lol

idle owl
#

It's so true

opaque thicket
#

I've noticed, though, that my weakness is always initialization.

#

If I can get the REPL up and running and commit code, then we're off to the races. But until then, I'm just scouring ladyada's intro article.

slender iron
#

what OS are you on?

opaque thicket
#

Win10

slender iron
#

k, you'll need a terminal app of some sort

#

teraterm or putty are popular

opaque thicket
#

Ok, cool - just tossed on PuTTY, and I've just figured out that COM4's my port.

slender iron
#

πŸ‘

#

you are on your way

opaque thicket
#

Alright! Got it!

#

Can you pass the microcontroller something like raw_input via REPL?

slender iron
#

yeah, its input() in python3

opaque thicket
#

Oh man! I bet if you could, you could treat the trinket like a portable keepass!

#

WEIRD!

#

This is awesome

idle owl
#

I think someone did that. I don't remember who though.

opaque thicket
#

Nice!

slender iron
#

@meager fog was doing a bit of input stuff

#

iirc she found a bug with it

opaque thicket
#

Gotcha - I'll have to poke around with it.

slender iron
#

anybody know why char LCD data lines numbering starts at 4?

opaque thicket
#

No idea!

slender iron
#

I'll start by changing the indents from 2 to 4 spaces....

idle owl
#

Nope. Something to do with 4 rows? Guessing.

slender iron
#

Β―_(ツ)_/Β―

idle owl
#

@slender iron For Windows 7 are the adafruit drivers required to for the board to connect in the first place or are they required specifically for the serial connection

tulip sleet
#

@slender iron I wrote a char LCD driver a while ago: can you give me a code line number to look at?

opaque thicket
#

Guess on the LCD data lines - does it have to do with color LCDs?

#

1-3 = RGB?

slender iron
#

really? I see @prime flower fingerprints on it

tulip sleet
#

@idle owl need it for the serial connection, and it may get the wrong driver installed if you don't install the drivers first.

slender iron
tulip sleet
#

@slender iron I wrote a different one, for a different driver chip

slender iron
#

ah ok

#

we should unify them!

idle owl
#

@tulip sleet So install them before connecting the board in the first place? Or after installing CircuitPython and before connecting to the repl

#

Trying to figure out where it goes in this guide since it's in multiple places in the other guides.

slender iron
#

I'm trying to be good and not break APIs but the background color function takes RGB 0-100 not 0-255

idle owl
#

@slender iron If APIs need to be broken, we can fix what we need to.

tulip sleet
#

@yes, install first. Might be ok if it was plugged in first, but there might be a stray 3rd-party driver that takes precedence by accident

idle owl
#

Ok

slender iron
#

yeah, the nice thing is we're doing it pretty early

idle owl
#

Exactly

opaque thicket
#

So I was originally running into some trouble saving to main.py, and in my trials, I've now got an LED that blinks in this sequence: Green-White-Blue-Blue-Blue-Blue-Blue. Does this have a hard-coded meaning?

idle owl
#

Yep!

#

CircuitPython RGB Status Light

tulip sleet
#

@slender iron it has to do with the pin numbering on the LCD datasheet. The LCDs can operate in 8-bit or 4-bit parallel mode. For 4-bit you use those pins.

opaque thicket
#

Oh that's clever!

slender iron
#

@tulip sleet thanks!

opaque thicket
#

4-space indents in circuitPython?

slender iron
#

yeah, thats the python standard

idle owl
#

Yep

slender iron
#

the repl will be lenient

opaque thicket
#

So I've got to think about this a little bit - the REPLs on the chip, too - right? So the chip's not just got my code, it's got my code, the REPL, my libs, and python.exe in some form?

slender iron
#

yup

#

its a reimplementation of python.exe essentially

opaque thicket
#

So python's typical interpretations, say, error handling, then gets handed not just to the REPL for plain-English, but it also gets encoded as an output to the LED?

slender iron
#

yeah, there is a "supervisor" that manages running the python vm and it manages the LED when no code is running

opaque thicket
#

That's really slick!

slender iron
#

πŸ˜ƒ

#

MicroPython did some awesome work before us

#

I just added the blinky

opaque thicket
#

This is really cool - just for the architecture!

slender iron
#

πŸ˜ƒ

opaque thicket
#

Meaning - the coolness could stand on the architecture alone - not the only cool reason..

slender iron
#

just saying the credit goes to micropython and us circuitpython devs

#

@tulip sleet now I want to rename this library

opaque thicket
#

πŸ‘

tulip sleet
#

@slender iron which lib?

slender iron
#

charlcd

#

it should be HD44780 after the protocol

timber lion
#

@slender iron FYI I'm making big changes to that module right now so i'd hold off

slender iron
#

oh yeah?

timber lion
#

i'm adding char backpack support which uses a MCP23008 and SPI device like the arduino library

#

it's a workitem ladyada wants to add to the lib

#

it's going to be a somewhat big change to the lib

slender iron
#

@tulip sleet what chip did you add support for?

timber lion
#

but right now i would honestly leave the lib the same, it's following the arduino library

#

which supports 3 different products

slender iron
#

is there a lot to share between them?

timber lion
#

raw parallel LCDs, and I2C/SPI backpack driver LCDs

#

yes the interface is the same for users

#

but the setup differs if wiring in parallels vs. using a backpack

#

internally it will use different subclasses

#

i would suggest looking at the arduino lib

#

it also helps answer stuff like why d4 (that's how the parallel bus starts for those devices)

tulip sleet
timber lion
slender iron
#

ah, so the underlying transport changes but the protocol doesn't

timber lion
#

which actually has both a I2C interface and SPI interface chip, it's kinda complicated

#

for the most part yeah transport changes

tulip sleet
#

I told brentr about my lib, but he had already started on his. we started from different places. I removed a bunch of little-used functionality to make it fit in CPy, and I still need to make it a frozen module to fit with my other code

#

yeah, the basic parallel commands are just packaged up as SPI or I2C.

slender iron
#

why not have the IO expanders present DigitalInOut equivalent classes and then pass them into the library just like native pins?

timber lion
#

that's exactly what i'm doing πŸ˜ƒ

#

but it's slow

opaque thicket
#

Imagine my confusion when I wrote 9 lines of code and confused the error code colors blue and cyan...

timber lion
#

so it needs to override for faster sending of 4 bits in parallel

#

but for basic backlight on/off sure

slender iron
#

ok

timber lion
#

and just to clarify even in the arduino code it notes being too slow to send bit on/off commands for each parallel line

#

need to read/write the GPIO reg all at once

#

but yes i plan to make it look like DigitalInOut

slender iron
#

I'll commit what I have and send you a link @timber lion

timber lion
#

how do you post large code in discord again?

#

it says 2k char limit

tulip sleet
#

click the plus sign or drag a file

timber lion
#

is what you have changing the API though? be careful we don't want to break guides and usage etc

slender iron
#

@timber lion cool! ❀ ❀

#

I got rid of setColor for the RGB backlight

idle owl
#

If things need to be updated, we'll update them.

timber lion
#

ah hrm i'd say lets change the API after i push in these changes

#

i'm not attached to its naming convention etc

#

it's a holdover from arduino and the pi library

slender iron
#

why wait? doesn't that risk adding more example code that uses it?

timber lion
#

grab new pics etc. if we want to pull in now

slender iron
#

won't that need to be with your rework anyway?

timber lion
#

i wasn't planning to change the api

#

and parallel usage is the same

tulip sleet
#

@timber lion, you might want to take a look at the API I worked up: it came from an RPi library that was kind of messy, and I tried to rationalize it. Didn't care about being compatible with other stuff.

slender iron
#

@timber lion I'll move on for now so its up to you. I think changing the API earlier is better

timber lion
#

i'd say lets hold on this one, i'll put my change in today or tomorrow

#

and then re-lint, change API, updated guides after

#

yeah that makes the most sense

slender iron
#

yup, I've got plenty of others to do

#

πŸ‘

slender iron
#

@timber lion could we remove the device prefixes from the constants since they are namespaced in Python? AMG88xx_IHYSL = 0x0C -> _IHYSL

timber lion
#

we could, they're there because it helped with porting

slender iron
#

yeah, I'm just suggesting a rename

timber lion
#

definitely needs to be tested though, easy to make a typo

#

yeah i'm cool with rename

slender iron
#

πŸ‘

#

working on AMG88xx now

#

really loving the register classes

idle owl
#

@slender iron What are the units for the baud rate of the serial connection?

sage apex
#

baud

idle owl
#

oh. I was thinking it was Hz or something.

ruby lake
#

115,200 bits per second and 1 bit per baud πŸ˜‰

sage apex
#

Its how many bits per second

idle owl
#

Or rather kb/s

sage apex
idle owl
#

Ok that's what I mean

#

Not Hz, oi where did I get that.

sage apex
#

Yeah

idle owl
#

Thanks!

sage apex
#

All good

idle owl
#

I was looking it up in specific reference to the serial connection and not getting a clear answer in return.

sage apex
#

Yeah, I learned it from people calling it 115200 baud

idle owl
#

I should have remembered from baud modems, now that I'm giving it broader scope of thought. Oops.

sage apex
#

Its all good, we all have weird questions sometimes

opaque thicket
#

Here's my weird question - what're y'all building right now?

idle owl
#

A Learn guide πŸ˜„

opaque thicket
#

Ooh man! Hats off for documentation!

idle owl
#

Although on my side list is a few little Circuit Playground Express projects to use in a CircuitPython presentation I'm giving in January. Definitely a couple of things involving blinky lights.

sage apex
#

I'm doing a quadcopter from scratch

opaque thicket
#

Very nice!

sage apex
#

At least all electronics anyways

ruby lake
#

midicv unit in cp

opaque thicket
#

What's the CV in MIDI?

ruby lake
#

control voltage for analog oscillators, filters etc

opaque thicket
#

Ooh nice!

ruby lake
#

at the moment I have one pitch CV and one "gate" which is a signal that goes high to trigger an envelope generator, etc

opaque thicket
#

That sounds like a fun project! Makes me think of saving up cash for a Roland GAIA many years ago.

raven canopy
#

Question: are there plans to add a Circuit Python tag to the learn guide section? I know the the Playground kind of started it all, but since you guys are all in on CPy...just a thought. (a selfish one at that; i'm diving into my trinket m0 for the first time :D)

idle owl
#

There is a CircuitPython tag, found in two places.

#

If you click on Microcontrollers, you'll find a CircuitPython category under it. As well, if you click on Programming, you'll find a Micropython/CircuitPython category under that. Most of what you're looking for will be under the first one.

#

Hopefully that helps πŸ˜ƒ

raven canopy
#

It does help. I guess that was more of my question. Having CPy as a top level choice. You'd think that my keyboard has cooties and I don't want to type in the search bar. haha 😷

idle owl
#

It's definitely worth consideration. Feedback helps all of this evolve.

raven canopy
#

well, now that I know the shortercut, it's not that bad. and I get how hard it is to design "ease of access", especially with adafruit's awesomeness of having a store front, learning guides, blog, forum, github, readthedocs, so on, and so on. I got dizzy just typing that...

sage apex
idle owl
#

πŸ˜ƒ Seriously, we appreciate the feedback. All of that only goes so far if we're the only ones looking at it. The more we hear from others who use it, the better we can make it.

raven canopy
#

see! it just keeps going!

sage apex
#

Adafruit is amazing in the fact that it supports everything so well

#

Makes it easier when I am doing designs and see you already have boards and I can see what you guys have done, and look at the docs. Its really amazing.

raven canopy
#

@idle owl and that is what makes this community so great. i generally don't hold my tongue too much, but around here (with regards to "you guys could do this or that") I hold it since A) its already awesome, and B) I don't want to add more work to the already heavy workload of keeping the current awesomeness awesome.

opaque thicket
#

Totally agree! The thing that sets you guys way above any other company is the documentation! It's hard enough just grabbing some PCB and knowing what to do with it. You guys provide the leverage to change us from simply saying "Oh ... nice." to "I'm swapping my TV-B-Gone's power to a LiPo source, so I can recharge via solar."

idle owl
#

@raven canopy We need your feedback though! We really appreciate you thinking we're awesome, but the community is a huge part of that. That's the basis for open source. The more amazing people involved, the better any project becomes.

raven canopy
#

@idle owl noted and agreed. I am looking at ways to contribute, just need to find the proper angle of attack...

idle owl
#

@raven canopy That's great! There are many, so I'm sure you can find one that you'll be into!

raven canopy
#

kind of the problem. I'm into all of them! πŸ˜‹

opaque thicket
#

@raven canopy Been there!

#

I wish I could code like this at work - as in, have a discord chat open, and just shoot the bull with anybody who wants to talk shop.

sage apex
#

@opaque thicket Its great. Although, I'm just a freelance engineer working in college.

opaque thicket
#

@sage apex Nice! Which program are you in?

sage apex
#

Applied Electronics Engineering, gonna transfer colleges to do plain EE

opaque thicket
#

Very cool! EE was the hardest bit for me - hats off for taking the jump!

sage apex
#

Thanks, I really love what I do. I've learned a lot so getting a degree is more in the math side than anything

opaque thicket
#

Totally! I love circuits, but I DO_NOT miss doing circuit analysis.

sage apex
#

Same here, I had to do digital electronics in HS and that circuit analysis was something. And then making large projects using XORs and stuff.

opaque thicket
#

Ooh man! Digital design with the NAND gates and Karnaugh maps? Now that was my jam!

#
  • minus the D-flip flops, perhaps. Made sense at the time, but now... sparky
sage apex
#

I loved D flip flops

#

That was my jam

#

I could make a 4 bit counter in my sleep

opaque thicket
#

πŸ‘

manic glacierBOT
fading solstice
#

I am updating MAX7219 with class __init__(8 parameters). pylint says "Too many arguments (8/5) (too-many-arguments)" Is there a reccomended way to restructure a class __init__ method with too many parameters?

tidal kiln
#

*arg / **kwargs?

fading solstice
#

really, pylint would be happy with that?

timber lion
#

i don't see any issues with that initializer

#

something is up with pylint IMHO

#

changing it to just *args, **kwargs and manually parsing them out would be odd

#

and break the documentation tools

fading solstice
#

there is an explicit limit of 5

timber lion
#

i think it's a case of pylint again being too aggressive IMHO

tidal kiln
#

yeah. i was kind of asking / suggesting. not sure myself.

timber lion
#

there's probably a way to disable that check

#

let's see

fading solstice
#

i can increase it

#

in the .ptlintrc

timber lion
fading solstice
#

i will try that

fading solstice
#

@timber lion i like that solution over restructing it.

tulip sleet
#

yeah, there's nothing wrong with the initializer, since half the args are keyword args

fading solstice
#

good to hear

tulip sleet
#

it should distinguish between keyword and non-keyword args. There's an interesting other error which makes more sense:

     Too many positional arguments for %s call Used when a function call passes too many positional arguments.```
#

so if you called that initializer without using keyword args, it could complain

slender iron
#

I replied back to an email from @fading solstice with the suggestion of making it python def __init__(self, w, h, spi, cs, *, baudrate=8000000, polarity=0, phase=0):

#

that will force baudrate, polarity and phase to always be kwargs and never positional

#

@tulip sleet I chatted with damien last night and he pointed out gc.c and vm.c get compiled with -O3 for speed but we could probably save space by changing it to -Os

timber lion
#

that's an API breaking change though be careful

fading solstice
#

clever. i will try to remember that one

timber lion
#

if someone is calling it as
MAX7219(100, 100, spi, cs, 500000)
right now

#

it would suddenly fail with that change since baud rate is now only keyword args

slender iron
#

@timber lion I'm aware of that

timber lion
#

it's cool to make the change but just be careful to call it out

slender iron
#

πŸ‘

timber lion
#

it might be worth just pulling baud rate out and baking it in to the driver though

#

that's what i generally do, look up the max baud rate in the DS and use that

#

it will fall back down to the fastest available near it

#

and for software spi.. well you get what you get πŸ˜ƒ

#

polarity and phase too i don't think a user ever wants to change those

#

since it's going to be fixed for thedevice

slender iron
#

that sounds good to me

fading solstice
#

There are two derived classes that people will call, BDCDigits and Matrices.

#

Neither of these use the baudrate, polarity, or phase

timber lion
#

ah nifty cool so yeah less dependency on what users are using right now, not as big a deal to change the API

slender iron
#

w00t!

fading solstice
#

so use scott's approach of remove the extra paramters?

slender iron
#

my approach doesn't remove any of them, I agree with @timber lion that they can be removed if they are never changed

tulip sleet
#

@slender iron i can try changing the optimizations there and see the size change. I was thinking of compiling the PDMIn with -O3 to see if it would be faster, but didn't have a handle on how to set the flags easily -- I see now in py.mk how to do it.

#

I was testing pylint with (a, b, c, *, d=1, e=2) style but was trying to get beyond some other complaints it had. Never got that far.

#

I thought maybe I had the Python syntax wrong

#

never got my test program score above 0

slender iron
#

@tulip sleet the -O3 thing isn't urgent. just something to keep in our back pocket

#

@tulip sleet what other errors did you hit with pylint?

tulip sleet
#

I was just writing a test program and it was complaining about all my variable and class names and docstrings, etc. I had vars a1, a2, a3, etc.

slender iron
#

πŸ˜„ if its a script then take a look at how travis does examples

#

there are a couple things it turns off

tulip sleet
#

tnx - I just installed pylint3 fresh and didn't configure anything. And it complained my test program was foo.py (foo not allowed)

slender iron
#

lol, yeah foo is blacklisted

tulip sleet
#

yeah - no shortcuts allowed!!
just got 2 CPX's with new mic's and am trying things out.

slender iron
#

excellent!

idle owl
#

@tulip sleet Excellent!

tulip sleet
#

@idle owl I am seeing same issue as you: samples are all zeros even at 32k. Waiting for some code and data sheet from Limor.

idle owl
#

@tulip sleet Yep! That's a good place to start. We did a lot guessing with the timing, that's how I came to the code I sent you.

hollow tartan
#

What is the state of the art with regard to DTFM? external decode IC still required?

ruby lake
#

I used to do that with a Z80

timber mango
#

@slender iron The HD44780 char LCD driver chip can run in 4bit or 8-bit modes. However, that chip is leveraged by another manufacturer to bring out a complete LCD module (not just the 44780 chip). The character LCD manufacturer chooses to create a 4-bit external interface to the LCD module (since that is one of the two options provided for by Hitachi's design of the HD44780 LCD driver chip).

The datasheet for 44780 is very specific on this:
The four low-order bidirectional tristate data bus pins (DB0 to DB3) are used for data transfer and receive between the MPU and the HD44780U. These pins are not used during 4-bit operation.

DB4-DB7 are used for the 4-bit interface (which is the usual interface presented for character LCD's).

Since DB7 can be used as a busy flag (and no other DB pin has this distinction) that is probably why the high-order nybble was chosen over the low-order nybble, when presenting only four pins to the external interface. Just a guess, there.

ref. https://cdn-shop.adafruit.com/datasheets/HD44780.pdf
ref. https://www.adafruit.com/product/198

As the HD44780 was presented to me as the industry standard for character LCD's, I would prefer that any unification of disparate chip drivers take this into consideration. There are a lot of people who already know how to work with HD44780.

I didn't even realize there were options available that were not HD44780-oriented, in character LCD modules.

tulip sleet
hollow tartan
slender iron
#

@timber mango sounds like all of them are HD44780 but may use an intermediary IC to reduce the number of pins

timber mango
#

I wish it wouldn't say I was typing. I was. πŸ˜‰

tulip sleet
#

@hollow tartan I read about that one on the Arduino forums. I'd look at Paul's library first - he is very good (he runs https://pjrc.com).

timber mango
#

@slender iron From what I can tell, 100% of current offerings (anything but a 'discontinued') in the char LCD category at AF has the 14-pin (minimum) electrical interface, including all 8 pins (DB0-DB7).

I was completely mistaken to think the secondary manufacturer would not have brought out all 8 data bus lines -- they do, and that is universal (explains pins 1-14 of these modules, which are consistent everywhere).

slender iron
#

πŸ‘

tulip sleet
#

@slender iron hi - where did you get the sinc filter table and implementation in PDMIn?

#

i spent most of the afternoon figuring what makes it run faster and what doesn't. Loop unrolling is effective. Some other things like trying to eliminate if statements in the loop make little or no difference.

idle owl
#

Are you referring to trying to make it listen for data sooner?

slender iron
#

@tulip sleet I got it from @meager fog

tulip sleet
#

@idle owl, no just making the filtering computation run faster. At this point I don't care whether the data is right or not. I can't sample fast enough right now to be reliable - need to improve that.

#

@slender iron tnx - I have an email in to her for code for the new mic. She mentioned she had some. That may be the same. The filter output doesn't really look right, but I'm not sure the input data is right either. If I play a tone while recording it doesn't get recorded even though the data is non-zero.

idle owl
#

Ah I see

slender iron
#

@tulip sleet yeah, I bet its the same code

#

it doesn't look like I have it

tulip sleet
#

@idle owl did you ever successfully record speech or similar and play it back?

idle owl
#

@tulip sleet No I came to the conclusion it wasn't possible, so I had stopped trying.

#

Not a hard conclusion, just my own experience

tulip sleet
#

@slender iron maybe same question for you. I know you got it working, but right now the output data is close to 0x7fff all the time with some variances, when there's input data.

slender iron
#

I did manage to record tones

#

thats the only way I could tell it was working

tulip sleet
#

was that 1.0 or 2.0?

solar whale
#

@slender iron how do I pull in an unmerged PR to my local repo? I have just benn copy/pasting the files, but is there a way to get git to geve me the files in the PR -- trying to test some of the updates.

slender iron
#

2.0

tulip sleet
#

and was that with the breakout mic or the CPX mic?

slender iron
#

I don't think that 1.0 supported it

#

CPX but the older one

#

@solar whale let me find instructions

tulip sleet
#

yeah, just tested that, and doesn't really seem to be recording good data, but I'll try harder

slender iron
#

the jist is that the pr is just somebody's branch

solar whale
#

OK - don't spend a lot pf time

#

I can cut/paste

solar whale
#

thanks

idle owl
#

Ooh I'll want that too

slender iron
#

np

lethal plaza
idle owl
#

@lethal plaza If you're interested in it, yeah! That's more what it's about. Tony's videos are great, so that should help a lot to have with the guide.

lethal plaza
#

definitely interesting and seems like a good plce to start πŸ˜ƒ

idle owl
#

Then go for it!

tulip sleet
#

@slender iron I googled the filter constants but they're unique in that sequence, so her code is original πŸ˜ƒ

slender iron
#

πŸ˜ƒ

timber mango
#

@lethal plaza Best practice is to have a resistor (at least 2200 ohms) inline with an LED when you connect it to a microcontroller port pin. That limits the current flowing through the LED.

There are good reasons to require an external resistor (it's possible to drive an LED without any resistor, but that's an advanced technique involving a duty cycle so as not to burn out the LED junction in a puff of (probably not blue) smoke).

lethal plaza
#

interesting

#

thanks!

timber mango
#

Yeah you can way overdrive an LED so long as you keep the pulse brief. It fools the human eye into thinking it's a lot brighter than it is.

lethal plaza
#

2200ohms sounds crazy! I am used to resistance in audio applications so usually a lot lower haha

timber mango
#

300 Hz is generally fast enough of a refresh for an LED array, to not notice a flicker in the corner of the eye. Put a rotating fan blade in front of various devices that do flicker on and off (such as a flourescent bulb at 60 Hz) and you can see the refresh better (esp. old Mac computers which refresh around 50 Hz).

If you represent multiple digits on several 7-segment LED modules, you can 'paint' one digit at a time, but you must video-blank the entire array, between paintings -- or weird ghost segments at varying brightnesses will appear (at least to the human eye).

lethal plaza
#

yeah i think you're losing me now lol

timber mango
#

Well if you do the math on a 6-digit, 7-segment display -- how many LED's is that?

lethal plaza
#

i dont know, and im not sure why we are talking about it lol I was just asking @idle owl if that beginner I/O project was a good beginner thing to start with

timber mango
#

Fair enough. πŸ˜‰

lethal plaza
#

thank you though, when I get deeper into I am sure I will need that help

solar whale
#

@slender iron for the library update to ccs811 and bus_device do you want/need then tested unde 2x and 3.0 or is 2.x all that is needed. Also is it necessary to test on esp8266 as well.

timber mango
#

It's fine. I tend to do 'that' and worry later if the person had any interest. My friends and family get this every day, from me. Every once in a while: someone asks a follow-up. Not often, though. πŸ˜‰

slender iron
#

@solar whale I don't think it needs to be tested on multiple versions of circuitpython

#

so whichever you have access to will work

solar whale
#

OK - I see what I can do. the git pull worked great - cleaner than cut/paste

slender iron
#

great! thanks for the help

#

I'm gonna go for a walk before the sun disappears on me. I'll be back in 30 or so

idle owl
#

See you soon!

solar whale
#

enjoy - first snow here tomorrow!!

timber mango
#

We're due for 3" in NW Connecticut by 7pm Saturday.

solar whale
#

Winter Storm Watch here in NH - could be 6+ -- we'll see

tulip sleet
#

in eastern MA: 3-5" after 11am, then 2-4" overnight Saturday night

#

I love reading the NWS forecast discussion.

idle owl
#

I haven't even looked. I just know we're supposed to get snow here in MI.

unique turret
#

Sounds great for the east coast skiiers. We need some snow out west so my local mountain can open. They can't find a water source to make snow

timber mango
idle owl
#

@unique turret Oi

hollow tartan
#

Just gotta SMILE at Pirate, Monkey, Robot, Ninja

slender iron
#

back

idle owl
#

wb

slender iron
#

max31855 wins for not having any lint errors already!

solar whale
#

@slender iron I updated ccs811,bus_device and register and am able to access ccs811 on CP 2.x - Hopefully taht counts for the ccs811 and the I2C, register and i2c side of bus_device -- I try somthing on SPI in a bit.. Is tat the teting you need. If so, I will add some notes to the PR's.

slender iron
#

yup! please post on the PRs

#

thanks @solar whale

idle owl
#

@solar whale Are you running Linux?

solar whale
#

yes

fading solstice
#

PYLINT:

#
                pulses.append(pulse_in.popleft())
            pulse_in.resume()
#

Get " Do not use len(SEQUENCE) as condition value (len-as-condition)

#

Anyone know why that is a bad thing?

#

This comes from Adafruit_CircuitPython_DHT

slender iron
#

@fading solstice maybe because the length of pulse in is changing?

#

an empty list in python is False

#

so while pulse_in: is equivalent

fading solstice
#

yes, pylint like that!

noble lance
#

@slender iron this is kind of late but I finally got around to testing your hacked Hyper terminal app with a circuit playground express and BlueFruit 32u4 board and it worked flawlessly running on El Capitan. Great work!

slender iron
#

yay @noble lance !

#

now we need someone to polish it up

noble lance
#

I'm gonna try to mess around with it when I have some free time

opaque patrol
#

@slender iron what are you looking to be done?

slender iron
#

get it rebranded and test the failure cases πŸ˜ƒ

ornate nimbus
#

lists the module as urandom

#

and it seems to be random now

#

so someone should -u that πŸ˜ƒ

opaque patrol
#

I would recommend removing the split window functionality, I tested it and it was trying to create multiple panes to the same COM port which caused it issues

slender iron
#

oh interesting @opaque patrol ! we could dedup

#

@ornate nimbus fixed

ornate nimbus
slender iron
#

bye all! have a great weekend

idle owl
#

Later @slender iron, you too!

opaque patrol
#

@slender iron Later...

idle owl
#

@solar whale What's the basic text editor in Ubuntu? The Notepad/TextEdit equivilent.

opaque patrol
#

nano, vi, emacs

idle owl
#

Basic, lol. Not Terminal based.

#

Or is there not one?

tidal kiln
#

@idle owl gedit

solar whale
#

lots of option - nano is basic - but it is Terninal based - mayn ise Emacs, or gedit, - mu can be used .....

idle owl
#

I mean something installed by default, available as a GUI from a menu.

#

That's gedit?

solar whale
#

gedit

idle owl
#

Awesome thanks πŸ˜ƒ

solar whale
#

beware - it can have "delay" issues.....

idle owl
#

Yeah, so can Notepad... I'm going to suggest downloading something else, but for someone just getting started, they might not be able to download anything, or don't want to yet.

#

So they need to know what to start with.

solar whale
#

Unde Ubuntu - if you double-click on a file in the File manager - it uses gedit

idle owl
#

excellent, thank you

solar whale
#

asking for preferred editor uder linux is a dangerous thing πŸ˜‰ wars have been faught ...

idle owl
#

I didn't ask for preferred. πŸ˜„

#

But yes I know. Series of wars.

opaque patrol
#

Almost as bad as asking curly brace placement with c++

#

I have noticed python explicitly doesn't use anything that caused style wars with c++

solar whale
#

don't ask about tabs vs spaces....

opaque patrol
#

And don't mix tabs and spaces, painful lesson with "Object has no attribute" errors...

solar whale
#

wow! here is a cryptic error - I forgot to hook up the CS pin when testing a BME280 under SPI on a Metro_m0_Express - CP 2.1.0 - error reported ```>>> import bme280_spi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "bme280_spi.py", line 12, in <module>
File "adafruit_bme280.py", line 247, in init
File "adafruit_bme280.py", line 78, in init
TypeError: can't convert function to int

idle owl
#

Oi

pastel panther
#

I'd call that counter intuitive

stuck elbow
#

hmmm

#

looks like it's trying to give you an error, but failing when converting the value it got into something useful

#

ah!

#

id is a function

solar whale
#

@stuck elbow that would have been a useful error message

stuck elbow
#

should be chip_id

#

someone linted this code and didn't change all the names

solar whale
#

hmm - I wonder if @slender iron knows -- he does now...

idle owl
#

@solar whale File an issue on the driver for him with the info

stuck elbow
#

or fix it and make a pull request πŸ˜ƒ

solar whale
#

@stuck elbow should it be entered as an issue ? woould you do it sionce you know the detatils.

idle owl
#

@stuck elbow It's harder to fix it and make the PR when it's already waiting in a PR state...

stuck elbow
#

@solar whale I can help you with it

solar whale
#

ok

stuck elbow
#

click it

#

(you need to be logged in in github)

solar whale
#

got it

stuck elbow
#

now scroll down to the offending line, and replace

raise RuntimeError('Failed to find BME280! Chip ID 0x%x' % id)

with

raise RuntimeError('Failed to find BME280! Chip ID 0x%x' % chip_id)
#

underneath, you have a "propose change" form

idle owl
#

Oh nice!

stuck elbow
#

I think the title could be something like "fix a typo for chip_id" and in the description you can say "The id variable was renamed to chip_id but not everywhere. This fixed that."

#

or something along those lines

#

then click "propose the change"

idle owl
#

I'm completely wrong then. Apparently it's easier to edit it in PR form. πŸ˜„

stuck elbow
#

@idle owl for simple fixes like that, yes

#

it's worse when you need to change multiple files

idle owl
#

Good to know, thank you.

solar whale
#

@stuck elbow thanks! - PR entered

stuck elbow
#

@solar whale thank you!

#

hmm, I can't see it

#

I think you need to send it now to the original repository

#

look for a "make a pull request" button

solar whale
#

yes - creating PR

#

done

idle owl
#

Great job!

#

I just got the notification. So it worked πŸ˜ƒ

solar whale
#

now I can test pulling the PR an testing it..

#

yay ```>>> import bme280_spi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "bme280_spi.py", line 12, in <module>
File "adafruit_bme280.py", line 247, in init
File "adafruit_bme280.py", line 78, in init
RuntimeError: Failed to find BME280! Chip ID 0xff

idle owl
#

nice!

solar whale
#

that is a much more informative error message!

stuck elbow
#

yeah, errors in error handling are confusing

#

"There was an error, but while we tried to display it, a following error was encountered: no error."

solar whale
#

@stuck elbow thanks for the help and walkthrough of a simple PR.

stuck elbow
#

no problem, thanks for finding and fixing a bug

slender iron
#

Great job all!

pastel panther
#

group hug!

solar whale
idle owl
#

Finally! Couldn't get my own code to work with the DotStar Featherwing. Lost the code that didn't work at some point so I can't compare it, but I finally have something working!

#

Backed up the code this time.

pastel panther
#

yay!

pastel panther
#

I'm starting to become irrationally excited by blinking LEDs ruby

idle owl
#

I... understand. Completely.

raven canopy
#

"There's always room for blinky."

pastel panther
#

What's wrong with this command line:
~/dev/samd11$ JLinkGDBServer -if SWD -defvice ATSAMD11C14

#

πŸ˜‘

raven canopy
#

-defvice or -device?

pastel panther
#

winner winner, chicken dinner!

#

Now if I had just actuall read the error it returned I could have saved myself several hours of hair pulling and re-wiring

raven canopy
#

haha. been there too many times.

pastel panther
#

But! I got a blinky so it's all good

#

Now it's burrito o'clock

#

🌯

meager fog
#

@fading solstice heyyy

pastel panther
#

heeeey

#

nm!

meager fog
#

lol

#

@fading solstice im doing some sensor PR sweeps

fading solstice
#

How can i help?

pastel panther
#

@meager fog I've been doing some m4/'51 stuff; How far did you get before you noticed the reset pullup issue?

fading solstice
#

sorry i just got back from a walk

meager fog
#

@pastel panther not until after we made our first PCB πŸ˜ƒ

pastel panther
#

same here!

meager fog
#

@fading solstice no help needed just FYI so we dont doubleup

fading solstice
#

k

meager fog
#

i did BMP280, now Si021

fading solstice
#

k

manic glacierBOT
#

Looking to jump into contributing on this one. But, as this would be my first on this MASSIVE project, I have a couple questions.

  1. Which branch would be the best to reference & fork? I know the updates since asf4 have changed a few things, so don't want to start on outdated footing. I'm assuming master, but we all know what happens when I assume.

  2. Are we looking at SAMD21 only, or for all ports?

In some preliminary research, I found the reference that @tannewt mentioned for Ser...

fading solstice
#

i am help scott iwth adding pylint to everything. I ran into an interesting pylint complaint in SSD1306.

slender iron
#

@fading solstice I'm around for a bit if you need help

pastel panther
#

@slender iron Should the M4 version of uf2 from your fork be compatible with the '51G with some tweaks?

meager fog
#

si7021 is missing an example, added

slender iron
#

@pastel panther yeah, just make sure the chip variant stuff is set correctly

pastel panther
#

then I can load the elf with gdb, right?

fading solstice
#

There is a framebuf that is initialized a derived class's __init__ but is also used by the __init__ of the base class (probable the wrong terms). Anyway pylint does not like the base case referencing the framebuf (Instance of 'SSD1306' has no 'framebuf' member (no-member))

idle owl
#

@meager fog Good to know. I've got a bunch I planned to do as well.

fading solstice
#

my fix is to create a method in the base class to return the framebuf from the derived class.

meager fog
#

i am updating scott's comment as i do em

#

and putting tested ones at the end

idle owl
#

Ok. I always check the PR before I move forward anyway. So that works well

manic glacierBOT
slender iron
#

@pastel panther yup

#

@fading solstice I'd have to take a look at it

fading solstice
#

@slender iron did you see my comments on framebuf?

slender iron
#

@fading solstice yeah, let me look at the lib

fading solstice
#

ok thanks

slender iron
#

@fading solstice I'd probably just add self.framebuf = None to the base class

fading solstice
#

It needs to be created before the base class is initialized. because the base class uses in init_display()

slender iron
fading solstice
#

sorry, by then the devired class have created framebuf and its ready to use. maybe we should pass it into the base class initializer as a parameter

manic glacierBOT
meager fog
#

ok did Si7021

pastel panther
#

@meager fog I think I asked you about qspi on the '51 previously and you mentioned something about not being able to do normal SPI on the QSPI pins? Do I remember correctly?

meager fog
#

that is right

#

there is no sercom on QSPI pins

pastel panther
#

And you didn't like that because it means you can't use the same pins for qspi or normal spi?

meager fog
#

yah means we have to take a leap

pastel panther
#

I ended up just putting both on my board. Other than the speed and XIP support are there other functional differences between QSPI and SPI?

meager fog
#

QSPI is much faster - SPI is limited to 12mhz, qspi probably can go faster, check DS πŸ˜ƒ

pastel panther
#

Yea, it can go way fast and even clock on rising and falling edges apparently. DDR I guess? I'll let you know how it turns out

meager fog
#

yes!

idle owl
#

LIS3DH tested.

meager fog
#

thx @idle owl im doing the BME680

#

before you do a release

#

theres a typo in travis.yml

idle owl
#

Ah ok

idle owl
#

ok np

timber mango
#

Is there Circuit Python driver for:

idle owl
#

@meager fog Latest on this one was 1.0.0. Should I give it 1.1 or up to 2.0? Never sure with version numbers.

timber mango
#

I have all that in a single project (built already and working in Arduino on Feather M0 Express). Figured I could test the hardware for Circuit Python (pylint recent pushes).

I also have a working monochrome char LCD similar to http://adafru.it/181 wired and tested for 4-bit parallel (again, for Arduino) as well as the 8x NeoPixel strip http://adafru.it/1426 (also Arduino-tested).

meager fog
#

@idle owl bump to 2.0.0

idle owl
#

@meager fog Thank you!

meager fog
#

but there is not one for ST75 LCD yet, nor rotary encoders

timber mango
#

Okay that's what I needed to know -- the missing holes (tho the pointers to the ones that have something are also helpful!)

#

You want them to track pretty closely to the Arduino libs, right?

meager fog
#

kinda

#

theres some python difference, e.g. we use setters/getters as properties

#

and the naming conventions use snake_case

#

theres' char lcd and neopixel drivres for sue

#

sure

timber mango
#

Are there any ISR's used?

meager fog
#

ISRs are not exposed 😦

timber mango
#

Thank you. I appreciate it, as if I can bite off more than I can chew I may learn something.

meager fog
#

here is a rotary encoder example

timber mango
#

woot!

meager fog
#

but its not a library, and you have to poll it - but it does work

timber mango
#

I'm really thinking iic or SPI for the rotary on an 'outboard' trinket M0 since they're inexpensive now.

meager fog
#

good luck πŸ˜ƒ

timber mango
#

Thanks for your time!

meager fog
#

πŸ‘

fading solstice
#

pylint question SET_CONTRAST = const(0x81) SET_ENTIRE_ON = const(0xa4) SET_NORM_INV = const(0xa6) SET_DISP = const(0xae) SET_MEM_ADDR = const(0x20) SET_COL_ADDR = const(0x21) SET_PAGE_ADDR = const(0x22) SET_DISP_START_LINE = const(0x40) SET_SEG_REMAP = const(0xa0) SET_MUX_RATIO = const(0xa8) SET_COM_OUT_DIR = const(0xc0) SET_DISP_OFFSET = const(0xd3) SET_COM_PIN_CFG = const(0xda) SET_DISP_CLK_DIV = const(0xd5) SET_PRECHARGE = const(0xd9) SET_VCOM_DESEL = const(0xdb) SET_CHARGE_PUMP = const(0x8d)

#

pylint does not like thing lined up. (bad-whitespace)

idle owl
#

I believe they've been doing whatever it takes to ignore those sections. ```python

Register addresses:

pylint: disable=bad-whitespace

REG_OUTADC1_L = const(0x08)
REG_WHOAMI = const(0x0F)
REG_TEMPCFG = const(0x1F)
REG_CTRL1 = const(0x20)
REG_CTRL3 = const(0x22)
REG_CTRL4 = const(0x23)
REG_CTRL5 = const(0x24)
REG_OUT_X_L = const(0x28)
REG_CLICKCFG = const(0x38)
REG_CLICKSRC = const(0x39)
REG_CLICKTHS = const(0x3A)
REG_TIMELIMIT = const(0x3B)
REG_TIMELATENCY = const(0x3C)
REG_TIMEWINDOW = const(0x3D)

Register value constants:

RANGE_16_G = const(0b11) # +/- 16g
RANGE_8_G = const(0b10) # +/- 8g
RANGE_4_G = const(0b01) # +/- 4g
RANGE_2_G = const(0b00) # +/- 2g (default value)
DATARATE_400_HZ = const(0b0111) # 400Hz
DATARATE_200_HZ = const(0b0110) # 200Hz
DATARATE_100_HZ = const(0b0101) # 100Hz
DATARATE_50_HZ = const(0b0100) # 50Hz
DATARATE_25_HZ = const(0b0011) # 25Hz
DATARATE_10_HZ = const(0b0010) # 10 Hz
DATARATE_1_HZ = const(0b0001) # 1 Hz
DATARATE_POWERDOWN = const(0)
DATARATE_LOWPOWER_1K6HZ = const(0b1000)
DATARATE_LOWPOWER_5KHZ = const(0b1001)

pylint: enable=bad-whitespace```

#

You are correct though, it is not the pythonic way to do it.

fading solstice
#

that was what i did. so i am happy now

idle owl
#

Ok excellent

meager fog
#

ya srsly - how can you not love lined up consts???

idle owl
#

There's only no love when my linter is complaining πŸ˜„

fading solstice
#

i finished SSD1306 and created a PR. Do i need to do something to the Issue 47r. Like move it to that pending section?

meager fog
#

do you want a reviewer?

fading solstice
#

i love reviewers!

meager fog
#

ok have it reviewed before pullin'

fading solstice
#

i also finsihed DHT and MAX7219

idle owl
#

I won't have SSD1306 or MAX7219 until Tuesday.

#

DHT wasn't on the list when I ordered, so I won't have one of those to help there.

fading solstice
#

BTW pylint found a bug in SSD1306! In the SPI side of things, a method was calling a methed that had been renamed. pylint told me about it!

idle owl
#

Nice!

fading solstice
#

I tested MAX7219, so we should be good

idle owl
#

Then I'll review it

fading solstice
#

DHT, I tested with a DHT11 and a DHT22. so we should be good with that one too

idle owl
#

Ok. I'll look through both and review

fading solstice
#

SSD1306, I tested with a i2c device, but do not have an SPI device

idle owl
#

@fading solstice I fixed the typo in travis.yml. I'll merge your PR if that's good with you

#

For MAX7219.

fading solstice
#

oooops, sorry

idle owl
#

Not a problem at all

fading solstice
#

i must be using the wrong cookiecutter

idle owl
#

It's in a bunch of them, that's the only reason I knew. Ok merging. Would you like me to do the release?

fading solstice
#

yes, please

idle owl
#

Excellent

fading solstice
#

i am fixing in DHT and SSD1306

idle owl
#

Updated the lib checklist as well

#

Ok

#

Let me know when you're done, I'll review DHT

fading solstice
#

you knowe what i also did GPS and tested that. i will fix in there too

idle owl
#

Excellent!

#

You're rocking it

timber mango
#

Outdated critical Guide:

$ git clone https://github.com/adafruit/atmel-samd-micropython-vagrant.git

Seems to require an extra

$ vagrant box update

to follow Tony's guide:

https://learn.adafruit.com/micropython-for-samd21/build-firmware

which was
Last updated on 2017-01-05 at 05.27.29 PM

RESOLVED

Where the machine tells you to run vagrant ssh you want to say 'vagrant halt' instead, and then 'vagrant box update'.

From there, erase what you have done, with:

$ rm -rf ./atmel-samd-micropython-vagrant

.. at the appropriate directory level (will need to 'cd ..' probably).

Reiterate the entire guide. This time, the machine will find the update already in place.

It's stored external to what the Guide covers (your Linux box retains it from the last time you updated it, independently of vagrant).

old text follows

BENEFIT

==> default: Successfully added box 'ubuntu/trusty64' (v20171205.0.1) for 'virtualbox'!

is the result when doing the

$ vagrant box update

whilst otherwise following this guide.

I did not issue
$ vagrant halt

and maybe should have. Seems to be correct, however .. following a 'vagrant halt' with a 'vagrant box update' looks like the right thing happened, anyway.

To be more certain, I ran

$ vagrant provision

manually, as the very next step, on top of this changed environment (and had not once used 'vagrant ssh' anywhere, up to this point).

How to use MicroPython with boards like the Feather M0 & Arduino Zero!

timber mango
#

I think I got this. Testing (if true, only the guide needs a casual mention of the fix; the Vagrantfile in particular seems to require no new changes).

EDIT:

Seems good now. See above blathering for the eggsplanation. Vagrantfile (and everything github) is already up-to-date.

The Guide, however, can stand a refresh to include information about overcoming a legacy installation. People will try this once, then try again, months later, and become reconfused. ;)

Basically

a) my Debian box retains the last time I updated with 'vagrant box update' (it retains a new seed version of Ubuntu, which the 'yellow prompt' reminds is available)

b) it appears necessary to do everything up to and including 'vagrant box update' each time a fresh (and recent) install is required

c) .. and then one may well wish to start over, from the beginning of the Guide (erasing the Vagrantfile, and everything cloned from github, completely outside of virtualbox/vagrant).

d) Since the host system now has the correct Ubuntu version held on-file, the next time through it does the right thing. When it prompts to 'vagrant ssh' you may finally do so, confident you have the most recent environment:

``Exhibit

Finished provisioning! Use the 'vagrant ssh' command to enter VM. CircuitPython source is in the /home/vagrant/source/circuitpython folder.``

idle owl
#

@slender iron Reviewed and approved the first one but I don't have merge access.

slender iron
#

kk I can merge

#

@meager fog did the second one

manic glacierBOT
fading solstice
#

@idle owl udpated DHT, GPS, and SSD1306

idle owl
#

@fading solstice Do you think we should wait to test SPI with SSD1306? It's a short part of the file and reading through it says it's good to go, but I figured I'd ask.

#

@fading solstice DHT says it still has conflicts with .travis.yml and I evidently don't have write access to it so I can't merge it. So that one's still there. GPS is reviewed, merged and released.

manic glacierBOT
timber mango
#

I didn't know I was building the alpha for 3.0.0 ;)

``Adafruit CircuitPython 3.0.0-alpha.1-13-gb31c2ea on 2017-12-10; Adafruit Feather M0 Express with samd21g18

``

manic glacierBOT
manic glacierBOT
fading solstice
#

@idle owl I fixed the conflicts in DHT. I can not be sure about SSD1306 SPI. It had bugs before I even started on it. it would be good to test it at some point. I can order an SPI board and test it, if that would help

idle owl
#

I'm not sure what is needed to test it, I might already have it. What SPI board are you talking about needing?

fading solstice
#

OLED display 128x64 pixel using SPI comms. I have a I2C comms board

idle owl
#

Right, I knew that part, but I was confused about it needing another board for SPI to work

manic glacierBOT
#

os.uname() returns this:

Returns information identifying the current operating system. The return value is an object with five attributes:

sysname - operating system name
nodename - name of machine on network (implementation-defined)
release - operating system release
version - operating system version
machine - hardware identifier

Regular CPython returns something like:
`posix.uname_result(sysname='Linux', nodename='salmonx', release='4.10.0-42-generic', version...

idle owl
#

I thought you just need to use a different wiring setup for SPI to work

fading solstice
#

different board. i am going to check to see if adafruit still sells it.

idle owl
#

Ahh ok

manic glacierBOT
idle owl
#

Most of the SPI stuff I've looked at simply needed different wiring. I might not have ordered what I needed to test it anyway if that display needs a comms board to work. Needed to look closer apparently.

fading solstice
idle owl
fading solstice
idle owl
#

Which has both

#

That's what confused me.

#

Ok I'll test it on Tuesday.

fading solstice
#

326

idle owl
#

At least the product desc says it supports both as well

fading solstice
#

th938 works both ways

idle owl
#

Ok that's why I was confused. I didn't realise there was one that didn't.

fading solstice
#

yea, i have a board (not adafruit) that is i2c only

idle owl
#

Can you give me write access to DHT? Or do you just want me to post a review to it and you'll merge it.

#

Looking through it now

fading solstice
#

I cannot merge it or give you rights to merge. how did that happen?

idle owl
#

I have no idea. I commented and approved the changes, but I can't see how that would alter any of that...

fading solstice
#

Github says "Only those with write access to this repository can merge pull requests."

#

i guess we need someone with real powers like scott

idle owl
#

Owait, we're trying to merge it to the main lib. Scott needed to give us access to that I think.

#

Yeah.

#

He must not have added write access to that one.

#

@slender iron When you're around, you need to add CircuitPython Librarians to Adafruit_CircuitPython_DHT. Thanks!

tulip sleet
#

@idle owl @fading solstice added cpy librarians as a team collaborator to that lib

idle owl
#

Thanks @tulip sleet !

fading solstice
#

Thanks

tulip sleet
#

too tired to do actual work

idle owl
#

I'm still not seeing the option to merge...

tulip sleet
#

try again

#

refresh