#circuitpython-dev

1 messages Β· Page 139 of 1

slender iron
#

@raven canopy thats enough of a test for me! (metro m0s are much easier to hook up since they have swd headers)

idle owl
#

Ok the other file isn't so obvious.

#
    def blink_rate(self, rate=None):
        """Get or set the blink rate. Range 0-3."""
        if rate is None:
            return self._blink_rate
        rate = rate & 0x03
        self._blink_rate = rate
        self._write_cmd(_HT16K33_BLINK_CMD |
                        _HT16K33_BLINK_DISPLAYON | rate << 1)``` same error
#
    def brightness(self, brightness):
        """Get or set the brightness. Range 0-15."""
        if brightness is None:
            return self._brightness
        brightness = brightness & 0x0F
        self._brightness = brightness
        self._write_cmd(_HT16K33_CMD_BRIGHTNESS | brightness)```
#
    def _pixel(self, x, y, color=None):
        mask = 1 << x
        if color is None:
            return bool((self._buffer[y + 1] | self._buffer[y + 2] << 8) & mask)
        if color:
            self._buffer[(y * 2) + 1] |= mask & 0xff
            self._buffer[(y * 2) + 2] |= mask >> 8
        else:
            self._buffer[(y * 2) + 1] &= ~(mask & 0xff)
            self._buffer[(y * 2) + 2] &= ~(mask >> 8)```
#

in all 3 of those.

#

same error.

robust coral
#

Yeah I just saw that too.

stuck elbow
#

@idle owl add return None at the end

#

@idle owl of the function

robust coral
#

HT16K33::_pixel returns a bool if color is None.

idle owl
#

ok

robust coral
#

Otherwise nothing. I wonder why? (no docs of course)

stuck elbow
#

@robust coral if color is None, you read the current color

idle owl
#

Beautiful! Thank you

stuck elbow
#

@robust coral if you specify the color, it sets it

robust coral
#

oh! I see. It's a bidirectional accessor. πŸ˜ƒ

stuck elbow
#

@toxic knot and there are docs

robust coral
#

There are all these MatrixNxM classes with docs and 'pixel' functions, and those are documented, but the HT16K33 base class has no developer docs, is what I meant.

#

Maybe it's obvious if you know how MatrixNxM has to work, so nevermind. But it's hard to jump into the code and just see what's up.

idle owl
#

@stuck elbow Ok so we're good to go merging that one?

meager fog
#

@slender iron shoot did we break the bundle somehow >.<

slender iron
#

looks

meager fog
slender iron
#

looks transient to me, I restarted it

#

worked a second time

meager fog
#

yayyy!

idle owl
#

Ok all that's left in Pending PRs is BNO055 which still isn't working.

slender iron
#

ok, thats on me

stuck elbow
#

@robust coral if you think that a comment there would help, feel free to add it

idle owl
solar whale
#

@tulip sleet @slender iron does 2.x now use the ports/xxxx layout?

slender iron
#

no

tulip sleet
#

@solar whale no

slender iron
#

that came with a micropython update

solar whale
#

nevermind - did pull from master...ugh

lucid arch
#

hi guys

solar whale
#

@lucid arch Hello!

lucid arch
#

hi guys

#

does anybody know how do i switch from circuit python to normal c code on my circuit playground express?

#

the arduino ide does not show a valid port for my board and i cant upload a sketch to it

#

i'm assuming thats because my board is recognised as a circuitpython os .. how do i switch?

#

ta

tulip sleet
#

@lucid arch you can double-click the reset button before you upload or while you try to upload. Also make sure you select the correct port in Arduino. All the NeoPixels will turn green. Any Arduino sketch will wipe out CircuitPython, but you can just copy it back via CPLAYBOOT. The contents of CIRCUITPY will not be touched unless your Arduino program writes into the SPI flash chip.

We've fixed something in CircuitPython 2.2 which should make the uploading work better.

meager fog
#

try double clicking to get the bootloader going

#

then select that port, and try uploading Blink

lucid arch
#

Thanks Dan and ladyada, works like a charm ... the lights stayed red previously, so i could not select a port, whereas now they turned green and I was able to.

meager fog
#

you can go back and forth - have fun!

lucid arch
#

@tulip sleet : so, the circuitpy drive is now ejected. I cant really get back to it, can i?

tulip sleet
#

if you reload circuitpython you will see it again.

#

(If you've replaced CPY with an Arduino program. If you haven't, just press the reset button once.)

#

CircuitPython is "just another program" that you can load. It and any Arduino sketch would replace each other, depending on which you just loaded.

lucid arch
#

ah i see, so my cpy has been replaced then, since i uploaded an arduino sketch ..

#

that means i need to the get the latest uf2 file again and drag that over to my cplayboot. isnt this correct?

tulip sleet
lucid arch
#

2.2 is properly released now? adafruit-circuitpython-circuitplayground_express-2.2.0.uf2

#

really cool .. πŸ˜ƒ

meager fog
#

yep!

lucid arch
#

you guys are ploughing through at the speed of light

#

thanks a lot πŸ˜ƒ

meager fog
#

zoom

lucid arch
#

thanks all for your help

#

good evening.

#

before i go, i remember last time (3ish weeks ago), that the microphone of cpx was still not figured out yet

#

is that all done now?

idle owl
#

There's a huge fix in 2.2.0 for that

#

There are some things it can't do just because of the nature of the hardware, but depending on what your issue was, yes, there's a huge fix for it.

lucid arch
#

so cpx is no longer a developer edition but 2.2 is geared towards all users out theere now?

idle owl
#

I don't know whether they've changed what's printed on it, but we're definitely working towards that being the case. It'll be shipping with CircuitPython on it soon

lucid arch
#

i see. cool

#

is there a time on when the official cpx board will be released?

idle owl
#

I don't know what the plan is on that. They mentioned on the live stream Wednesday that there should be new versions this year so maybe soon!

solar whale
#

@tulip sleet OK - no problem - just curious -

meager fog
#

@lucid arch the current CPX board is finished and final design

#

there will be no updates to it

#

there may be new ones out later this year, perhaps an nRF52 based one, if it works out

idle owl
#

Yay! Good to know on all counts, thanks

raven canopy
#

is there an easy to find list for desired libraries/drivers? need to finalize my current adafruit cart and figured i'll stack it with as much "TODO: CPy" as i can... πŸ€‘

meager fog
#

whew there's a bunch, what's your interest (in general)?

raven canopy
#

well, IOT/AIO is where i've been lately. but, honestly its just making things work... next project is most likely a CPy based mini-sampler/sequencer/synth type deal...

sick creek
#

the functionality what is missing in Circuitpython it's good to get so new blinka boards that is then awesome

meager fog
#

i think getting Trellis to work would be cool

#

that would make for a good sequencer controller interface. we hvae an HT16K33 library but not one for buttons

raven canopy
#

well, that definitely is good for sequencer. i was going to use plain 'ol pushies. also plan to work on rotary encoder in that project. i'll give the Trellis consideration! thanks for the recommendation ladyada!

meager fog
#

i have some rotary encoder code

raven canopy
#

well, @slender iron has an open issue on it, for SAMD51 since it has capability built-in. obviously i'll have to wait till the M4 flavors come out. if you've already tackled it though, then I can roll onto something else.

tulip sleet
#

@solar whale every 3.0 build I try on the latest commit, including m4, is going into safe mode on ctrl-D. So there's definitely a bug -- thanks for noticing.

manic glacierBOT
solar whale
#

@tulip sleet my M4 build is ok.

manic glacierBOT
tulip sleet
#

@solar whale hmm what is the commit showing on startup, and what do you see on ctrl-D?

solar whale
#

@tulip sleet oops - no it not

#

I just did not notice - my FS sitll works and code runs.

#
Running in safe mode! Not running saved code.



You are running in safe mode which means something really bad happened.
Looks like our core CircuitPython code crashed hard. Whoops!
Please file an issue here with the contents of your CIRCUITPY drive:
https://github.com/adafruit/circuitpython/issues

Press any key to enter the REPL. Use CTRL-D to reload.

Adafruit CircuitPython 3.0.0-alpha.1-48-g5cb361c-dirty on 2018-01-05; Metro M4 Express with samd51j19
tulip sleet
#

same commit - it may be a merge issue with the new single/double-click boot code @slender iron added to 2.2. I'll have to do some diff'ing later

solar whale
#

waht impact does safe mode have?

#

never been there tahtI can recall...

tulip sleet
solar whale
#

ah - I see now looking at main.c OK - thats why I didn't notce on M4 - no main.py. On trinket, I had the demo so I was expecting it to run and it didn't.

#

@tulip sleet FYI - nrf52 does not go to safe mode on boot.

slender iron
#

I'll have a related PCA9685 PR in a few hours

idle owl
#

Ooh I have one of those for testing

#

I feel like it should be possible to make D13 pulse with code. But I'm not sorting how. I thought this was right: python pwm = pulseio.PWMOut(board.D13) pwm.duty_cycle = 2 ** 15 time.sleep(0.1)

#

Or rather that's all I found and it looked like it would do what I wanted.

raven canopy
#

order complete! i've accepted ladyada's Trellis on CPy challenge πŸ˜„ , as well as the VEML6070 UV Index (cheap fun sensor), and remembered that I have the Polou Sharp distance sensor available that I can try and work on...

idle owl
#

nice. Sounds like fun!

meager fog
#

@tulip sleet @idle owl do you remember the pylint # for letting me have even equal sings

#

like ```_SGP30_DEFAULT_I2C_ADDR = const(0x58)
_SGP30_FEATURESET = const(0x0020)

_SGP30_CRC8_POLYNOMIAL = const(0x31)
_SGP30_CRC8_INIT = const(0xFF)
_SGP30_WORD_LEN = const(2)

pylint: enable=bad-whitespace```

#

its not bad-whitespace tho

idle owl
#

yeah it is.... ```python

Register addresses:

pylint: disable=bad-whitespace

REG_OUTADC1_L = const(0x08)
REG_WHOAMI = const(0x0F)
REG_TEMPCFG = const(0x1F)```

#
DATARATE_LOWPOWER_1K6HZ  = const(0b1000)
DATARATE_LOWPOWER_5KHZ   = const(0b1001)
# pylint: enable=bad-whitespace```
meager fog
#

i did that tho??

idle owl
#

hmm

meager fog
#

oh wait typodz

idle owl
#

that'll do it

meager fog
#

go-team-me-can-type

idle owl
#

yeah! highfive

#

since it's totally team-me-half-the-time-too

manic glacierBOT
#

SAMD uid function is now reporting longer (proper) unique numbers. Thanks to @tannewt for helping me get the shortness straightened out. And thanks to @Andon-A for doing uniqueness testing.

To keep things standard, I'm now working on adding this to ESP8266 by calling the existing machine.unique_id. Gotta get the esp vagrant toolchain up and running...

After that will come the nRF. I've got a board on the way, so hopefully we can get this issue closed out in a couple weeks.

timber mango
#

The demo code on
https://learn.adafruit.com/adafruit-seesaw-atsamd09-breakout/circuitpython-wiring-test
doesn't like it when I try it in the REPL, running on Metro M0 Express:

Adafruit CircuitPython 2.2.0 on 2018-01-02; Adafruit Metro M0 Express with samd21g18
>>> from board import *
>>> import busio
>>> import adafruit_seesaw
>>> import time
>>> myI2C = busio.I2C(SCL, SDA)
>>> ss = adafruit_seesaw.Seesaw(myI2C)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Seesaw'
>>> 
#

I'll revert to 2.1.0 and see if it helps anything. /zero_clue_time /didn_t_help

slender iron
#

@timber mango what does dir(adafruit_seesaw) show?

timber mango
#
['__name__', '__path__']
>>> 
slender iron
#

seems like the import failed silently

timber mango
#

There's a lot it does bring in, though:

slender iron
#

do you have an adafruit_seesaw.py file or mpy?

timber mango
#
>>> ss = adafruit_seesaw(
SCK             D10             D11             D13
__name__        D12             SDA             A5
A4              MISO            A0              A1
A2              A3              D1              D0
D3              D2              D5              D9
D8              NEOPIXEL        D4              D7
D6              FLASH_CS        busio           adafruit_seesaw
time            MOSI            myI2C           SCL
RX              TX
>>> ss = adafruit_seesaw(

I don't understand your question (but, no, afaik). I have code.py from the demo page.

slender iron
#

didn't you copy a seesaw file over onto the CIRCUITPY drive?

timber mango
#

No an entire .zip contents renamed as asked in the tutorial.

slender iron
#

or was it a folder?

#

ah

timber mango
#

under lib

slender iron
#

those instructions are weird

timber mango
#

Maybe the renaming was mssing a case change on the S in Seesaw

slender iron
#

try import adafruit_seesaw.adafruit_seesaw as adafruti_seesaw

#

the first one is the folder and the second is the file

timber mango
#

Memory error (Metro M0 Express is target)

#

I'll try embedding your statement in the source. I typed at the REPL when I got the Memory error

slender iron
#

(thats really where the guide should point)

timber mango
#

white light. let me see what repl says

#

typo. fruti hahahaha

#

Here is:

soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
  File "code.py", line 9, in <module>
  File "/lib/adafruit_seesaw/adafruit_seesaw.py", line 116, in __init__
  File "/lib/adafruit_seesaw/adafruit_seesaw.py", line 123, in sw_reset
  File "/lib/adafruit_seesaw/adafruit_seesaw.py", line 246, in read8
  File "/lib/adafruit_seesaw/adafruit_seesaw.py", line 253, in read
  File "/lib/adafruit_seesaw/adafruit_seesaw.py", line 253, in read
AttributeError: 'I2CDevice' object has no attribute 'readinto'
slender iron
#

what version of bus device did you download?

#

downloading the bundle and copying to the metro will make it easier than doing individual libraries

timber mango
#

I'll look at that github and see if I can figure out where they go.

#

bundle is 2.1.0 in late October to match 2.1.0 release

#

I'll roll it forward again to 2.2.0

slender iron
#

ah, grab the newest (even if it says 2.2.0)

#

it'll work on 2.1 as well

timber mango
#

I was grabbing at straws so I'll roll it forward again (had reverted back to 2.1.0 as a blind attempt here)

slender iron
#

yup, I think it was the weird folder structure that was confusing to start

timber mango
#

Clearly your new import improved things. ;)

slender iron
#

πŸ˜ƒ

timber mango
#

Victory! The original code.py looks like it's going to work with the github mpy you pointed me to. Your import applies to when it's in a folder (which it is not, following the github .zip kattni posted 16 days ago).

#

THANK YOU Scott. Awesome.

slender iron
#

yup exactly

#

the folder structure and filename impacts how you import things

#

glad you got it going!

timber mango
#

This is great. The seesaw hardware is a nice bit of kit.

slender iron
#

<@&356864093652516868> here is the beginnings of a 2018 circuitpython post. Feel free to add comments in the doc: https://docs.google.com/document/d/1lAzMxgs1_QW_iPu2FD9_vIWT-1WV9nFuSOl7p7JjZDQ/edit?usp=sharing I'll likely keep working on it off and on over the weekend. I hope to have it fully drafted for the meeting next week

cunning crypt
#

@slender iron I'd advise turning OFF editing for anyone that clicks that link.

#

I largely trust the active people in the chat, but there's still 3000+ people who are registered here. I'm not sure I trust all of them.

slender iron
#

it stores the edit history so I won't lose it

cunning crypt
#

Your call. I just don't trust everyone.

timber mango
#

The Seesaw module does not appear to have support for PWM in Python (CircuitPython, and RPi version). I don't see it in Circuit Python, nor in the documentation. Only in the Arduino doco.
As mentioned in #help-with-projects,
This looks like a good overview of what Seesaw can do (it's for Python):
https://adafruit.github.io/Adafruit_Python_seesaw/classAdafruit__Seesaw_1_1seesaw_1_1Seesaw.html

Here's the Arduino version of the doco:
https://adafruit.github.io/Adafruit_Seesaw/classAdafruit__seesaw.html

In that, there's a mention for setting PWM frequency under Arduino:
https://adafruit.github.io/Adafruit_Seesaw/classAdafruit__seesaw.html#a73d0a1f528a29604c5666ffd39eb8bd9

Nothing like that correspondingly in the CircuitPython implementation that I could locate.

#
>>> dir(ss)
['get_version', 'digital_read', 'read8', 'digital_read_bulk', 'read', 'write', 'digital_write_bulk', 'eeprom_read8', '__init__', 'eeprom_write', 'analog_read', 'get_options', 'pin_mode_bulk', 'sw_reset', 'digital_write', 'OUTPUT', 'set_GPIO_interrupts', 'INPUT_PULLUP', 'uart_set_baud', '__qualname__', 'eeprom_write8', 'write8', '__module__', 'set_i2c_addr', 'get_i2c_addr', 'pin_mode', 'INPUT', 'analog_write', 'i2c_device']
>>> 
slender iron
#

@timber mango it might be called analog write

timber mango
#

No kidding. Huh! Thanks.

slender iron
#

its an arduino thing

timber mango
#

That's not something I would have found until I thought I needed such a thing. It's right there, thank you. /egg

ruby lake
#

should a serial port for the REPL show up as "Teensy USB serial" in the device list?

#

still having issues getting the M0X serial poert to be opened by anything

tulip sleet
#

@ruby lake DId you install a teensy driver in the past, or install the Teensy additions to Arduino? What version of Windows are you using?

ruby lake
#

This is win7, and I have a bunch of stuff installed by the arduino boards manager

tulip sleet
#

do you have a teensy that you want to use?

ruby lake
#

Arduino UI and CP need to "play nice"

#

I am not sure, did the Trinket (attiny85 type) use it?

tulip sleet
#

go to Device Manager, right click on the Teensy COM device, choose Uninstall, and check the box that says "uninstall the software" (not sure of exact wording)

#

it was possibly installed by an old version of the Adafruit drivers. When you installed the new 2.0.0 or 2.1.0 driver package, did you uninstall all the old "Adafruit" drivers before doing that?

ruby lake
#

hm, unsure, checking

tulip sleet
#

did you look at that forum post I pointed you to a bunch of hours ago, about how to clean up?

ruby lake
#

yeah

#

I am hesitant to do all that in case it breaks the arduino stuff I use

manic glacierBOT
ruby lake
#

hm, there are a number of instances of "Windows Driver Package - Adafruit Industries LLC (usbser) Ports" installs

tulip sleet
#

You can always reinstall Arduino. The problem is that there are a number of sort-of "universal" serial drivers for Win7 that claim they are the driver to use, based on category of device rather than USB Vendor/Product ID numbers.

#

so remove everything that says "Adafruit". Also remove the Teensy driver as I told you. Then unplug all the boards. Then install the new 2.1.0 driver package. Only check the first box, for all the Feather, etc. boards. Then plug one board back in

ruby lake
#

right

#

I'm on that now

pastel panther
#

hey @tulip sleet , I was just reviewing the changes on master over the last few weeks; I didn't see any obvious SPI changes; is that right?

tulip sleet
#

@pastel panther I added some bidirectional SPI support. The big change before that was SPI support at all.

pastel panther
#

ok

tulip sleet
#

latest master goes into safe mode when you type ctrl-D, but it doesn't actually seem to break anything (except it won't run main.py automatically)

pastel panther
#

@tulip sleet I'm compiling again for my m4 board to get back to debugging the dotstar issue I ran into

tulip sleet
#

that needs to get fixed, but it's not fatal

pastel panther
#

ok

#

@tulip sleet if I get annoyed and want to bypass the dotstar I should be able to give power and a pin to a neopixel and update the board files accordingly and it should magically work with no issue, right? ;P

tulip sleet
#

@pastel panther right it will work perfectly the first time

#

and you will make no typos

pastel panther
#

excellent

ruby lake
#

It tries to install "Feather M0 Express" and comes back "no driver found" after wiping old drivers and isntalling latest

tulip sleet
#

@ruby lake what is now showing in the "Installed Progarms list"

ruby lake
#

I tore it all out again one moment

tulip sleet
#

i am firing up my w7 test laptop

ruby lake
#

I now have ADafruit Boards CDC Driver 11/15/2007 5.1.2600.0

tulip sleet
#

i am doing the same ,with the 2.1.0 driver bundle

ruby lake
#

again, no driver found

tulip sleet
#

so you plugged in a Feather M0 Express? Was it set up for circuitpython or did it have an arduino program on it?

#

i am just trying to dupe what you're doing

ruby lake
#

it is set up with CP 2.2.0

#

The CIRUITPY: disk appear fine

#

it is just the usb serial it cannot install

tulip sleet
#

k, hold on while I set up one the same

ruby lake
#

where does the installed driver kit get stored so I can do a "browse for driver"

tulip sleet
#

i get an "Installing Device Driver software" and it's searching Windows Update, so I'm skipping that

ruby lake
#

thats what mine does when it fails

tulip sleet
#

ok, i'm getting the same error as you. I'm going to try the previous driver bundle. I don't get an error when plugging in a Trinket M0.

#

(you are vindicated!0

ruby lake
#

heh, this is why I consider the more important engineering requirement to be tenacity πŸ˜‰

#

yeah I can talk to the CPX

#

and arduino stuff seems to still work

#

I mostly just use an isp programmer there

tulip sleet
#

the driver .INF doesn't have the USB PID for Feather M0 Express for CircuitPython listed correctly. I can make you a new .INF that will work for now, but it will not be signed

ruby lake
#

can I change that in the device manager or my own inf

tulip sleet
#

I can make a new unsigned driver package for you to test. Just have to figure out where I have it (too many Windows machines here)

ruby lake
#

making sure my huzzah still is found brb

#

yep. it works

tulip sleet
#

i made an an installer. will test locally first

#

@ruby lake works! Just logging into discord on w7 to get it to you

pastel panther
#

hey @tulip sleet it looks like asf4/samd51/include/pio/samd51g19a.h definies PIN_PB08 but not TC4 which causes a problem when samd51_pins.c:254 expects it to be defined; Is this an ASF bug?

tulip sleet
#

@pastel panther I ... do not know. But TC4 might be defined elsewhere.

pastel panther
#

TC0,1,2,3 are defined in the same file, makes sense it would be there, right?

idle owl
#

@tulip sleet I have the soundmeter running on a CPX with a 24-pixel ring soldered to the outside of it. They run opposite directions from each other, but it looks kind of neat that way so I didn't try to figure out how to reverse it on one of them. It's slower because it's running everything twice - the ring is RGBW so it needs different code.Trying to change the colors of the volume portion it and realising I'm not entirely sure what your equation is doing because it doesn't seem to have the same range of colors when I change it around. Like yours has a nice range from red to yellow-green and even if I just swap around the sections of your RGB code, it doesn't seem to have the same mix. Really it might be me not seeing it though. Since it seems like logically it should do the same thing. It's math.

pastel panther
#

gotta run to get food, bbiab

tulip sleet
#

@pastel panther why are you using samd51g19a instead of samd51j19a? That is the 48-pin version, so not all the TC's in the J version are available

#

@idle owl the volume color just set by


def volume_color(i):
    return (200, i*(255//NUM_PIXELS), 0)
idle owl
#

Right

tulip sleet
#

but that's for RGB, not RGBW, so do you have a diff volume_color for the outer ring? or do you just add a ,0

idle owl
#

And I tried swapping where the 200 and the I*etc are. And it really seems to me that it's less colorful when I Do that.

#

I had to make 2 volume colors, one with a ,0 on it

#

So there's 2 versions of everything to accomodate. That's why it's slower. It's not awful though.

tulip sleet
#

since the Green is varying by 255//NUM_PIXELS, then the gradation will be smaller on the inner ring, because now NUM_PIXELS is 34 instead of 10. So about 1/3 the variation per pixel

idle owl
#

separate init for ring and CPX

#

So there's 2 num_pixels as well

#

Each one is a separate sound meter.

tulip sleet
#

oh, i see I though it was chained

idle owl
#

That's also why they're going in opposite directions.

#

I wasn't sure how to chain them

#

and this ended up looking really neat so

#

I had to offset the ring so the start was at the same place as the CPX internal neopixels. Which took some fiddling to figure out how to get peak and the volume start to move. But I finally sorted that too.

tulip sleet
#

maybe just paste your code?

idle owl
#

Oh. Sure.

#

mm too big. Let me make a gist.

#

The error checking is because it randomly threw them a few times and I was thinking of using it as a demo in a presentation I'm doing on Tuesday and I wanted it not to stop. I don't know why it threw the errors. Usually did it when I was trying to force the volume to max to see the colors by tapping the mic with my finger.

#

Also not even sure you can do except twice like that.

#

I was mostly telling you what I did. I'm not sure there's much to be done to make it faster the way I did it. It's running through two loops every time so there's going to be some lag. Also not sure I could have chained RGB and RGBW anyway. Not without it doing that weird offset thing where 1/4 of the RGBW doesn't work and the rest of it looks weird.

tulip sleet
#

The c and cr variables are not passed into sound_meter_cpx() and sound_meter_ring(). I don't understand why you aren't getting undefined vars.

idle owl
#

they're up in the defs...

#

So they're getting passed in before the code, yeah, but not really because it's running the while loop and pulling the defs in. I thought anyway.

ruby lake
#

@tulip sleet the serial port now shows up correctly named, but I cant open it

raven canopy
#

what Dan is saying, I think, is that c and cr are not global variables, so they're not accessible to the functions outside of the while loop...

idle owl
#

I'm saying it works, even if it apparently shouldn't πŸ˜ƒ

raven canopy
#

lol. can't really argue with that. πŸ‘

idle owl
#

πŸ˜„ That never occurred to me to be an issue because that never cropped up as an error. It's sitting in front of me playing nice at the moment.

tulip sleet
#

actually it looks like they are, but that's only because the while is at the top level. e.g. this works: test.py:

def p():
    print(x)

x = 2
p()
idle owl
#

I ran into issues initially because I copied and pasted the sound_meter function and didn't change everything that needed to be changed, but it's been good since I figured that part out.

#

Nice!

tulip sleet
#

but it didn't expect it to.

idle owl
#

Well fancy job, me, then. Figures, because it didn't occur to me that it wouldn't work.

tulip sleet
#

so what's the current problem again? I'm losing track.

#

are the colors on the CPX itself OK

idle owl
#

Oh there really isn't one. I was messing with the equations in volume_color and it doesn't seem to look as nice when it's rearranged as it does the way you have it. I think it might just be me.

#

Yeah they're fine

#

It doesn't quite match but that's because the ring is offset and the colors aren't.

#

So the CPX starts with red, and the outer ring starts with yellower.

tulip sleet
#

oh, i see, because of the i + 5

idle owl
#

The way the volume_color looks now has a range of color. And if I swap things around in that equation, so same numbers, but in different places, it doesn't seem to have the same range. Like... if I swap 200 and i*etc, so the i-part is in red's place and the 200 is in green's place, the entire thing looks green to me.

tulip sleet
#

but what's happening is that i+5 is going to be greater than NUM_PIXELS_RING sometimes, so the i * (255 // NUM_PIXELS_RING) is going to be >255, and it will wrap around.

idle owl
#

Right so I think if I max it out I'll eventually see the red pixel but that's easier said than done. Especially with the lag

tulip sleet
#

as for swapping red and green, I think it might have to do with the your perception of the brightness of red vs green. I am hopeless at judging this as I am protanomolous: I don't see red very brightly (I am red-green colorblind in a certain way, like 1% of the male population instead of the other 9% that is deuteranomalous who don't see green very brightly)

idle owl
#

I did remember that. That's why you asked me whether it looked good or not when you first did it πŸ˜„

tulip sleet
#

like if you make red 255, vs green 255, does the green look brighter?

idle owl
#

Yeah I think you're right though. I think it might be me.

#

Hmm, it definitely seems more green than the red seems red

#

if that makes any sense

#

So yeah I guess brighter is a word for it

#

I was slowly coming to the conclusion it was my perception though.

tulip sleet
#

but you're not color deficient as far as you know?

idle owl
#

As far as I know I see more colors than most people, actually

#

Definitely not deficient, I have been tested multiple times between vision tests and jobs where it was required.

tulip sleet
#

so I'd go for blue πŸ˜ƒ

idle owl
#

I'm a fan of blue.

tulip sleet
#

just watch for the i+5 thing, because you're going to go out of bounds on pixels_ring and wrap on the volume_color_ring

raven canopy
#

hmm....pinned messages are not showing up for me. discord issues again, maybe?

idle owl
#

oh. Maybe that's what's been throwing the error

#

@raven canopy I see them

raven canopy
#

ahhh. might need a reload.

tulip sleet
#

me too in both browser and linux app

#

@ruby lake I'm using Tera Term and can connect to Feather M0 Express just fine on the COM port. If you type ctrl-C do you see anything, or it just can't connect? What terminal program?

#

if mu, it may not know the right devices to look for

ruby lake
#

@tulip sleet both the one in mu editor and putty, can try realterm

#

mu says "cannot connect to device on port COM30"

tulip sleet
#

i like tera term because it finds only the actually connected ports and lists them in a dropdown

#

mu may not know the USB PID for the board. That would jive with the same mistake being made in the driver package

#

Limor made mu look for USB devices with certain ID's

#

dunno about putty, but I am tired of using putty and changing the COM port all the time

ruby lake
#

arduino IDE cant find the port even though it is listed

pastel panther
#

@tulip sleet My m4 board uses the G19, not the J19 so it seemed to make sense that I tell CP I'm using it ;P

ruby lake
#

RealTerm tells me "ie_BadId - Specified comport doesn't exist"

tulip sleet
#

@pastel panther but do you have pins avail that have TC4? If not, then maybe it won't list them?

#

@ruby lake - you're getting the port from Device Manager Ports section?

ruby lake
#

it lists it there, an it shows up as COM30 in various apps, but it cannot connect to it

#

is not found/not actually there

tulip sleet
#

@ruby lake - maybe just unplug, reboot and try again

ruby lake
#

checking that CPX still works

tulip sleet
#

@pastel panther ok I see PB08

#

@pastel panther I would contact MicroChip support

pastel panther
#

@tulip sleet I don't think the G19 actually has a TC4 since the datasheet (and other stuff, I think) says it only has 4 TCs, which I assume would go to TC3

tulip sleet
#

ah ok

pastel panther
#

@tulip sleet That said, section 6 of the datasheet also says PB08/pin 7 on the G19 does have TC4 but I think it's mistaken or only true for some chips

#

@tulip sleet So with that in mind, it looks like samd51_pins.c is not quite right

#

at least not for the G19

#

or G18 probably

tulip sleet
#

well, Scott worked up that list from the datasheet tables, and we didn't actually try any G19 chips, so unfortunate, but not surprising. what page on the datasheet does it say only four TC's?

pastel panther
#

I'm going to add another #ifdef to check for TC4 in samd51_pins.c

#

page 17

tulip sleet
#

sounds good

#

maybe double-check other G vs J diffs if you have a chance

pastel panther
#

will do

tulip sleet
#

tnx

pastel panther
#

looks like other parts of the file are allready looking for TC5,6,7 so 4 must have been a off by 1 error

tulip sleet
#

you could verify non-existence by code, and it would be good to tell MicroChip as well. Also check their errata for the 51's.

pastel panther
#

sure, good idea

tulip sleet
#

@ruby lake any luck? I'm fading and can check back tomw. I know how the USB ID slipped between the cracks

ruby lake
#

@tulip sleet I will continue tomorow as well

tulip sleet
#

good night all

pastel panther
#

night Dan

idle owl
#

@tulip sleet Good night!

#

I'm headed out as well

pastel panther
#

@idle owl Remind me next time you see me that I have a question for you

idle owl
#

heh, I'll try to remember

pastel panther
#

ta ta

ruby lake
#

great, now it cant open the com port for cpx either

#

something is assuredly broken in the driver kit

#

more fun later

slender iron
#

@pastel panther smaller chips usually have fewer TCs. Its totally possible I missed some ifdefs

pastel panther
#

@slender iron Maybe, but I don't think the datasheet makes it very clear; it's like the TC4+ references in the pinmux section should say " *except for G18/G19"

slender iron
#

yeah, it usually does at the bottom

#

I think samd21 does at least

#

it does say Not all signals are available on all devices. Refer to the Configuration Summary for available peripherals. on the samd51 data sheet

pastel panther
#

ah

raven canopy
#

@slender iron I think I may have actually cracked combining the two vagrants... building now to check functionality.

slender iron
#

nice!

raven canopy
#

samd built w/o issue. now on a "pause"...forgot to compile the esp SDK. :watching_paint_dry: πŸ˜„

#

i was thinking that it would be better to create a new repo for the combined version so that people aren't forced to have both. combined does add some serious time to the initial up.

raven canopy
#

well, esp compiling seems to run correctly. but i'm getting build errors from the crypto/aes files in axtls; things like unknown type name 'uint8_t'. (i cloned CPy vs MPy in the vagrant) definitely a tomorrow problem...its sleepy time. 😴 @slender iron

manic glacierBOT
timber mango
#

@tulip sleet
Raspberry Pi Seesaw setup documentation: dialog changed for I2C enable
[ https://learn.adafruit.com/adafruit-seesaw-atsamd09-breakout/raspberry-pi-wiring-test ]
The Raspberry Pi needs to be enabled for i2c to use the Seesaw. This amounts to automatic loading of a kernel module at boot time. The instructions in the Guide that tell how to enable this are outdated.

 $ sudo raspi-config

corrected information:

5 Interfacing options  Configure connections to peripherals

rescinded:

7 Advanced Options    Configure advanced settings

resume corrected information:

5 Interfacing options  Configure connections to peripherals```
 ... and then:
```dialog
P5 I2C    Enable/Disable automatic loading of I2C kernel module
dense widget
#

It runs, but it doesn't respond to sound. And when I insert a line after line 87 in the script to print out the contents of the samples taken, all I see is an array full of zeroes. I wonder if our circuit playground is broken, or if there's an error in the code.

opaque patrol
dense widget
#

I followed that link and installed from there in the last week or so...

#

Is there a good way of checking the version number?

#

Actually, no! I see my old download, which is 2.1.0. I guess I can install 2.2.0...

opaque patrol
#

@dense widget It appears in the REPL or you can check the boot_out.txt file.

raven canopy
#

I believe the version prints in the REPL...

opaque patrol
#

The boot_out.txt file is on the CIRCUITPY drive in explorer (finder on Mac)

timber mango
#

awesome! Thank you. (I'm working with yminsky)

opaque patrol
#

Did you find the version number?

dense widget
#

We did! It's 2.1.0. We'll upgrade and try again. Thanks everyone.

manic glacierBOT
wooden lichen
#

What is the main difference between circuit python and micropython?

#

Are they differences really that minimal?

solar whale
#

@wooden lichen It depends on what you are trying to do. CircuitPython supportts a different suite of microprocessors than micorpython with a major focus on the atmel samd midcorprocessors. The only board in common, I believe its the esp8266. In additon the basic module structure is somewaht different. New board support is in the works so feel free to ask about specific plans. Then next boards to be added will be some of the Nordic Semi nrf52 processors.

meager fog
#

@wooden lichen the underlying hardware api (the 'import' parts) differ - but other than that, its the same

#

so maybe 98% same, 2% different. mostly how you define pins, SPI, I2C etc.

stuck elbow
#

which basically means that all device drivers need to be separate

meager fog
#

i think im going to write an avr programming library

#

today

stuck elbow
#

Wiring is not good enough?

meager fog
#

whats wiring

stuck elbow
#

what Arduino uses

#

or rather, what Arduino used to be

#

before it was called Arduino

meager fog
#

ooh i thought you meant physical wiring

#

yeah ive written code for arduino but you have to use avrdude, this would be standalone

#

you just drag the hex you want to program onto the dive

#

drive

#

and then it would be standalone

#

no drivers/software

tulip sleet
#

i've wondered about using the uf2 bootloader for everything (at least everything M0 and up)

stuck elbow
#

so a new bootloader for the 32u4 basically?

#

or also VUSB?

wooden lichen
#

@meager fog Ok great thanks!

tulip sleet
#

@ruby lake I submitted a PR to update the driver package. I do not have the problem you're having getting the COM devices to work, so I think that's a different issue - not sure why you're seeing it.

ruby lake
#

@tulip sleet I tried it on another win7 machine and it works properly. I must still have some driver on this one that is munging things. My issue is I cannot break the functionality of other platforms like STMicro just to get this to work. Everything needs to play nice. πŸ˜‰

tulip sleet
#

@ruby lake - one of these days if you're willing to upgrade one or more machines to win 10: it does not require drivers for ordinary serial USB connections - that's now built in. So many fewer drivers needed.

ruby lake
#

@tulip sleet I have "Windows Driver Package" kits listed for Cypress PSoC, SILabs, STMicro and Adafruit

tulip sleet
#

that's a lot, and not all of them might have made the best choices for drivers...

ruby lake
#

I will probably dump the Cypress stuff, I've not used it in years

opal elk
#

I know what decorators are and did some stackoverflow-reading about them

#

but I don't see how that translates into anything

tulip sleet
#

@opal elk The decorators make the .datetime visible as something that looks like an attribute. e.g. print(ds1307.datetime) or ds1307.datetime = ...

opal elk
#

ahhhhh got it

idle owl
#

Ok good πŸ˜ƒ

tulip sleet
#

The first one makes it readable, the second makes it writable.

opal elk
#

right

#

I've added attr methods before but hadn't ever gotten deep enough into python guts to know what a decorator was (though I knew the term)

#

I need to look more into how I2C actually works. eventually. I have other projects to do first.

ruby lake
#

Now to see how well I can do 4-channel voice assigning in CP

scarlet lantern
#

I have a M0 adalogger with a DS3231 and I'd like to use them in a datalogger to log my data and real time. In Circuit Python I need Adafruit_sdcard and adafruit_ds3231. I've used each of them without problems. But when I import both it complains about memory issues. What if I put my /lib in my SD card ? Do I need to compile those libraries ? Thanks.

idle owl
#

I don't think you can put /lib on the SD card. Are you importing the .py versions of the libraries or are you using the .mpy versions?

scarlet lantern
#

I'm using the .mpy version.

idle owl
#

Hmm. Always hoping that's the issue when there's a memory problem since it's the easiest fix.

#

I haven't worked with CP and SD cards much, so hopefully I'm wrong about being able to use it to hold the libs.

scarlet lantern
#

I suppose .mpy is the smallest one ?

idle owl
#

Yeah exactly

#

Ok so here's another question

#

have you deleted literally every other little file off of the CIRCUITPY drive? Because now that I'm thinking about it, I ran into the same thing with the serial camera and the Adalogger SD with CircuitPython

#

I had to put the files on in a certain order (no idea why) and I had to delete the dot files that Mac keeps putting on it. I don't know what OS you're running

#

And empty the trash each time too. Couldn't usually "replace" the files, had to delete them and copy the .mpy fresh.

#

Or is it failing memory on import? I might be conflating two concepts here.

scarlet lantern
#

I'm in linux. I kept only the essential ones. folder adafruit_bus_device, adafruit_register and files adafruit_ds3231 and adafruit_sdcard. Those four in my /lib folder.

idle owl
#

Ok then that's unlikely to be it. I don't think Linux drops hidden files anywhere.

scarlet lantern
#

doesn't seem to do so.

#

I don't see them.

idle owl
#

Yeah fairly certain it's only a Mac thing.

#

And I'm not sure past that. I'm wondering if there's a way to slim down the code or something. But past this I'm kind of guessing based on general concepts.

scarlet lantern
#

If only I could import adafruit_sdcard first and after when I mount the SD card I could import the adafruit_ds3231 from a /lib on my card ?

idle owl
#

I'm not sure that CircuitPython can interact with the SD card that way. But like I said, I'm not sure, so you'll want to hear from someone who is.

#

Figured I'd try to help anyway in case it was one of the things I knew to fix

scarlet lantern
#

Thanks anyway.

meager fog
#

@idle owl heya do you remember how to leave safe mode?

idle owl
#

@meager fog Oh.. yeah. You have to remove whatever caused it or it keeps bouncing back into safemode.

#

So if you made a change to your code, you need to undo it, etc.

meager fog
#

mm thats not it, my m4 keeps being in safe mode for unknown reasons

idle owl
#

I think there's an actual issue for that right now

#

I think I remember Jerry and Dan talking about it, but one of them couldn't repro it or something?... this is vaguely sounding familiar

meager fog
#

yah im giong to try another build

#

(shrug)

idle owl
#

yah that might help.

#

3.0.0-alpha.1-48-g5cb361c-dirty is what Jerry was running apparently.

#

This was a convo from yesterday

#

I found it, as of yesterday at 5:40pm there was a bug according to Dan.

meager fog
#

wooah wtf my disk drive contents changed

#

bizarre

idle owl
#

yah that's odd

meager fog
#

yeah there's something weird, i think its reading the flash funny

solar whale
#

Here was Dan’s post from yesterday day. I don’t think it has been resolved yet.

#

See last note

idle owl
#

Thanks @solar whale. I was scraping from Discord history.

meager fog
#

yeah im going to go back to my m0 πŸ˜ƒ

#

im almost done with my avr prog library

solar whale
#

The problem exists on all Atmel boards for 3.0, I think. I first saw it on a trinket M0

idle owl
#

I sped up my demo code significantly! Running the sound meter on a CPX and a 24-pixel ring soldered to the oustide of it. It was super laggy running the loop twice but I moved around some pixel code and it's much faster now. Checking, it's still not nearly as fast running it only on one of them at a time. but still.

#

better than it was!

hot surge
#

@meager fog what will the additional avr library you're working on be used for? additional circuit python functions on avr chips? (just curious, trying to follow along with these discussions)

meager fog
#

nope for standalone avr programming. avr will never run circuitpython 😦 you really need arm cortex m0 or better

hot surge
#

ah, cool....thanks

meager fog
#

ok back to hackin!

#

/away

timber mango
#

Oh hi

raven canopy
#

ubuntu VM is giving me fits with nano....stupid terminal emulation. anyone got any tips? need to edit a .h in esp-open-sdk (and vim annoys me :D)

raven canopy
#

n/m..got it. gitcmd plays nicer than gitbash. just not as pretty. πŸ˜„

pastel panther
#

hey @slender iron and @tulip sleet look what I got working!:

Adafruit CircuitPython 3.0.0-alpha.1-50-gb1b89c4-dirty on 2018-01-06; SAMD51_proto with samd51g19
>>> import board
>>> import digitalio
>>> a2 = digitalio.DigitalInOut(board.A2)
>>> a2.direction = digitalio.Direction.OUTPUT
>>> a2.value = True
>>> a3 = digitalio.DigitalInOut(board.A3)
>>> a3.direction = digitalio.Direction.OUTPUT
>>> a3.value = True
slender iron
#

@pastel panther awesome! I just ordered my pyoven pcb

pastel panther
#

@slender iron Sweet! Are you using an m4?

slender iron
#

yup the 64 pin qfp

#

I'm hopin I got the support circuitry right

#

did you add the inductor? I left it off

pastel panther
#

Yes, based on looking at the metro m4 and the datasheet

#

CDC is obviously working on mine, but not mass storage; I'l have to look into that. I need to test out the flash too

#

I put the dotstar work on hold and plugged in a neopixel in the meanwhile and it pretty much just worked

slender iron
#

oh nice

#

I didn't add it so we'll see how it goes. it looked like it was optional

#

I only did the decoupling caps and the reset pull up

pastel panther
#

I'm sure it's fine; the datasheet has info for the 'linear only' version, and if you're running off mains power I'm sure efficency isn't a worry ;P

slender iron
#

yeah, exactly

#

the heater will be a much bigger issue

pastel panther
#

any pointers for debugging my mass storage issues?

slender iron
#

hows it not working?

pastel panther
#

It's just not showing up as a drive; I'm fairly sure the hardware works as CDC works as does mass storage with the bootloader

slender iron
#

you are on mac right?

pastel panther
#

yea

slender iron
#

can you tell if its enumerating right? its buried under about this mac or something

#

I usually use a beagle to debug usb

pastel panther
#

hmm, I'll check that

slender iron
#

any dmesg errors?

pastel panther
#

not as far as I can tell, just CDC stuff:

         0 [Level 5] [com.apple.message.domain com.apple.commssw.cdc.device] [com.apple.message.signature AppleUSBCDCACMData] [com.apple.message.signature2 0x239A] [com.apple.message.signature3 0x8021]
AppleUSBCDCACMData: Version number - 4.3.2b1, Input buffers 8, Output buffers 16
AppleUSBCDC: Version number - 4.3.2b1
slender iron
#

the first line is mass storage

#

USBMSC

pastel panther
#

oh right

slender iron
#

might check about this mac too

#

I believe you can see the separate end points there

pastel panther
#

it does show up under the USB Device Tree/ USB 3.0 High Speed Bus

slender iron
#

k, that seems promising

#

I'm surprised you don't see failed reads then in the dmesg

pastel panther
#

le me check again

#

nope

slender iron
#

did you try unplugging and plugging it back in?

pastel panther
#

yea, several times

slender iron
#

hrm

#

what tools do you have? debugger? beagle?

pastel panther
#

should I hope to see multiple entries in the System Info dialog for CDC and MSC? I only see one for the name of the board with basic info

#

I have a saleae

#

don't imagine that would help with usb

slender iron
#

I thought you'd be able to expand the entry to see more info

#

saleae can decode usb I think but I've not done it

pastel panther
#

when I do it says:

SAMD51_proto:

  Product ID:    0x8021
  Vendor ID:    0x239a
  Version:    1.00
  Serial Number:    A1344E2B15E47535020202D4144180FF
  Speed:    Up to 12 Mb/sec
  Manufacturer:    Adafruit Industries LLC
  Location ID:    0x14100000 / 12
  Current Available (mA):    500
  Current Required (mA):    100```
slender iron
#

if you have a debugger you should try breaking in one of the msc handlers

pastel panther
#

right, ok

#

what would be the best way to test the flash without MSC working? Is there a lib to access it directly?

slender iron
#

did you hook it up as qspi?

#

otherwise you could do spi from circuitpython

#

did you try MSC with internal storage?

pastel panther
#

I hooked up both

#

i didn't try msc with internal storage

#

by 'hooked up both' I mean I have a normal SPI flash ship and a QSPI chip wired up

#

I think I have the SPI chip as the MSC

slender iron
#

you could add code in filesystem to blink an led if reading it fails

#

I'm fading so I'll have to leave you to it

#

was just staying up to decompress from some PUBG (two chicken dinners tonight!)

pastel panther
#

good ideas, thanks for the help

slender iron
#

np, good luck

pastel panther
#

GJ on the wins

slender iron
#

thanks! it was exciting!

#

talk with you tomorrow

pastel panther
#

sure thing, ttyl. happy sleeps

slender iron
#

night

scarlet lantern
#

I have a M0 adalogger with a DS3231 and I'd like to use them in a datalogger to log my data and real time. In Circuit Python I need Adafruit_sdcard and adafruit_ds3231. I've used each of them without problems. But when I import both it complains about memory issues. What if I put my /lib in my SD card ? Do I need to compile those libraries ? Thanks. (launching my issue again).

solar whale
#

@scarlet lantern The SD Card driver allows CircuitPythom to read/write to an SD Card, but the files system for the circuitpython has to be on the SPI Flash for express boards or in the SAMD internal flash for non-express boards such as your adalogger. /lib cannot be executed from an SD Card.. At least not at this time. Perhaps others can somment on whether it is even feasible to implement in the future. Are the memory issues you are having are with fitting the /lib files on the M0 Adalogger or with avaialbe RAM when you execute the program? Moving the /lib to an SD card would not help if the problem is RAM anyway.

fading solstice
#

@scarlet lantern i don't have a adalogger, but i have a feather mo express, ds3231, and featherwing logger. I was able to import both and use both. memory is tight though. are you useing .mpy version of the libraries?

solar whale
#

@scarlet lantern I just tried a simple test on a Metro M0 express - I have an adalogger featherwing with a PFC8523 RTC and SD card. When I set the RTC then try to read from the SD card, I also run out of RAM. IN thes cas the /lib is on the external SPI flash but it does not help allow both drivers to run. There was discussion of trying to create a "stripped down" RTC driver at some point to see if it could be usable with the SD card Driver, but I don't know if there is active work on it at this time.

#

@fading solstice @scarlet lantern Thanks for the "better" news. Perhaps there is some hope. But it will be a struggle to add a sensor as well!

fading solstice
#

i agree

solar whale
#

@fading solstice @scarlet lantern with some fiddling with gc I was able to load both drivers as well. ```Adafruit CircuitPython 2.2.0 on 2018-01-05; Adafruit Metro M0 Express with samd21g18

import gc
gc.mem_free()
19696
import sdread
Hello world

gc.mem_free()
9136
gc.mem_free()
9072
gc.collect()
gc.mem_free()
12864
import busio
import adafruit_pcf8523
import time
from board import *
myI2C = busio.I2C(SCL, SDA)
rtc = adafruit_pcf8523.PCF8523(myI2C)
rtc.datetime
struct_time(tm_year=2018, tm_mon=1, tm_mday=7, tm_hour=15, tm_min=28, tm_sec=48, tm_wday=6, tm_yday=-1, tm_isdst=-1)
gc.mem_free()
3872

fading solstice
#

that is similar to what I am seeing. the gc.collect() does help

#

still tight

languid sage
#

Hello, A repeat of a previously reported problem. In the learning guide "adafruit-circuit-playground-express.pdf", downloadable from "https://learn.adafruit.com/adafruit-circuit-playground-express" there is a consistent problem. In the 12/12/2017 version I reported that the links (BIG green boxes on several pages) were broken. I just downloaded the latest pdf (dated 1/6/2018) and the link on page 42 is still broken. It works fine on the web page, but is broken in the pdf.

#

I generally download the pdfs, as it's a convenient way to put a document on a tablet, etc., for access while offline (as in "stuck at the airport, with limit power/wifi").

#

The online version works fine, and I was able to download the 2.2.0.uf2 file from there.

solar whale
#

@languid sage Thanks for pointing it out - Hopefully somone who can fix it will see this post. If you have access to the web version, you can also click on the Feedback link and post a note there so it goes directly to the author(s).

opal elk
#

looks like I can only edit my posts

languid sage
#

@solar whale Done!, Thanks

solar whale
#

@opal elk that probably is a good thing πŸ˜‰

opal elk
#

well, "authors can only edit their posts", sure, but this is me we're talking about!

#

πŸ‘Ό

solar whale
#

@opal elk ah - you are referring to editing the guide, I thought you meant editing other peoples discord posts !

opal elk
#

same principle, though

solar whale
#

@opal elk I think you have to be added as a "contributor" to edit the guide. Edit is grey out for me as well.

opal elk
#

(joking aside, if there's a role in the learning system for "can suggest edits on other posts" I'd be interested, because I do see typos now and then)

solar whale
#

I often see the moderators in the forums edit posts but it may be better to post a "correction" and tag the author so they actually see it. ONe problem with editing discod posts is that unless people reread them, they don't know it was edited. Too easy to "revise history". same with the forums.

#

@opal elk @idle owl Was I corect that using the "Feedback" link sensds a note to the guide authors directly? I've only been a contributor on one gude and have not seen it activated yet.

opal elk
#

no idea, sadly

solar whale
#

@opal elk I just entered feed back on your temp logger guide - we'll see !

#

@opal elk did you get a message about the feedback?

opal elk
#

@solar whale I didn’t get an email...

solar whale
#

hmmm - I guess my advice to @languid sage was misleading. I would hope a feedback request eventualy get to the authors.

#

I sent a DM to one of the authors about @languid sage request.

raven canopy
#

@solar whale @opal elk either of you have the vagrant toolchain setup for esp8266?

solar whale
#

@raven canopy I do have it - have not used it in a long time though.

raven canopy
#

ok. no need to put in too much effort, but can you recall having issues with compiling? I keep getting compile errors like unknown type uintX_t. I've edited the c_types.h file to uncomment all of the unsigned types...but still won't compile.

solar whale
#

no - it has always eorked for me - there are several warings in the esp8266 compile, bit no errors.

raven canopy
#

alrighty, thx. i'll keep plugging away at it. who doesn't love a good challenge!? 😢

solar whale
#

just fired mine up - I'll try it - are you building 2.x or 3.0

raven canopy
#

should be 2.x. Dan moved 2.2 to master right?

solar whale
#

no - he added 2.2 mods to master, but they are still different branches.

#

it will build in both but path is differnent in 3.0

raven canopy
#

well, i'll have to re-make esp-open-sdk again, but i'll give 2.x branch a shot. i'm pretty confident that the issue is with esp-open-sdk though....

solar whale
#

just compiled 2.x on my vagrant --- did you do a make clean before make?

raven canopy
#

yeppurs

#

think (hope?) i found the issue. there is a .patch file that is commenting out the file (prob on make)...

solar whale
#

@raven canopy just built master as well - worked ok - one other check - did you do git submodule update --init --recursive ?

raven canopy
#

yeah, i have that running in the Vagrantfile

solar whale
#

ok - is the .patch something added ?

#

I dont see it in my Makefile

raven canopy
#

well, i didn't add it. i first pulled the esp vagrant like 2 days ago...

solar whale
#

is this in the esp_sdk - I was looking in CP

raven canopy
#

do you have PATCH = patch -b -N on line 21? yeah, in the esp-open-sdk

solar whale
#

yes

raven canopy
#

ok. do you have any files like c_types-c99.patch?

solar whale
#

whole bunch

#

first is in line 200 patch_2.1.0

half sedge
raven canopy
#

do you have c_types-c99_sdk_2.patch?

solar whale
#

yes

half sedge
#

It listen to audio, detect when sound level is loud and send IR volume down.

solar whale
#
    201         echo -e "#undef ESP_SDK_VERSION\n#define ESP_SDK_VERSION 020100" >>$(VENDOR_SDK_DIR)/include/esp_sdk_ver.h
    202         $(PATCH) -d $(VENDOR_SDK_DIR) -p1 < c_types-c99_sdk_2.patch
    203         cd $(VENDOR_SDK_DIR)/lib; mkdir -p tmp; cd tmp; $(TOOLCHAIN)/bin/xtensa-lx106-elf-ar x ../libcrypto.a; cd ..; $(TOOLCHAIN)/bin/xtensa-lx106-elf-ar rs libwpa.a tmp/*.o
    204         $(TOOLCHAIN)/bin/xtensa-lx106-elf-ar r $(VENDOR_SDK_DIR)/lib/libmain.a user_rf_cal_sector_set.o
    205         @touch $@
#

that is the first entry - at line 200

raven canopy
#

that's the one that is commenting out the unsigned ints.... at least on mine. and its line 218 for me...hmm.

solar whale
#

is this what you have at 216 -- or ahs the makefile changed since I installed it 216 .sdk_patch_1.5.4: 217 echo -e "#undef ESP_SDK_VERSION\n#define ESP_SDK_VERSION 010504" >>$(VENDOR_SDK_DIR)/include/esp_sdk_ver.h 218 $(PATCH) -d $(VENDOR_SDK_DIR) -p1 < c_types-c99.patch 219 cd $(VENDOR_SDK_DIR)/lib; mkdir -p tmp; cd tmp; $(TOOLCHAIN)/bin/xtensa-lx106-elf-ar x ../libcrypto.a; cd ..; $(TOOLCHAIN)/bin/xtensa-lx106-elf-ar rs libwpa.a tmp/*.o 220 @touch $@

raven canopy
#

nope. thats on 223 for me.

solar whale
#

I'm reinstalling sdk frm fresh pull

raven canopy
#

well, i wouldn't. πŸ˜„

solar whale
#

no worries - I don't use the vagrant setup normally so I'm happy to use it to test.

#

are you on a PC or Mac?

idle owl
#

@solar whale @opal elk There's a feedback section in the Learn Admin page that has the feedback for guides that you're an author on. It does not show if you are only a contributor. It's on the left side of the Admin page.

solar whale
#

@idle owl thanks!

raven canopy
#

PC. and thank you...you don't need to go through this much trouble. πŸ˜„

solar whale
#

No problem - these things need to work correctly!

raven canopy
#

argghh! temp rice bag heating pad just spilled on my desk. well, corrosion inhibitor project - complete! πŸ˜„

solar whale
#

I origianlly used vagrant on my mac, but eventually moved to homebrew and native install. works great.

#

@idle owl so you have to go look for feedback - it does not nag you...

idle owl
#

Correct.

solar whale
#

that explains a lot πŸ˜‰

idle owl
#

Yah πŸ˜‰

#

They said they will get it so contributors can see feedback too, eventually, but no idea when.

solar whale
#

that would be nice.

idle owl
#

Agreed.

solar whale
#

I used mu for the first "real" time today - on a linux box to play with some example code. It worked great!

idle owl
#

Nice!

solar whale
#

@raven canopy still building SDK -- getting close!

raven canopy
#

copy. i'm reviewing my Vagrantfile against the esp sdk (pfalcon's github) to make sure everything is up to date. i've found one thing missing so far, but I doubt it'll fix my problem.

scarlet lantern
#

Thanks. I'll try this.

solar whale
raven canopy
#

@solar whale yeah, that's the one i'm using...just that I'm working on combining it with the samd one. I was getting the same error when I had esp installed separate though.

solar whale
#

I created 2 different vagrant VMs

raven canopy
#

i want to try and combine them so that you can work out of the same git working tree without all the run-around (linking, copy+paste, etc). also, the esp8266-vagrant still pulls from micropython, not from circuitpython.

#

added bonus: only have to update one environment...

solar whale
#

yeah _ ijust did my own clone from circitpython and it has worked well. the guide should be updated though. No real reason why they cant be combined. It works fine that way on my linux box.

#

@raven canopy ok - just updated SDK and master still builds OK - same warnings - no errors

#

jsut a sec, let me reboot vagrant VM

#

still good

raven canopy
#

humpf...well, thanks for confirming its a me-only problem. πŸ˜› hehe. might have to go the fresh install route.

solar whale
#

good luck!

raven canopy
#

yeah, there goes the next couple hours. oh the rabbit holes i get to experience...

solar whale
#

I'm now updating my VM - it was a bit out of date - see if it breaks anything

raven canopy
#

huh. i think i updated the wrong VM last night. this one still says 14.04.5, with 16.04.3 available...

solar whale
#

I have 16.04.3 - still works after update

#

oops - no I dont - using 14.-4.5 sorry

#

tahta is what is installed by the vagrant provissioning. I don't recomment upgrading with in VM -

raven canopy
#

yeah...do-release-upgrade got scary with the warnings. run away!!! πŸƒ

solar whale
#

try a clean install from Tony's guide then just clone the circuitpython repo -

raven canopy
#

i'm going to try cloning micropython to see...yeah, same thought. πŸ˜„

solar whale
#

have fun - time to go outside - it has finally gotten above 10 F πŸ˜ƒ

raven canopy
#

woohoo!! fun is always more funner when >0F.

scarlet lantern
#

@solar whale @fading solstice , Thanks for your help, I'll try this.

weary hinge
blazing trail
#

Sorry @weary hinge for waiting a while, but have u tried just using the code on the page? I see there that the code shows:

display = segments.Seg7x4(i2c)
#

here is the original code:

#
# Basic example of setting digits on a LED segment display.
# This example and library is meant to work with Adafruit CircuitPython API.
# Author: Tony DiCola
# License: Public Domain

# Import all board pins.
from board import *
import busio

# Import the HT16K33 LED segment module.
from adafruit_ht16k33 import segments


# Create the I2C interface.
i2c = busio.I2C(SCL, SDA)

# Create the LED segment class.
# This creates a 7 segment 4 character display:
display = segments.Seg7x4(i2c) 
# Or this creates a 14 segment alphanumeric 4 character display:
#display = segments.Seg14x4(i2c) 
# Finally you can optionally specify a custom I2C address of the HT16k33 like:
#display = segments.Seg7x4(i2c, address=0x70)

# Clear the display.  Always call show after changing the display to make the
# update visible!
display.fill(0)
display.show()

# Set the first character to '1':
display.put('1', 0)
# Set the second character to '2':
display.put('2', 1)
# Set the third character to 'A':
display.put('A', 2)
# Set the forth character to 'B':
display.put('B', 3)
# Make sure to call show to see the changes above on the display!
display.show()
weary hinge
#

Yes @blazing trail I have tried too

blazing trail
#

hmmm

#

are you manually sending it through REPL or are you putting the code into main.py

weary hinge
#

Through REPL on Atom, maybe I should try with terminal only.

blazing trail
#

yes, try that. if it doesn't work, I'm trying it as well

stuck elbow
#

what do you mean exactly by "stops"? Do you get an error?

blazing trail
#

yes, I think so

weary hinge
#

from board import *
import busio
from adafruit_ht16k33 import segments
i2c = busio.I2C(SCL, SDA)
display = segments.Seg7x4(i2c)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adafruit_ht16k33/ht16k33.py", line 13, in init
File "adafruit_bus_device/i2c_device.py", line 68, in init
File "adafruit_bus_device/i2c_device.py", line 66, in init
ValueError: No I2C device at address: 70
i2c.try_lock()
True
i2c.scan()
[]
i2c.scan()
[112]
display = segments.Seg7x4(i2c)

blazing trail
#

same error

stuck elbow
#

that looks like your ht16k33 is not connected

blazing trail
#

πŸ˜ƒ

stuck elbow
#

how did you connect it?

weary hinge
#

IO to CPX 3.3V, + to powerboost 500 with battery, - to GND to powerboost and CPX, D to SDA and C to SCA

stuck elbow
#

using the breadboard? it worked the second time around, so maybe some wires are loose?

weary hinge
#

yea breadboard, it works but cant see anything like display.fill(0) or .put('1', 0). If I try lock and scan, after that it stops at display = segments.Seg7x4(i2c). So I will try with the trinket M0.

stuck elbow
#

you have to unlock after the scan

weary hinge
#

Ok, I will retry shortly. Thanks !

languid sage
#

I'm looking for a feature... In the Neopixel library for Arduino, there is a function to set the brightness level (CircuitPlayground.setBrightness(Bright);) This is used in the CPX_Infrared_NeoPixel demo program. I'm looking for a similar thing in the CircuitPython library for NeoPixel. I can't find the source code or any good documentation on whats in this library. Pointers to docs/src will work. I'd like to modify the CP Tree Ornament code for different brightness levels (similar to the Arduino example). There has to be a better way than tweaking the RGB values just to dim the LEDs. Thanks.

slender iron
#

its just .brightness if you are using the neopixel object directly

opal elk
#

I'm rabble-rousing in the LIS3DH library, btw

solar whale
#

these emoji's are harrd to see - I thought that was a "monkey wrench" πŸ˜‰

lucid arch
#

hi all, I was wondering if i could get some help with circuit python express driving a L9110S motor shield

#

has anybody tried that before?

#

i just cant get it to drive the motor ... with the exact code and connections and battery, my arduino uno does the job

#

???

opal elk
#

is there a library for it?

lucid arch
#

not really, you just set the pins connected to the shield

#

this is my code:
#define MOTOR_PWM 6 // Motor PWM Speed
#define MOTOR_DIR 7 // Motor Direction

void setup() {

Serial.begin( 9600 );

pinMode( MOTOR_DIR, OUTPUT );
pinMode( MOTOR_PWM, OUTPUT );
digitalWrite( MOTOR_DIR, LOW );
digitalWrite( MOTOR_PWM, LOW );
}

void loop() {
// set the motor speed and direction
digitalWrite( MOTOR_DIR, HIGH ); // direction = forward
analogWrite( MOTOR_PWM, 50 ); // PWM speed = fast

delay(1000);
}

opal elk
#

oh, wait: you aren't using circuitpython? there's "circuit playground express" and "circuit python"

lucid arch
#

ah no ... I'm using CPX, the board .. not the language

opal elk
#

this should be in #help-with-projects (but I'll try to see what could be wrong in the meantime!)

lucid arch
#

ah cool . ta

languid sage
#

@slender iron Thanks, I'll check it out.

stuck elbow
#

do we have a meeting tomorrow?

opal elk
solar whale
#

@sage apex for my M0 the defines ar #define RFM69_RST 11 // "A" #define RFM69_CS 10 // "B" #define RFM69_INT 6 // "D"

sage apex
#

Yeah, and thats okay but you see The esp has a irq variable instead

solar whale
stuck elbow
#

@opal elk usually with just accelerometer you can guess its orientation (only in two axes) when it's not moving by seeing where gravity points

#

@opal elk to get more precise information, you need the 9DOF IMUs, which include magnetometer for the third axis, and a gyro for filtering the gravity from the acceleration

meager fog
stuck elbow
#

aaah, that way, now I understand!

#

nice, I could include some avrs as helper chips on my devices, and have them automatically programmed

meager fog
#

sure! could also use an ESP as a remote-programmer

stuck elbow
#

I will test it on an attiny24 soon

meager fog
#

for attiny24 you'll need to make the chip-stats dict

stuck elbow
#

just waiting for them to arrive

sage apex
#

Oh wow that is wicked cool

meager fog
#

like

#
attiny85 = {'name': "ATtiny85"}
attiny85['sig'] = [0x1E, 0x93, 0x0B]
attiny85['flash_size'] = 8192
attiny85['page_size'] = 64
attiny85['fuse_mask'] = (0xFF, 0xFF, 0x07, 0x3F)
stuck elbow
#

sure, makes sense

meager fog
#

if you do, commit an example please πŸ˜ƒ i dont have all chips, i did what i have handy

stuck elbow
#

what does the fuse mask do?

meager fog
#

fuses are set to 1 if 'not used' which means when you read them, the high bits are set

#

which confuses people a lot. if you mask the fuses, then you ignore those unused 1 bits

stuck elbow
#

I see, ok

#

@meager fog I wonder if instead of having avrprog.end() you could use a context manager

meager fog
#

probably, but im lazy

#

πŸ‘ it works πŸ˜„

stuck elbow
#

I'm a great fan of working software

meager fog
#

im gonna document it and take a break - it could also use a file read function

#

(e.g. save flash to disk)

stuck elbow
#

you would need to enable writing to disk for that

meager fog
#

yep - we have some miniguides on that

#

not too bad, just need an extra pin for a switch

stuck elbow
#

I wonder if you could just detect if the disk is mounted, and switch depending on that

#

probably not, too soon in the initialization

meager fog
#

yah you cannot, we found a switch is the easiest way to keep it save

#

CPX has a switch πŸ˜ƒ

stuck elbow
#

nice

meager fog
#

ok dokumentation time!

stuck elbow
#

goodnight, I will give it a try when the chips arrive

meager fog
#

thank u!

stuck elbow
#

no, thank you

errant grail
#

@meager fog I have a collection of custom Uno-based AVR programmer shields for ATtiny85s that could easily be replaced with something based on the Feather format and your CPy design. I'm anticipating that it'll be much simpler than the Arduino IDE/ISP method. Thanks!

slender iron
#

@stuck elbow yes to the meeting

tulip sleet
#

@languid sage The bad link in the CPX Learn Guide PDF is an issue with the PDF generation. The Learn Guide developers already have an internal issue opened for this this problem.

idle owl
#

@tulip sleet Thank you, I was wondering about that.

manic glacierBOT
ruby lake
#

It looks like I will have to make a "set/execute" switch case for this midicv to run as fast as possible. It really doesn't like anything in the main loop other that waiting for serial data/

slender iron
#

<@&356864093652516868> Normal meeting time tomorrow here on Discord. 11am Pacific / 2pm Eastern.

opal elk
#

I replaced a mpy with a py of the same name, and am now getting this error:

#
  File "main.py", line 3, in <module>
MemoryError:```
tulip sleet
#

@opal elk that can happen: the compiler is running out of memory converting the .py to bytecodes

#

try putting that file at the top of the list of imports if it's not there already. But it may not be possible to use it as a .py if it's big enough.

opal elk
tulip sleet
#

you don't need that: there are mpy-cross compilers included in each release.

#

just pick the right one for your OS

fast harness
#

Hello all! I'm new with CircuitPython and only have basic foundational coding knowledge/experience... With the Gemma M0, how do I instruct the on-board Dotstar RGB LED and a single connected external Flora RGB NeoPixel (v2) to perform the same functions in-sync with eachother?

brazen cedar
#

?

slender iron
#

@brazen cedar use the feather basic one. The wifi isn't supported though.

#

@fast harness You'll need to update at the same time. They can't be chained together.

fast harness
#

@slender iron Had a feeling that would be the case... How do I update them at the same time? Already spent hours trying different things and scouring the web. πŸ˜”

slender iron
#

doing it exactly the same time would be tough. you could do it in a function that you use everywhere else to make sure it always happens together

brazen cedar
#

@slender iron thanks! is wifi support planned or is there a workaround?

fast harness
#

@slender iron Bobby's Xmas Glow Lamp

import board
import neopixel
import time
from digitalio import DigitalInOut, Direction, Pull
from analogio import AnalogIn, AnalogOut
from touchio import TouchIn
import adafruit_dotstar

One pixel connected internally!

dot = adafruit_dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1, brightness=0.5)

Flora Pixel RGB LED

pixel = neopixel.NeoPixel(board.D1, 1, brightness=0.5, auto_write=False)

Built in red LED

redled = DigitalInOut(board.D13)
redled.direction = Direction.OUTPUT

Capacitive touch on A2

touch2 = TouchIn(board.A2)

Color Cycle

def wheel(pos):
# Input a value 0 to 255 to get a color value.
# The colours are a transition r - g - b - back to r.
if (pos < 0):
return [0, 0, 0]
if (pos > 255):
return [0, 0, 0]
if (pos < 85):
return [int(pos * 3), int(255 - (pos3)), 0]
elif (pos < 170):
pos -= 85
return [int(255 - pos
3), 0, int(pos3)]
else:
pos -= 170
return [0, int(pos
3), int(255 - pos*3)]

def rainbow_cycle(wait):

for j in range(255):

for i in range(len(pixel)):

idx = int((i * 256 / len(pixel)) + j)

pixel[i] = wheel(idx & 255)

pixel.show()

time.sleep(wait)

rainbow_cycle(0.001) # rainbowcycle with 1ms delay per step

i = 0
while True:
# spin internal LED around!
dot[0] = wheel(i)
dot.show()
pixel[0] = wheel(i)
pixel.show()

# use A2 as capacitive touch to turn on internal LED
if touch2.value:
    print("A2 touched!")
redled.value = touch2.value

i = (i+0.01) % 256  # run from 0 to 255
#

Wait a second.... THIS WORKED

#

OH MY GOD

slender iron
#

@brazen cedar its not a high priority for us because the esp8266 already supports it

#

all good @fast harness ?

fast harness
#

Yeah... lol I had changed the code right before sending out and then tested after

#

For a minute thought it still wasn't working

brazen cedar
#

@slender iron oh ok I'm confused which product on the website has python and a 8266? I must be missing it

slender iron
#

the feather huzzah (not huzzah 32)

fast harness
#

Kinda embarrassed I figured it out shortly after building up the courage to go on here and ask

idle owl
#

Happens to me all the time.

slender iron
#

no problem @fast harness. glad its going!

brazen cedar
slender iron
#

yup

brazen cedar
#

I didn't realize that supported CP

#

ok cool thanks!

slender iron
#

it doesn't act like a usb drive though

raven canopy
#

vagrant+esp8266+axtls = driving me nuts. 😝 refuses to compile.

fast harness
#

Okay new question... Hoping there is a way to fix this. So it seems every time the color wheel finishes a full cycle, both lights noticeable flash off for a split second and then start the wheel again. Is there a way to get the LEDs to continuously cycle colors in the wheel without flashing off at the end of each cycle?

#

Bobby's Xmas Glow Lamp

import board
import neopixel
import time
from digitalio import DigitalInOut, Direction, Pull
#from analogio import AnalogIn, AnalogOut
from touchio import TouchIn
import adafruit_dotstar

One pixel connected internally!

clock = board.APA102_SCK
data = board.APA102_MOSI
dot = adafruit_dotstar.DotStar(clock, data, 1, brightness=0.5, auto_write=False)

Flora Pixel RGB LED

pixel = neopixel.NeoPixel(board.D1, 1, brightness=0.5, auto_write=False)

Built in red LED

redled = DigitalInOut(board.D13)
redled.direction = Direction.OUTPUT

Capacitive touch on A2

touch2 = TouchIn(board.A2)

Color Cycle

def wheel(pos):
# Input a value 0 to 255 to get a color value.
# The colours are a transition r - g - b - back to r.
if (pos < 0):
return [0, 0, 0]
if (pos > 255):
return [0, 0, 0]
if (pos < 85):
return [int(pos * 3), int(255 - (pos * 3)), 0]
elif (pos < 170):
pos -= 85
return [int(255 - pos * 3), 0, int(pos * 3)]
else:
pos -= 170
return [0, int(pos * 3), int(255 - pos * 3)]

i = 0
while True:
# spin internal LED around!
dot[0] = wheel(i)
dot.show()
pixel[0] = wheel(i)
pixel.show()

i = (i+0.05) % 256  # run from 0 to 255

# use A2 as capacitive touch to turn on internal LED
if touch2.value:
    print("A2 touched!")
redled.value = touch2.value
tawny creek
#

what happens if you set the minimum higher than 0? (so it never goes off)

fast harness
#

@tawny creek Which one would I change for that?

#

i?

raven canopy
#
# Color Cycle
def wheel(pos):
    # Input a value 0 to 255 to get a color value.
    # The colours are a transition r - g - b - back to r.
    if (pos < 0):
        return [15, 15, 15] #don't go full dark
    if (pos > 255):
        return [15, 15, 15] #don't go full dark
    if (pos < 85):
        return [int(pos * 3), int(255 - (pos * 3)), 15]
    elif (pos < 170):
        pos -= 85
        return [int(255 - pos * 3), 15, int(pos * 3)]
    else:
        pos -= 170
        return [15, int(pos * 3), int(255 - pos * 3)]
#

@fast harness

#

updated the rest of the 0's...

#

you may have to set them higher than 15 to keep it from entering the perceived pause.

fast harness
#

Hmmm makes sense... but wouldn't that result in loss of certain colors?

#

πŸ˜•

raven canopy
#

it might. just saw your note on the "return to red". you could change the first two to this: [15,0,0]

#

and the middle two back to 0's.

fast harness
#

Ahh yes that would solve it, but now that you mention it... I just realized that note isn't even accurate for where it seems to be starting lol

#

It seems to start at green for some reason lmao

#

This fixed it!!!

#

if (pos < 0):
return [0, 255, 0]
if (pos > 255):
return [0, 255, 0]

#

Thanks @raven canopy πŸ˜„

raven canopy
#

hmmm. that would mean it's using GRB vs RGB....

fast harness
#

Is there code I can include in the beginning to change that?

raven canopy
#

and np. it was more @tawny creek. i just changed some bits.

#

hold on. i was just pulling it up.

fast harness
#

Thanks to you too! @tawny creek

raven canopy
#

well, the docs say its RGB.

fast harness
#

Hmm maybe it's how the wheel is defined in this code... That's strange because I pulled it from a sample on Adafruit

#

Looking at it now, I think I know to change it

fast harness
#

Solved it!

#

Color Cycle

def wheel(pos):
# Input a value 0 to 255 to get a color value.
# The colours are a transition r - g - b - back to r.
if (pos < 0):
return [255, 0, 0]
if (pos > 255):
return [255, 0, 0]
if (pos < 85):
return [int(255 - pos * 3),int(pos * 3), 0]
elif (pos < 170):
pos -= 85
return [0, int(255 - (pos * 3)), int(pos * 3)]
else:
pos -= 170
return [int(pos * 3), 0, int(255 - pos * 3)]

raven canopy
#

there ya go! i had questioned (internally) the < 85 part earlier; looked heavy on the green...

fast harness
#

Haha yeah I completely overlooked that originally

#

It really helps talking on here... very glad I dove in

raven canopy
#

keep coming back. its awesome around here. helping each other is what we're about!

languid sage
#

@tulip sleet Thanks, Thought PDF generation might be the culprit.

solar whale
tulip sleet
#

@raven canopy I followed the instructions here and did not have trouble: https://github.com/pfalcon/esp-open-sdk. I am not using a vagrant machine: I am just using a 16.04 Ubuntu. I'd actually recommend Ubuntu in a conventional VM over vagrant, because you'll have more control over what's installed.

prime flower
#

@idle owl cleaned up files and tagged you on github for the linted MetroX circuitpython stuffs

raven canopy
tulip sleet
#

@raven canopy 2.x or master?

raven canopy
#

@tulip sleet I may end up going with a straight VM vs vagrant. Would like to figure out the issue though for documentation at minimum. In case anyone else stars ramming this wall. 😁

#

@tulip sleet I've tried both.

tulip sleet
#

the one you posted, is it 2.x or master? I want to try to dupe and compare

raven canopy
#

Oh. That one is master.

tulip sleet
#

cd to lib/axtls; what does git status print?

raven canopy
#

At work, so I'd have to run later. I did submodule pulls and updates though.

tulip sleet
#

when you're back at home, if I'm around, we can compare the envs and see what's different

raven canopy
#

Ok. Thanks.

prime flower
#

@fading solstice Thanks for reviewing!

fading solstice
#

np

idle owl
#

@prime flower Great! I'll take a look at it

split ocean
#

Hi gang! Quick question -- I'm working on a CPy project on Gemma M0 that will wait around for long periods of time before doing something -- any reason not to use time.sleep(180) for a 3 min delay?

idle owl
#

If you don't want to do anything else during that time, that's perfect

split ocean
#

yes, this is thankfully simple that way ; ) Thanks.

idle owl
#

@slender iron What's needed to get our pylint configuration on my local machine?

tulip sleet
#

@raven canopy I think I know what your issue is. The error in your gist makes it appear that the string "os_port_micropython.h" is the first thing in os_port.h (line 164 in the gist). os_port.h is supposed to be a symlink to os_port_micropython.h. However, if you cloned circuitpython in Windows and then copied it (or used it) from the vagrant build, then the symlink will get lost (because it's not supported in Windows) and will appear as a plain file with contents that are the name of the symlink. In the vagrant VM, try cloning circuitpython and updating the submodules there instead of in Windows. I got the hint from here: https://github.com/pfalcon/axtls/issues/2

prime flower
#

I'm not going to turn my mic on because the factory is loud (and that'd mess up the recording). hug report to tony for waveforms (tone), kattni and mr mcwethy for reviewing the metrox circs code

raven canopy
#

HUGS: @slender iron for help on uid and vagrant, and for his earlier thanks to @tulip sleet and @solar whale. And...thanks to @@tulip sleet and @solar whale for troubleshooting esp-vagrant. Lastly, GROUP HUG!!

prime flower
#

status - kattni and mr mcwethy (thanks again) are reviewing code for the MetroX circuitpython edition guide. tone() got reworked in simpleio a bit. Waveforms has a square wave now! (or should, there's a PR)

raven canopy
#

Update: none really. nRF board should be here this week, so I can start working 'uid' on that. VEML6070 is also showing up this week; giving a library a go for that. And rotary encoder, though I don't have a M4...so we'll see. <Insert obligatory "curse you esp-vagrant+windows"> Have a fork/branch for combining the esp & samd vagrants; working on updating the docs (will add some notes on my current problem). I thinks that's it...

#

😁

slender iron
prime flower
#

read it earlier, I thought it was really good! maybe be more explicit in what you want to see out of it in 2018? especially involvement - maybe like projects/community involvement we can look fwd to that hasnt existed yet within education/industry (prototyping tools)

raven canopy
#

Determine your audience. If current devs are audience...yeah, what @errant grail said! πŸ˜‹

prime flower
#

also maybe - getting people converting to it, OR considering it INSTEAD of another language ("how can we get deciding on their own to be using circuitpython for their project") would be a fun way to increase involvement to the arduino level

opaque patrol
#

So, isn't tomorrow the 1st birthday for CP?

cunning crypt
#

🍰

timber lion
#

gotta run to a 12pm meeting, dropping out

opaque patrol
#

GlaDOS said there will be cake πŸ˜ƒ

cunning crypt
#

The cake is a lie!

errant grail
#

Thanks!

cunning crypt
#

(Also, a bit disappointed that despite me getting home early, other things prevent me from actually hopping in to the meeting)

raven canopy
#

Thanks! Later.

manic glacierBOT
#

I am unable to get a simple dotstar test working on a Trinket_m0 under 3.0.
This works under 2.x

I have placed the 3.x adafruit_dotstart.mpy in /lib.

`
Adafruit CircuitPython 3.0.0-alpha.1-51-g1805bca-dirty on 2018-01-08; Adafruit Trinket M0 with samd21e18

from board import *
import adafruit_dotstar as dotstar
pixel = dotstar.DotStar(APA102_SCK, APA102_MOSI, 1, brightness=.1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ...

solar whale
#

@tulip sleet FYI - I am finding - at least on the Trinket_M0, then everytime I load 3.x over 2.x, I have to power cycle to have it not go to "safe mode" on Control D.

prime flower
#

@slender iron for the record, I'd listen to the meeting as a podcast πŸ˜ƒ

idle owl
#

Glad you could make it this week!

prime flower
#

yeyeh! I listen to The Amp Hour, Supplyframe's podcast, and EmbeddedFM a lot. I think it'd be fun to have a blinka one

slender iron
#

@prime flower ok awesome! I do want to make it happen

prime flower
#

if you need any help on it, let me know. I'd be happy to help ya. You already have a linkdump so that's perfect.

wooden lichen
#

Is this channel also for micropython?

solar whale
#

@wooden lichen you are welcome to post a question.

wooden lichen
#

I dont have any questions yet! But good too know πŸ˜ƒ

cunning crypt
#

@wooden lichen CircuitPython has some significant differences from MicroPython... but as many of the people that frequent here have been involved in forking CP from MP, it shouldn't be an issue

solar whale
#

@wooden lichen Sorry - you are welcome to join in in any way you want. You will see some Micropython discussions but mostly it focusses on CircuitPython.

manic glacierBOT
tulip sleet
#

@solar whale I think the PR above ⬆ will fix the trinket safe mode thing you are seeing. Tested with that. Strangely this problem did not show up on Metro M0.

raven canopy
#

@tulip sleet RE: os_port.h & Windows...I have done everything inside the VM. however, I was using the CPy folder as a SMB shared folder. Going to turn that off and give it a go.

RE: git status on lib/axtls folder: HEAD detached at dac9176; nothing to commit, working directory clean. I'll check that commit checksum in a minute.

tulip sleet
#

@raven canopy Same axtls commit for me

raven canopy
#

@tulip sleet non-SMB share build failed the same. might have to re-build esp-sdk?

tulip sleet
#

@raven canopy

halbert@salmonx:~/CP/circuitpython/lib/axtls/ssl$ ls -l
total 564
[...]
-rw-rw-r-- 1 halbert halbert      0 Aug 29 15:42 os_port.c
lrwxrwxrwx 1 halbert halbert     21 Aug 29 15:42 os_port.h -> os_port_micropython.h
-rw-rw-r-- 1 halbert halbert   2992 Oct 11 18:21 os_port_micropython.h
-rw-rw-r-- 1 halbert halbert    856 Jan  8 13:39 os_port.o
[...]
#

do you see the same?

#

note the symbolic link

raven canopy
#

mine does not show the symbolic link...

#

now i have to dig deep into my long forgotten linux command list. πŸ˜„

tulip sleet
#

just remove lib/axtls and redo the git submodule update --init --recursive out of that directory

raven canopy
#

okie dokie

tulip sleet
#

see if the symoblic link is there after that. If not maybe it has something to do with the vagrant dir being shared (I didn't know if it was SMB shared with windows or some other way).

#

I have to go out for about 10 mins. back soon.

raven canopy
#

k

tulip sleet
#

@raven canopy any luck?

raven canopy
#

nope. looks like a VirtualBox problem. they apparently disabled symlinks back in 4.3. trying to see if they've re-introduced it...

raven canopy
#

so, by disabled, i meant by default. i have come across the same mentions of using VBoxManage as the "work-around". still getting a handle on that whole deal. πŸ˜„

tulip sleet
#

I had other problems with virtualbox and network connections on a UEFI machine about a year ago: https://forums.adafruit.com/viewtopic.php?f=60&t=109632. Perhaps you didn't run into that. I decided I was spending more time debugging vagrant/VirtualBox. I had been running Ubuntu on VMWare Workstation Player for years. Granted, setting up shared storage was a manual process. Now I have a native Ubuntu dev machine.

raven canopy
#

funny, at the bottom of the GH issue thread, one person said to use SMB. albeit a non-default specific version... maybe i need to just order a pc case and setup a linux box with the post-PC-upgrade guts I have sitting around. like i have planned to do since i upgraded. πŸ™ƒ

tulip sleet
#

You can easily find something $150 or so. They have also been upgradable to Windows 10 despite being past the deadline (though I haven't tried since the turn of the year).

raven canopy
#

well, it's dinner time...then NCAAF championship. I'll come back to this later. thanks for your help @tulip sleet!! I think we're getting close!

#

oh...and re-enabling SMB with ver 3.x didn't make a dent initially. VBoxManage might still be needed...

tulip sleet
#

ttyl; good luck!

slender iron
manic glacierBOT
#

Test Case:
Messure Light trough a light-to-frequency-coverter.

Test Setup:
Feather Express M0 - Circuit Python 2.20
TSL235R-LF
https://www.sparkfun.com/datasheets/Sensors/Imaging/TSL235R-LF.pdf
connected 3V to VDD, GND to GND and Output to D12

> #Feather Express M0 connected 3V to VDD, GND to GND and Output to D12
 import board
 from board import*
 import digitalio
 import busio
 import adafruit_ssd1306
 import time
 import analogio
 import pulseio

 i2c = busio.I...
solar whale
#

@tulip sleet teseted new master CP3.0 on trinket_m0 - no safe mode! Thanks!

tulip sleet
#

thanks for testing!

manic glacierBOT
#
[adafruit/circuitpython] New branch created: tannewt\-patch\-5
slender iron
tawny creek
#

Ooh cp3.0 😎

opaque patrol
#

Every time I see CP 3.0 in the chat, I think you should aim for a May 4 release date

slender iron
#

not a bad idea πŸ˜ƒ

drowsy geyser
#

Thanks for looking at the BNO055, @slender iron . I ordered a new one to test since all mine are soldered into projects now.... But I appreciate you taking a look at it!

slender iron
#

np @drowsy geyser

fading solstice
#

@slender iron have you started on IS31FL3731

slender iron
#

@fading solstice yeah, I'll need to look tomorrow

#

there is an experimental change to it I want to look more into

#

to use more properties

fading solstice
#

i ordered hardware for testing purposes, so i will review then

#

and test

#

i was also going to do an example

slender iron
#

ok great! I'd love your opinion on it too

tawny creek
#

excited for hints on the new m4 stuff πŸ˜ƒ

raven canopy
meager fog
#

@slender iron @tulip sleet spent a few hours with my m4 and latest commit - its way more stable but i still got 2 USB 'hangs' - REPL OK, MSD disappears & main.py gets deleted (but i still have it in my editor so its ok πŸ˜ƒ

slender iron
#

thanks for the report @meager fog we'll iron out the bugs!

meager fog
#

it defintiely happens right as i save

#

like 1/30 times maybe?

slender iron
#

ah interesting, sounds like a race condition

meager fog
#

not so helpful πŸ˜ƒ

#

its probably xemacs. its fun to blame it

#

i could load 3.0 on my other boards, then see if it happens there

#

then we can tell lif its m4 or 3.0

slender iron
#

I'm not surprised if its 3.0

meager fog
#

we can also blame asf4 because thats fun

raven canopy
#

you can blame me. everyone at work does... hehe

slender iron
#

its highly unlikely we won't be able to fix it

raven canopy
#

i'm about to jinx it...but, i'm past my esp8266 compile hurdle!

#

yep. there's the jinx. at least now it fails at mpy-cross....

slender iron
#

thats awesome! what was the issue?

raven canopy
#

@tulip sleet i was able to manually create the symlink. so, now I know how to cross that hurdle.

#

@slender iron it was a symlink in axtls/ssl

#

git is/was being denied when it tried. its a virtualbox+windows thing.

slender iron
#

oh weird!

solar whale
#

@raven canopy what was the problem with mpy-cross?

raven canopy
#

Directory "not found": mpy-cross/mpy-cross. It was too late, so I shut it down for the night. Will start widdling on that later. @solar whale

solar whale
#

@raven canopy Did you redo make -C mpy-cross after cloning circuit python and the git submodule update ....

#

it si done at the top level of the repo.

raven canopy
#

I didn't. I was thinking I'd need to. Might start fresh again so that I can document from a clean install for future reference.

solar whale
#

It need to be run after a fresh clone or a branch change from 2.x to 3.x

tulip sleet
#

@raven canopy another alternative is to do the build in a non-shared part of the vagrant filesystem, and then just copy the .uf2 or whatever to the shared part to get it out of the VM. Then you'd avoid the symlink problem. mpy-cross does need to be built by hand in some caes.

scarlet lantern
#

How is the procedure to save the actual time in a file ? >>> import adafruit_ds3231

import time
from board import *
myI2C = busio.I2C(SCL, SDA)
rtc = adafruit_ds3231.DS3231(myI2C)
t = rtc.datetime
print(t)
with open("/sd/test.txt", "a") as f:
... f.write(t)
...
...
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "<stdin>", line 2, in <module>
TypeError: object with buffer protocol required

tulip sleet
#

@scarlet lantern Try f.write(str(t))

#

t is a datetime object, which can be printed, but write() expects something like a string or bytearray

#

@scarlet lantern or print(t, file=f)

scarlet lantern
#

@tulip sleet Thank you... I'm trying right now... It works perfectly....😁

solar whale
tawny mist
#

Morning everyone, just getting started with my Circuit Playground Express and circuit python. It appears that the CPX supports interrupts for certain elements on the board such as the accelerometer (see the dice / D6 example code)... are interrupt callback routines available for all the controls on the board such as the buttons, capacitive touch pads etc? I guess if the accelerometer has one you could use it to "fake" it for the controls that require contact to activate but this would be a hack. Apologies if this is a little off topic or hardware specific.

solar whale
#

@tulip sleet @raven canopy I do not create any special "sharing" with the VM. the default install allows you to copy the compiled image to "/vagrant" which is shared back to the host.

stuck elbow
#

@tawny mist no, CircuitPython doesn't have a general support for interrupts or timers, mostly because they are pretty advanced features and require extra attention when writing the interrupt code

manic glacierBOT
opal elk
#

dhalbert has been busy!

manic glacierBOT
#

I think we should disable this for consistency across atmel-samd, esp8266, and nrf builds, as suggested by @deshipu above. The features added by MICROPY_CPYTHON_COMPAT encompass a bunch of different things, and should be broken down into separate flags: there's even a comment to that effect in py/mpconfig.h. We can wait for MicroPython to do that. If no comments I will go ahead and disable it in all CPy builds.

raven canopy
#

i can't catch a break! now the primary hosting site for cloog (inside crosstool-NG) is down for maintenance, and the file isn't on the backup (gcc.gnu ftp). went back to zero, destroyed the vagrant, and now I can't compile esp-open-sdk...😢
@solar whale i am trying to verify that i wasn't commingling my previous attempts with "by the book" and getting a samd/esp combined vagrant setup working with windows-host shared folders (via SMB; found in samd vagrant...not esp). in my slightly-sleep-deprived state, and after bouncing back and forth a few times, that may have been lost on me to mention. i hope you don't feel like your time was wasted; you have helped isolate the problem by providing a constant.

solar whale
#

@raven canopy Good luck getting it back up and running! No worries about my time - it is always useful to run through these steps to make sure they are still working as planned. It also gives me a chance to do some updating. My vagrant installations were pretty stale.

manic glacierBOT
raven canopy
#

@solar whale @tulip sleet ok. confirmed that i can build esp8266 "by the book". now back to trying to bridge the gap...starting at known good points is helpful. 😜

Create build/firmware-combined.bin
esptool.py v1.2
('flash    ', 35440)
('padding  ', 1424)
('irom0text', 563068)
('total    ', 599932)
('md5      ', 'c926a8404e799e2e474370a21912def1')
vagrant@vagrant-ubuntu-trusty-64:~/circuitpython/ports/esp8266$
slender iron
#

@opal elk you didn't take my PR bait

manic glacierBOT
#
  1. Turn off MICROPY_CPYTHON_COMPAT, which includes a number of minor CPython compatibility features, most of which have workarounds, but uses up significant flash.
  2. Turn on MICROPY_PY_SYS_MAXSIZE, which implements sys.maxsize.
  3. Turn on MICROPY_CAN_OVERRIDE_BUILTINS, which implements "_" as the most recent value in the REPL, and also enables redefining builtins.

Fixes #384, #442, #480, respectively.

opal elk
#

@slender iron but it is what it should be

#

unless you meant in the examples

#

in which case... give me a minute πŸ˜ƒ

slender iron
#

nah, I meant the parens

opal elk
#

ohhhhh

#

sorry. I've been called for work escalations at 4am, 6:30 pm and 7:30 pm and am on hour... 14? of work today

#

is adafruit hiring? πŸ˜„

slender iron
#

not actively but they've been known to if someone is being super helpful

opal elk
#

I'm like 75%+ joking, but I'll keep making PRs in my free time because I enjoy it and will make sure everyone knows my name adabot

#

I think I might put in another line in the example to give both Gs and m/s^2 for clarity?

#

while I'm taking the delayed PR bait

slender iron
#

sounds good πŸ˜ƒ

opal elk
#

I can't clone the adafruit repo and then submit a PR to master from a branch there, can I?

#

should just bite the bullet and clone every CPy library

slender iron
#

you should fork it on github first

opal elk
#

got it

slender iron
#

and yeah, you'll get there eventually

#

πŸ˜ƒ

#

if its super small you can do it in the github web editor

opal elk
#

we use stash/bitbucket at work and I'm used to having branch-based permissions