#circuitpython-dev

1 messages ยท Page 191 of 1

manic glacierBOT
#

Thanks for the explanation - makes sense. If you want input on this, or testing of the ideas with students, I'd like to help. I teach in an MFA program, build tools and teach designers how to use programming to make prototypes for things like IoT and AI, where multiprocessing and asynchronous processing are critical. I'm using the Circuit Playground Express, ESP32, etc. and am switching from Arduino to Python.

#

The latest MicroPython merge, incorporated in 4.0.0-alpha, now checks the validity of keyword args to print(), instead of ignoring keywords it doesn't recognize.

flush is not currently handled, but has valid uses: cf. https://github.com/adafruit/Adafruit_CircuitPython_Fingerprint/pull/9, where end="", flush=True is passed to allow incremental status messages to be printed on the same line.

It looks like flush=True is the "default", and flush=False (buffers output) is not possi...

manic glacierBOT
#

@deshipu,

@tannewt's suggestion to move shared_timer_handler back into CircuitPython is underway as part of samd-peripherals PR #4 referenced above.

Also at tannewt's suggestion, vectoring which specific handler to use now mimics how it is done with the EIC_Handler (samd-peripherals/external_interrupts.x). If you want to plan ahead, and or comment, the current version is here. This will...

manic glacierBOT
manic glacierBOT
manic glacierBOT
slender iron
#

it prints registers out based on the svd file

rotund basin
#

hey all, i know how to read a file line by line ... but what would be the equivalent using readinto? how do you get the entire file, when you read X number of bytes at a time?

stuck elbow
#

just do yourfile.read(), but there is no read_into(), it will allocate the buffer

rotund basin
#

ok, will try , thanks!

#

@stuck elbow f.read() seems it reads entire file ?

stuck elbow
#

yes, that's what you wanted

rotund basin
#

what if the file is large? how do i read smaller chunks at a time? the function readinto() seems to exit early.

stuck elbow
rotund basin
#

@stuck elbow that is the problem.... it exits the while loop before reading all contents.

stuck elbow
#

exits the while loop?

rotund basin
#

sorry, the with loop

stuck elbow
#

with is not a loop

#

perhaps you should pause what you are trying to do, and do a Python tutorial first, I'm sure it will clear some confusion

rotund basin
#

ouch ...

stuck elbow
#

it's always good to systematize your knowledge a bit

rotund basin
#

problem solved I have.

#

if you store file in binary, you must read it in binary, otherwise , readline() will not work ๐Ÿ˜‰

stuck elbow
#

well, it will work, just not the way you expect it to

#

computers are contrary creatures, they will always jump at the opportunity to do literally what you told them, but not what you meant

manic glacierBOT
#

With a new clone of the current master repo, I get the following error when trying to build the nrf port on my MACOS system. It compiles fine under Linux.

/Users/jerryneedell/projects/circuitpython/ports/nrf
[Jerry-desktop-mini-8:circuitpython/ports/nrf] jerryneedell% make BOARD=pca10056 clean
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
rm -rf build-pca10056-s140 
[Jerry-desktop-mini-8:circuitpython/ports/nrf] jerryneedell...
raven canopy
#

Re: translations - I assume we're going to have to add any new message strings to circuitpython.pot? I missed that until reading that PR..

manic glacierBOT
slender iron
#

@indigo wedge how is the bluetooth api coming?

#

@raven canopy yup, by running make translate at the top level

raven canopy
#

<@&356864093652516868> and anyone else interested, CircuitPython Weekly Meeting in approx 13 minutes. blinka ๐Ÿ““

#

Hehe. Did I trample?

slender iron
#

nah, happy to have help

slender iron
drowsy geyser
#

Morning! I'll be in stealth mode for today's call. ๐Ÿ˜ƒ

#

(Ostensibly working. ๐Ÿ˜ƒ )

turbid radish
#

no spam ๐Ÿ˜ƒ

raven canopy
#

Android wants Google docs app... I'll start direct edit next week. ๐Ÿ™‚

meager fog
#

here but not audio

inland tusk
#

I am luring thiis week.

#

I am lurking

turbid radish
#

Yay for the French translation folks!

tidal kiln
#

Merci!

slender iron
#

@meager fog hug report?

meager fog
#

kattni & brennen for amazing break-neck speed raspberry pi testing and documentation

raven canopy
#

@kattni & @brennan for pushing through on the PyPi stuff. @deshipu for [display and other] support on discord this week. @dglaude, @arofarn, @carlos, and @turbinenreiter for the translation work. Group hug to cover what my scrambled neurons may have missed!

Reiteration Hug: @tannewt & @Dan Halbert for always having time questions (status update related).

meager fog
#

they have rocked it, kattni is a fritzing machine

turbid radish
#

Thanks Sommersoft for your work on GitHub this weekend

meager fog
#

she is HALF fritzing HALF human

#

terminator style

#

also brent wrote a great guide using the new circuitpython for raspi using a plethora of sensors

#

and tehy worked amazingly

#

so its all COming together

#

also scott and dan have happily reviewed my 2am PR's

#

๐Ÿง blinka

#

goooooo team!

tidal kiln
#

welcome back dan

stuck elbow
#

nothing to report

prime flower
#

(voice finally connected, yay!)

slender iron
#

@meager fog status updates?

raven canopy
#

Adabot Patching: PR is merged. Will run .pylintrc->ignore-modules=board patch tonight. Then will work out the pylint v1.9.2 patch(es). Also will add a dry-run option to patching; I'm getting tired of changing git repo sources to test patches. ๐Ÿ˜„

FrequencyIn: Working just dandy; FREQM peripheral gets M4 as accurate as can be with the Open DFLL. For now, at least. Initial PRs for submodule updates are merged. Couple more things to tighten up, then the big PR will happen. <Insert Reiteration Hug>

Library cookiecutter: updated with .travis.yml->pylint v1.9.2 and .pylintrc->ignore-modules=board.

prime flower
solar whale
#

weeds -- build question

tidal kiln
#

weeds - NFC lib general discussion (low prio)

solar whale
#

fatal: no tag exactly matches '867a9c551f9cae41086030582ed690cabedca2d6'

gusty kiln
#

re: pypi, something i didn't mention under status updates is that we've got an ongoing process of deprecating older adafruit python libs in favor of the circuitpython versions as they come online. (we're pushing READMEs to pypi that mention the deprecation.)

meager fog
#

@slender iron hi was in a meetnig, update is just all the raspi python stuff

slender iron
#

np

meager fog
#

@tidal kiln if y'all are chatting about PN532 there's a python library that can be used to get started

#

i can help with it, too. its on my list

#

im not on audio

raven canopy
#

Thanks everyone! Have a great day!

tidal kiln
#

@meager fog ok. that was the general question. i created the issue, but was wondering if anyone with experience with it would start working on the driver. i can take a look at existing python lib and make a start?

meager fog
#

@tidal kiln to check do you mean PN532 or TCA9548?

#

do you have a PN532 breakout or shield or somethin' already?

tidal kiln
#

@meager fog PN532 for NFC (we're chatting about something else now)

meager fog
#

its pretty close - need circuitpythonification

#

i can take a look if its not up anyone's alley

manic glacierBOT
#

Works for me:

/V/E/c/p/nrf (translate|โœ”) $ make BOARD=pca10056 clean
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
rm -rf build-pca10056-s140
/V/E/c/p/nrf (translate|โœ”) $ make BOARD=pca10056
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
Create build-pca10056-s140/genhdr/pins.h
QSTR updated
python3 ../../py/makeqstrdata.py build-pca10056-s140/genhdr/qstrdefs.preprocess...
gusty kiln
#

-> food, back in a couple.

tidal kiln
#

@meager fog currently don't have any NFC HW, but can acquire (probably go with breakout) and start chipping away at it

raven canopy
#

Page file?

#

Salt..must be mined. ๐Ÿ‘‹

solar whale
#

@slender iron creating the case sensitive image was simple!! Thanks. Will test build later tonight. I have to run out for a bit.

slender iron
#

great @solar whale !

inland tusk
#

I went into the circuitpython weekly meeting and I could not unmute my mike. Is there something special that I have to do join in the conversation?

idle owl
#

@inland tusk Sometimes Discord is weird. Reloading, reconnecting, restarting sometimes helps.

#

There's nothing special you have to do to join the conversation.

manic glacierBOT
tidal kiln
#

can anyone else verify this? (latest everything):

Adafruit CircuitPython 3.0.0 on 2018-07-09; Adafruit CircuitPlayground Express with samd21g18
>>> from adafruit_crickit import crickit
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adafruit_crickit.py", line 58, in <module>
MemoryError: memory allocation failed, allocating 235 bytes
>>>  
raven canopy
#

@tidal kiln are you using the CPX with Crickit frozen in?

tidal kiln
#

ah. maybe.

raven canopy
#

IIRC, it says

Adafruit CircuitPython 3.0.0 on 2018-07-09; Adafruit CircuitPlayground Express with Crickit
tidal kiln
#

as in maybe not

#
Adafruit CircuitPython 3.0.0-rc.0-9-gbf9981e8d-dirty on 2018-07-04; Adafruit CircuitPlayground Express with Crickit libraries with samd21g18
>>> from adafruit_crickit import crickit
>>>  
#

PEBKAC

#

@raven canopy thanks

raven canopy
#

:+1:

tulip sleet
#

@tidal kiln I will fix that link

tidal kiln
#

@tulip sleet awesome. thanks.

tulip sleet
#

Also check the "Voice and Video" settings. Click the Gear icon, seen on the right on the screenshot above

gusty kiln
#

not infrequently i just have to restart the browser, and i've never had it work in firefox.

#

but that's pretty much par for the course with web apps and linux audio.

tidal kiln
#

same here. i gave up and use the app version on mondays for the meeting just for that reason. otherwise i'm in browser.

#

i was sometimes able to get it to work in firefox, depending on tide, phase of moon, etc.

slender iron
tulip sleet
manic glacierBOT
raven canopy
#

@slender iron is this "typical"?

vagrant@ubuntu-xenial:/usr/sommersoft/circuitpython$ sudo git add locale/*
The following paths are ignored by one of your .gitignore files:
locale/en_US.po~
locale/es.po~
locale/fr.po~
Use -f if you really want to add them.

use -f?

stuck elbow
#

the .po files are the compiled ones, you want to only add the .mo files, I guess?

#

or is it about the ~ at the end, because your vim/emacs keeps them as a caches?

raven canopy
#

๐Ÿคท first time i've run the new make translate. ๐Ÿ˜„

#

wait...nvm. add /* is picking up the cached files. good call @stuck elbow!

#

git add locale/*.po much happier...

stuck elbow
#

I never remember which ones are the compiled ones, .mo or .po

raven canopy
#

now we wait to see what Travis has to say...

slender iron
#

po are uncompiled

manic glacierBOT
raven canopy
#

Travis does not like the new submodules. ๐Ÿค”

manic glacierBOT
solar whale
#

@raven canopy Travis does not like... period

raven canopy
#

๐Ÿ˜† i'll take Travis' grumpiness for the tradeoff of functioning code.

#

i need all the help i can get...

slender iron
#

@solar whale 5v pins work for me with a single pixel

#

let me make sure its the right code

solar whale
#

hmm - can you link the build and test code -- I'll try it.

slender iron
#
import neopixel_write
import digitalio
import time
import board
import pulseio

pwm = pulseio.PWMOut(board.D10)
pwm.duty_cycle = 2 ** 15

pin = digitalio.DigitalInOut(board.D5)
pin.direction=digitalio.Direction.OUTPUT
pixel_off=bytearray([0,0,0,0])
pixel_on=bytearray([0,255,0,0])
while True:
    neopixel_write.neopixel_write(pin,pixel_off)
    time.sleep(1)
    neopixel_write.neopixel_write(pin,pixel_on)
    time.sleep(1)
solar whale
#

are you powering from VUSB?

#

or Vhi -- should be the same

slender iron
solar whale
#

what build?

slender iron
#

building a fresh one now

#

could be cache weirdness still

#

measure the pwm on d10 if you have a chance @solar whale

#

Adafruit CircuitPython 3.0.0-7-gcac760aa6 on 2018-08-20

#

works ok

#

let me try from travis

solar whale
#

I amm using the same build -- does not work for me

slender iron
#

what frequency is the pwm for you?

solar whale
#

checking

slender iron
#

2e80 works from travis too

solar whale
#

500 hz

slender iron
#

let me see what other neopixels I have

solar whale
#

i have fairly long wires

slender iron
#

ok I found an rgbw that fails

solar whale
#

shorter wires still fails

slender iron
#

blindingly so

solar whale
#

I guess thats good

#

yes - bright white!

#

do you get 500hz for the pwm?

slender iron
#

yup!

solar whale
#

ok - sounds like we have the same setup now

slender iron
#

ok and its ok on 3v

solar whale
#

yup

slender iron
#

๐Ÿ‘

#

time to poke timing

#

kinda feels like an electrical issue to me though

solar whale
#

still wrorried abput the spikes on 5V

slender iron
#

ya. maybe @meager fog is around to help us debug

solar whale
#

weird -- now it is working -- with scope probe on D5!!

#

and it works w/o probe now too!!

slender iron
#

ok, if I shorten the high pulse for 0s it works

solar whale
#

full strip test fails ...

slender iron
#

how many?

solar whale
#

8

#

but not bright white any more

#

the freq of write is 633Hz

slender iron
#
--- a/ports/atmel-samd/common-hal/neopixel_write/__init__.c
+++ b/ports/atmel-samd/common-hal/neopixel_write/__init__.c
@@ -109,7 +109,7 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t* digitalinout,
         asm("nop; nop;");
         #endif
         #ifdef SAMD51
-        delay_cycles(3);
+        delay_cycles(1);
         #endif
         if((p & bitMask) != 0) {
             // This is the high delay unique to a one bit.
@@ -129,7 +129,7 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t* digitalinout,
             asm("nop; nop;");
             #endif
             #ifdef SAMD51
-            delay_cycles(3);
+            delay_cycles(2);
             #endif
         }
         if((bitMask >>= 1) != 0) {
solar whale
#

I'll try that mod

slender iron
#

ya. I have one of those too

solar whale
#

ah -- but taht is on the 3.x modified version - correct?

slender iron
#

ya

#

I'm tuning it a bit fast

solar whale
#

ok -- I need to pull that

slender iron
solar whale
#

thanks

slender iron
#

np

solar whale
#

hmm -- no response on the strip -- write freq is 926Hz

slender iron
#

hrm

#

works for me

solar whale
#

with 1 pixel or strip?

slender iron
#

works with both

#

yellow is to saleae

solar whale
#

ok -- let me see if I can imporve my wiring.

#

ok -- your test works

#

and full test works

#
# Gemma IO demo - NeoPixel
 
from digitalio import *
from board import *
import neopixel
import time
 
pixpin = D5
numpix = 8
 
#led = DigitalInOut(D13)
#led.direction = Direction.OUTPUT
 
strip = neopixel.NeoPixel(pixpin, numpix, bpp=4, brightness=0.3,auto_write=False)
 
 
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, 0)
    if (pos > 255):
        return (0, 0, 0, 0)
    if (pos < 85):
        return (int(pos * 3), int(255 - (pos*3)), 0, 0)
    elif (pos < 170):
        pos -= 85
        return (int(255 - pos*3), 0, int(pos*3), 0)
    else:
        pos -= 170
        return (0, int(pos*3), int(255 - pos*3), 0)
 
def rainbow_cycle(wait):
    for j in range(255):
        for i in range(len(strip)):
            idx = int ((i * 256 / len(strip)) + j)
            strip[i] = wheel(idx & 255)
        strip.show()
        time.sleep(wait)
 
try:
    while True:        
        rainbow_cycle(0.001)

except:
    pass

finally:
    strip.fill((0,0,0,0))
    strip.show()

slender iron
#

with shorter wires?

solar whale
#

shorter and better connected

slender iron
#

great!

#

will PR this shortly

#

now I know to test with SK6812s

solar whale
#

Thanks! I need to put some headers on thie ITSY

#

will you alos PR it to master?

slender iron
#

ya, will merge it over soon

solar whale
#

thanks

slender iron
#

np thanks for the testing!

manic glacierBOT
idle owl
#

@raven canopy you around?

tulip sleet
#

@slender iron do you need me to merge the PR or is Jerry's review enough?

#

travis is happy

idle owl
#

@raven canopy nm, I was going to have you look at a PR but it's done. no worries

slender iron
#

either way. I was waiting for travis. You ok with me releasing 3.0.1?

solar whale
#

@slender iron I also checked it with a 7 RGB neopixel "jewel" -- worked at 5V and 3.3V

slender iron
#

ok awesome!

manic glacierBOT
slender iron
#

ah, I need to hallowing too

tulip sleet
#

@slender iron i'm fine with 3.0.1. The UART thing appears to have a been a red herrring -- we were confused about which build to test.

slender iron
#

k. I need to test the hallowing first

manic glacierBOT
#

I don't have a Feather M0 datalogger, so I tested with a Feather M0 Express instead.

In order to make a test of both send and receive without getting out the 'scope, I placed a 220โ„ฆ resistor between the RX and TX pins.

With the above-shown content in test_uart.py, I opened the repl:

Adafruit CircuitPython 3.0.0-7-gcac760aa6 on 2018-08-20; Adafruit Feather M0 Express with samd21g18
>>> import test_uart
>>> test_uart.uart.write(b'\xbb')
1
>>> test_uart.uart.read(1)
b'\xbb'
>...
raven canopy
#

@idle owl sorry. was eating and watching an episode of The 100 with kiddo. But, glad I wasn't essential! ๐Ÿ˜„

#

@slender iron or @tulip sleet, is there a right or wrong way to update the submodules? Getting this from Travis:


Fetched in submodule path 'ports/atmel-samd/asf4', but it did not contain f976380441d550910f0cd9726fac3cdea8d12a78. Direct fetching of that commit failed.

The command "eval git submodule update --init --recursive " failed. Retrying, 2 of 3
raven canopy
#

i updated with:

cd asf4
git pull origin master
cd ..
git commit
tulip sleet
#

@raven canopy. Just do git submodule update --init --recursive in circuitpython but not in a submodule. For asf4, you want the circuitpython branch, not the master branch, but you shouldn't need to do what you did manually above.

raven canopy
#

@tulip sleet i need to merge in updates for PRs i made to both asf4 and samd-peripherals... i didn't think that git submodule update would accomplish that.

tulip sleet
#

I see. Do

cd asf4
git checkout circuitpython
git pull

I think that's all you need to do.

#

for samd-peripherals, git checkout master

raven canopy
#

hmm. i might need to revisit the asf4 one. i think we merged into master.

#

which would probably explain the fetch error...

#

first things first; revert that commit. ๐Ÿ˜„

tulip sleet
#

The branches in asf4 are: master: pristine version from Atmel START; master-bugfixes: known bugs that should be applied to any branch; circuitpython: changes needed for circuitpython.

In practice, there's almost nothing in master-bugfixes, and we've just been changing the circuitpython branch. Just submit a PR against that branch.

#

The original idea was that something besides circuitpython might be using this repo. In practice nobody is, and I wouldn't recommend it ๐Ÿ˜ƒ

raven canopy
#

๐Ÿ˜†

tulip sleet
#

also submit a PR to revert the change to master, I think, to keep it clean

raven canopy
#

yep. i have a double revert, and a new commit underway. ๐Ÿ˜‰

manic glacierBOT
raven canopy
tulip sleet
#

it's just "unwanted" because it's not present in what we would download from Atmel START. I made up a tiny project with FREQM in it and I see they did #define FREQM_GCLK_ID_REF 6 in driver_init.c, but not in freqm.h, which is, well, weird.

#

the idea is just that it would be easier to merge from upstream if there were no changes introduced by us.

raven canopy
#

kk. understood, and i am no help in explaining any decisions made by START. ๐Ÿ˜„

#

reverting that commit at least got Travis to run enough to give me more fixes. yay! ๐ŸŽ‰

#

and thanks for the quick merge @tulip sleet!

tulip sleet
#

yw!

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 3\.0\.1
raven canopy
#
pirkey
-4 bytes free in flash out of 188416 bytes ( 184.0 kb ).

๐Ÿ˜ฆ

cunning crypt
#

4 bytes? Wow, cutting it close.

raven canopy
#

yeah. makes the time i'll spend getting it to pass worth it. ๐Ÿ˜„

manic glacierBOT
manic glacierBOT
raven canopy
#

that's enough Travis battle for tonight.. ๐Ÿ˜ซ

manic glacierBOT
#

Hi,

Had a busy week at work last week but i had some free time today to continue the strings translations for Spanish language, this is clearly work in progress, if there's anyone who talk/understand Spanish please let me know.

There seems to be a merge issue as i haven't update my fork it in the last days, if you see something really wrong please let me know.

Carlos

granite crow
#

Hi y'all (i guess everybody is asleep already, my timezone doesn't help me a lot to hang in here), just finished listening today's report and there's my WIP in a PR. Cya.

meager fog
tidal kiln
#

@meager fog thanks. i've got a breakout on the way. i'll help out on this when it gets here, unless it's all done by then. ๐Ÿ˜ƒ

meager fog
#

i could use help testing

#

but the code is nearly done. i can do i2c/spi/uart

final root
#

I received my ItsyBitsy today. I have installed the latest library bundle and downloaded the latest uf2 file. I've read through various bits of documentation but it's still not obvious how I should update the boot loader.

rain charm
#

is there much difference between circuitpython and micropython?

stuck elbow
#

some

#

the hardware api is different, and cp has some features disabled, also they support different set of platforms

rain charm
#

I just started with micropython last night and it(the IDE) works well with a wemos d1 mini but they're horrible when it comes to battery efficiency especially for deep sleep with the step-up and step-down of the battery voltage compared to an esp8266 using raw battery voltage. Is the cp ide good with a plain esp + usb-serial / nodemcu dev board (like arduino ide is) or will I have the same trouble?

stuck elbow
#

the IDE?

rain charm
#

yeah

stuck elbow
#

there is no IDE

#

it's just the firmware

rain charm
#

then how do you upload a program?

#

in cp

final root
#

Regarding the uf2 question. Problem solved, I just copied the latest uf2 file to the same directory that contains "current.uf2". Everything seems to be running correctly.

stuck elbow
#

@rain charm on the samd and nrf52 platforms the device is simply visible as a usb drive, you can copy or edit your files there directly

#

@rain charm on the esp8266 you use ampy or any other utility that does it, just like with micropython

#

micropython doesn't have an ide either

rain charm
#

fine - utility then. are there other utilities that are gui?

#

what would be a search term for a gui utility for micropython to an esp8266?

stuck elbow
#

no idea

timber mango
#

hello all
I am using feather M0 express and circuitpython but have some doubts about using the rtc to print the time in a different format like YYYY/MM/DD hh:mm

#

for now I use this:

#

import rtc
clock=rtc.RTC()

#

while True:
print(clock.datetime)
but can not understand how to change it?

#

Can some one give me a help?

stuck elbow
#

clock.datetime is a tuple, you can access its individual fields by indexing, like clock.datetime[0] etc.

#

then you can incorportate those numbers in your own string using the % operator for strings, like: d=clock.datetime; "%d/%d/%d" % (d[0], d[1], d[2])

timber mango
#

Oh I see!
thanks a lot

#

I want to make a log file and use this:
d=clock.datetime
f.write("%d/%d/%d %d:%d " % (d[0], d[1], d[2], d[3], d[4]))

#

Now it works!
Does some one know if the alarm option is already implemented or not?
I would like to make a log every minute and in order to preserve battery would like to put the processor in sleep state while wait...

stuck elbow
#

circuitpython has no callbacks, so no alarm

timber mango
#

do you know another way to reduce power while not acquire values?

stuck elbow
#

no

timber mango
#

so the better option probably is to use Arduino IDE as it have this functions but the file manager is not so friendly

#

๐Ÿ˜ฆ

stuck elbow
#

I'm sure circuitpython will have power management features at some point, it's just still relatively early in the development and there are other priorities

sick creek
#

with arduino ide installed you can use vs code with arduino extension

#

but i wish there is circuitPython extension as well but need to work with python one for now

timber mango
#

I understand!

tidal kiln
upbeat plover
#

๐Ÿ˜ฉ i updated feather M0 adalogger to 3.0.1 and forgot to backup code before... Luckily I have an earlier version of the code i lost saved

tidal kiln
#

did updating the firmware wipe out your files also?

idle owl
#

It happens every so often.

tidal kiln
bronze geyser
#

@slender iron thanks for the link to PyCortexMDebug ....i haven't been on discord since Sunday - so I didn't see it until now. Funny though, this AM I started playing around with PyCortexMDebug once I figured out GDB has its very own python interpreter. I mean...wow...I had no idea...so there we have it. Every day. Something to learn that everyone else already seems to know.

upbeat plover
#

not sure why but my feather MO adalogger is both drive (F:) and drive (G:) G is empty but when i eject it it ejects F: also...

#

i tried storage.erase_filesystem() also tried different version of CP still shows up as two drives... im gana restart PC and see if that helps

raven canopy
#

@tidal kiln the only thing I remember seeing is similar to explorer erroring or locking up. Dan has narrowed that down to antivirus (Kaspersky in most cases).

upbeat plover
#

still shows up as 2 drives

upbeat plover
#

it is a windows issue ๐Ÿคง

stoic marsh
#

@upbeat plover mine does it also, it doesn't seem to affect anything so I'm not working about it. MU also recognizes it., again i'm nor worrying.

upbeat plover
#

under Device Manager > Disk drives I just disabled the drive with nothing in it

stoic marsh
#

did it work?

upbeat plover
#

doesnt show up but, just visual pc still shows it disable in device manager

#

not sure what "Uninstall Device" would do so not going to try

manic glacierBOT
#

This code produces an error. With release adafruit-circuitpython-circuitplayground_express-3.0.0.uf2

import board
import neopixel
from adafruit_circuitplayground.express import cpx
pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, brightness=.2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "cpxneo.py", line 4, in <module>
  File "neopixel.py", line 91, in __init__
ValueError: Pin PB23 in use
stoic marsh
#

When running a DHT11 sensor, I get a hesiation in my system every second or so.

manic glacierBOT
tidal kiln
#

@stoic marsh can you link to your code?

idle owl
#

wait... if it uses busio, it needs bus_device right?

#

No I'm conflating I guess.

#

@tidal kiln Do you have a moment?

tidal kiln
#

totes

idle owl
#

Not write?

#

wait it's not even called auto_write anymore either. it's auto_show

#

The library was updated and the example/guide was not. If I'm reading this correctly anyway.

tidal kiln
#

i didn't write that lib. i can help with it though. what's the general issue?

idle owl
#

That the guide is wrong. I want you to verify that I'm reading it right and it's auto_show and show that are used not auto_write and write.

#

I'm updating it for the PyPi stuff, and on a hunch, checked to see if it had changed to show

idle owl
#

Ok. Thanks. I'm on the tail end of working entirely too many days in a row and wanted to make sure I wasn't missing something.

#

PR time

tidal kiln
idle owl
#

yeah that's why I second guessed myself

manic glacierBOT
tidal kiln
idle owl
#

wait. I may have linked the wrong library. I did.

#

hold on.

#

No this one still uses write.

#

shakes her fist at the inconsistency

tidal kiln
#

yes. they are not consistent.

#

that one uses auto_write and write

idle owl
#

Ok, not my priority to fix it.

#

Thank you for the sanity check ๐Ÿ˜ƒ

tidal kiln
idle owl
#

Yah. The other lib was updated by Scott it looks like, so I'm not surprised that it has show in it.

tidal kiln
#

in that TLC59711 lib, i probably would have called show instead of _write, but for now it's a moot point since it's effectively the same

#

happy to help. i'll leave you to your first shaking....

idle owl
#

I moved on pretty quickly ๐Ÿ˜„ so much to do, no time for much shaking.

#

@tidal kiln actually one more thing. I have a PR I need merged. Can you take a look? We removed SPI references from the example because SPI doesn't work. It was never tested.

manic glacierBOT
tidal kiln
#

can't test it, but it looks pretty trivial

idle owl
#

yah it doesn't change any actual code. it removes comments.

stoic marsh
#

@tidal kiln #https://www.programcreek.com/python/example/68801/time.monotonic
import os
import time
import board
from analogio import AnalogIn
from digitalio import DigitalInOut, Direction, Pull
import adafruit_dht

dht = adafruit_dht.DHT22(board.D11)
led_5 = DigitalInOut(board.D5)
led_6 = DigitalInOut(board.D6)
led_9 = DigitalInOut(board.D9)
led_5.direction = Direction.OUTPUT
led_6.direction = Direction.OUTPUT
led_9.direction = Direction.OUTPUT
dht = adafruit_dht.DHT11(board.D11)

BLINK_RATE_1 = 0.15
BLINK_RATE_2 = 0.16
BLINK_RATE_3 = 0.165
DHT_RATE = 1

now = time.monotonic()
last_update_1 = now
last_update_2 = now
last_update_3 = now
dht_update = now

while True:
now = time.monotonic()
if now - last_update_1 > BLINK_RATE_1:
if led_5.value == 0:
led_5.value = True
else:
led_5.value = False
last_update_1 = now
if now - last_update_2 > BLINK_RATE_2:
if led_6.value == 0:
led_6.value = True
else:
led_6.value = False
last_update_2 = now
if now - last_update_3 > BLINK_RATE_3:
if led_9.value == 0:
led_9.value = True
else:
led_9.value = False
last_update_3= now

if now - dht_update > DHT_RATE:
    try:
        print("Temperature,", dht.temperature)
        print("Humidity,", dht.humidity)
    except:
        pass
tidal kiln
#

@idle owl done

idle owl
#

Thank you so much!

tidal kiln
#

@stoic marsh provide more detail on what you mean by hesitation

manic glacierBOT
stoic marsh
#

@tidal kiln my LEDs blink at 0.2 seconds however each 1.0 second my system pauses for less than a second. The REPL will hang (stop printing) just like my lights

tidal kiln
#

sounds like it's the small delay that occurs for talking to the DHT every 1 second

tidal kiln
#

you need to update dht_update in the last conditional

#
if now - dht_update > DHT_RATE:
    try:
        print("Temperature,", dht.temperature)
        print("Humidity,", dht.humidity)
    except:
        pass
    dht_update = now
stoic marsh
#

@tidal kiln I just realized that ๐Ÿ˜ฆ

pulsar warren
#

I am looking for an example of a simple checksum for a serial protocol that I can implement in circuitpython

simple pulsar
bronze geyser
#

i don''t know what i'm doing so i am hoping my ask for help isn't too tedious. My challenge is getting PyCortexMDebug w/in GDB session. I downloaded PyCortexMDebug, then ran $ python2 setup.py install (note: i am paying the price for naively installing 2 versions of python - anaconda 3.6 and the default 2.7 that comes w/ Mac os). I then get into my debug session (copied gdb.py into the folder). Now on to (gdb) source gdb.py and i get Import Error: No module named cmdebug.svd_gdb ...usually, i have not problem. i just figure out the path to the module and get that all working. Here, I am confused because in my head the python2 setup.py install should have made these modules available? And i'm also not used to modules with dot....so advice appreciated. I am googling away and will eventually figure out my stupidity...but just in case it is possible to save me hours of stupidity.

final root
#

Thank you cater. I'd confused firmware with bootloader, too much time spent on Arduino probably. Thank you also for the links.

umbral dagger
#

PyConCanada (nov 9-13) just popped up on my feed again. Anyone else planning on going?

manic glacierBOT
tulip sleet
#

@bronze geyser Python is built into in gdb. You don't need to install those things. Just clone https://github.com/tannewt/PyCortexMDebug. Then use the sload21 and sload51 entries in my .gdbinit file (attached) here, modified for where you cloned that repo. You get the .svd files from these "packs: https://www.keil.com/dd2/Pack/ Search for MicroChip on that page. Download the appropriate .pack file. They are really. zip files, so rename to .zip if necessary, unzip, and find the .svd files you need.

bronze geyser
#

@dhalbert THANK YOU (THANK YOU). I will give your steps a twirl. I completely appreciate your help.

bronze geyser
#

@dhalbert AGAIN THANK YOU. This is simply wonderful. Thank you for sharing the .gbinit file. The contents are beyond my current capability...so it was great to learn from it. Oddly thrilling to type svd WDT and such then view the content.

tulip sleet
#

@bronze geyser @slender iron found it originally; we both use it: a big timesaver and it really encourages "let's just look at the registers, shall we?"

bronze geyser
#

@dhalbert i started playing around with EmbSysRegView w/in Eclipse when I was bumbling about the Atmel Start app i plugged into Eclipse. I had so much fun watching bits twiggling. I missed that in GDB (that and well - things like having all these windows with cool goop like local variables, watchpoint, breakpoints, source code/step debugging that is more obvious....but how cool it is to extend gdb w/ python. my oh my. folks sure are smart!

tulip sleet
#

@bronze geyser v nice; btw, tag me as @tulip sleet, not @dhalbert here, else I won't see a notification. @dhalbert is right for GitHub.

marble hornet
raven canopy
#

@tulip sleet any suggestion on getting pIRkey build within size, when only one translation is failing (french)?

-12 bytes free in flash out of 188416 bytes ( 184.0 kb ).
24644 bytes free in ram for stack out of 32768 bytes ( 32.0 kb ).

Too little flash!!!
tulip sleet
#

trying...

raven canopy
#

this is on my Travis, with FrequencyIn. and just checked Trinket:

16 bytes free in flash out of 188416 bytes ( 184.0 kb ).
24592 bytes free in ram for stack out of 32768 bytes ( 32.0 kb ).
#

๐Ÿ˜ฌ

tulip sleet
#

is this with your FREQM code?

raven canopy
#

well, not for SAMD21; its only available on the M4.

#

but pulseio.FrequencyIn, yes.

tulip sleet
#

i haven't tried to build other than english, what's the command line for the build?

raven canopy
#

runs to the makefile ๐Ÿ˜„

tulip sleet
#

i need to run make translation with another arg?

raven canopy
#

no, that will build all of the source.

#

i think its in one of the .mk files...

tulip sleet
#

is the point that you'd be using pulseio.FrequencyIn for the IR receive?

#

what is the size with en_US?

raven canopy
#

it won't be used on pirkey, that i can think of. it has no GPIO correct? i had the thought about of wrapping it all in #ifndef PIRKEY, and raising NotImplemented otherwise. but, even after that, it looks like French may be a problem elsewhere (see above for Trinket).

marble hornet
#

can i ask what you need to run to pull the recursive sub repos when you first download circuitpython?

tulip sleet
#

@marble hornet yes git submodule update --init --recursive, and also when you change branches

raven canopy
#

@marble hornet because they aren't downloaded with the original clone. each submodule is a .git of its own...

tulip sleet
#

or pull or merge to update

raven canopy
#

ohhhh.... "what to run". not "why". ๐Ÿ˜†

marble hornet
#

i can never remeber the darned thing. i'll put it in a text file now

#

thanks @tulip sleet

#

and you too sommer soft

raven canopy
#

hehe. i try. ๐Ÿ˜„

tulip sleet
#

it should be in the "Building CircuitPython" Learn guide

marble hornet
#

YAY!

tulip sleet
#

but we need pulseio for IR receive in general, right? Scott is very reluctant to drop individual classes from modules.

#

can you point to the travis page -- I just want to look at the other build sizes

marble hornet
#

could the class from pulseio be put into ir?

tulip sleet
#

it's c code, so hard to move

raven canopy
#

@tulip sleet yeah. in comparing the last adafruit travis builds and mine, i'm eating flash like peanut butter. i may have to reserve FrequencyIn for M0 Express and M4....

#

esp & nrf are stubbed out...got one more thing to work out for those to build.

tulip sleet
#

without FrequencyIn, pirkey has 2624 bytes free in english

#

there may be an example of #if'ing something out and making it NotImplemented, but I'm not sure about that

raven canopy
#

I2C has it, but only for the construct; not the entire module.

#

but, like i said. Trinket in French has 12 bytes... English and Spanish are at 1260 bytes. it really might be better to cast a wide net on this one.

#

or...my code is just that bloated. ๐Ÿ˜„

#

if the TC direct pin capture worked as advertised in the datasheets, it would be much slimmer. no need for all the EIC & EVSYS code.

tulip sleet
#

i looked through the french msgs -- they don't look THAT much longer, but maybe the sum is

raven canopy
#

i need to look closer at how the translation stuff works. i know that i didn't add any translation strings, so i don't know what exactly it is translating.

tulip sleet
#

spanish is a fake right now, because it's still being worked on -- it's just the english file -- that's why it's the same size

raven canopy
#

that explains that... ๐Ÿ˜„

#

i was scratching my head a little.

tulip sleet
#

did you wrap all your messages in translate(), though?

raven canopy
#

yep. fails otherwise.

tulip sleet
#

so I would say for now just do the same thing for FrequencyIn on the pirkey that you see for I2C. We have to think about what to add and what to drop for the small builds. Scott saved 2kB or so with the compressed strings, but we're losing it with more verbose languages and additional functionality. Eventually we have to stop stuffing new stuff in the small builds.

#

you can also crank -finline-limit down, but we've already done that several times, and it's good for emergencies

#

that's in the Makefile

marble hornet
#

does cp still have crystaless ?

#

i could not find it in triket_m0 or gemma

tulip sleet
#

@marble hornet there is now a #define BOARD_HAS_CRYSTAL 1 in the mpconfigboard.h for the boards that DO have a crystal

marble hornet
#

is this recent?

#

thank you both for all the help, i should head to bed, good luck.

raven canopy
#

night @marble hornet! ๐Ÿ‘‹

final root
#

My itsbitsy M4 was working correctly until I started experimenting with analogue in. Now on start up the green led fades up then down again followed by two leds, a bluish and what could be orange it's a bit hard to tell. The leds are not blinking.

The result is that I cannot download code to the board either with MU or from a text editor. Actually, code.py does contain the code but it's not running. There aren't any error messages from MU.

After hours of trying to get a simple blink the led to download and run I've given up. There are no syntax errors and this code did initially work until I started to experiment with analogue in.

Before posting this I tried to load code into MU again. Nothing even though the text editor shows code.py has the correct code.

So, where to now?

#

I just unplugged the board and plugged it back into the usb port and the blink is running. Perhaps it has someting to do with MU? MU is closed..

manic glacierBOT
#

I started putting together a project with my Trinket M0 to use for switching boot volumes on macOS. My goal was to have it select a volume by keystrokes. However, it doesn't seem to be working.Working correctly in macOS once booted

Using the same code for HID keyboard:

  1. plug trinket m0 into usb on mac
  2. reboot system

`
import time

import board
import digitalio
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
from adaf...

final root
#

Never mind, I found the problem. Mu had entered REPL mode.

manic glacierBOT
#

This PR does following things with nrf52

  • remove bootloader, dfu-boot(loader) target, along with bootloader hex/zip file in the boards folder. User should clone the https://github.com/adafruit/Adafruit_nRF52_Bootloader and flash there. It is possible to flash or upgrade (dfu-flash) to specific version without compiling the bootloader. Also update readme.md for #1069
  • adafruit-nrfutil is used instead of nrfutil, readme.md is also updated
  • only new feature is touch 1200, when the...
manic glacierBOT
#

The HID keyboard currently presented by CircuitPython is not a boot device keyboard, with its own endpoint(s), which is what the Mac Open Firmware ("BIOS") and regular PC BIOSes expect. It's part of a composite HID device that includes mouse, multimedia keys, and a gamepad. This was to save endpoints for other purposes.

We've had one other person who wants a boot-compatible keyboard and we're thinking about that - we have to count up the available endpoints and what we want for the futu...

manic glacierBOT
upbeat plover
#

this is a very easy way to make timers or delayed stuff without sleeping


import time

# create start time
ticker = time.monotonic()

# delay for
def timeA(delay, ticker):
    if ticker + delay < time.monotonic():
        return True
    else:
        return False
       

while True:
    # every 30 seconds do
    if timeA(30, ticker) is True:
        print('timer triggered')
        # reset timer
        ticker = time.monotonic()
#

using it in my adalogger script so i can do other stuff while the write to SD card is delayed

manic glacierBOT
tidal kiln
#

@upbeat plover neat. you could even remove the check for True and just do:

if timeA(30, ticker):

also wondering if there's a way to get the function to also deal with updating ticker for you...hmm....

#

@stoic marsh you might be interested in that ^^

upbeat plover
#

would be cool if it was in the modula

#

like stick that code in time

#

i think timeA should be renamed to alarm

bronze geyser
#

i'm stepping through a CP C extension I've written. At the end of a function, i'm getting in the Jlink window ```Performing single step...
...Breakpoint reached @ address 0x00017134
Reading all registers
Performing single step...
...Breakpoint reached @ address 0x00017134
Reading all registers
Performing single step...
...Breakpoint reached @ address 0x00017134
Reading all registers

meager fog
#

@umbral dagger helooooooooooo im around today - finally taking a break for raspi py

manic glacierBOT
umbral dagger
#

@meager fog The Pi stuff is lookign cool!

meager fog
#

yah i can look at the perky ears again

#

do you still have that gif of your friend wearing them?

manic glacierBOT
umbral dagger
#

@meager fog I do

meager fog
#

can you re-add to the guide front page

#

i liked it ๐Ÿ˜„

umbral dagger
#

@meager fog In place of the one of me?

manic glacierBOT
meager fog
#

@umbral dagger in addition!

#

more gifs are better than less gifs ๐Ÿ˜„

umbral dagger
#

@meager fog Added. Rearrange as you see fit.

#

@meager fog Should one of them be used for the thumbnail?

meager fog
#

thinkin' it over ๐Ÿ˜ƒ

#

didya end up finding any fake fure

umbral dagger
#

Not yet

manic glacierBOT
umbral dagger
#

That's on the list.

meager fog
#

ok well lets get this goin' as is, and can always add later

#

one moment

#

@umbral dagger by chance do you have a high rez version of that friend gif

umbral dagger
#

I have a 720p video

#

So I can go as high as a 1280x720 gif

tidal kiln
#

@upbeat plover did some noodling...

import time

class Timer():
    def __init__(self, duration):
        self.duration = duration
        self.last_update = time.monotonic()

    @property
    def elapsed(self):
        now = time.monotonic()
        if now - self.last_update > self.duration:
            self.last_update = now
            return True
        else:
            return False

which can be used like this:

timer1 = Timer(0.5)
timer2 = Timer(2.8)

while True:
    if timer1.elapsed:
        print("timer 1")
    if timer2.elapsed:
        print("timer 2")
umbral dagger
#

@meager fog bigger, higher-res version at top of overview page now.

meager fog
#

@umbral dagger can you toss me the 720p video

#

oops sorry i was away for a few min, didnt see your note

#

nice

umbral dagger
#

@meager fog sent

meager fog
#

thanx

#

@umbral dagger guid'es live!

#

huzzah

#

thanks for being patient, i was neck deep in linux

#

and linux is a baaaaaad place to be

umbral dagger
#

@meager fog No worries.

#

@meager fog Ah... no way. Linux is awesome ๐Ÿ˜ƒ .. although I hear that driver-land might not be so much so.

meager fog
#

its awesome until you have to do something that it doesnt do

#

or SAYS it does and doesnt do ๐Ÿ˜ƒ

#

second one is trickiest

umbral dagger
#

Some Linux/Pi projects/guides wouldn't be objectionable to me, BTW

meager fog
#

yah! we'll have the crickit hat soon

#

if you can wait a little longer, i think thats better than trying to hack it on with wires

#

then of course you get full ๐Ÿง power

manic glacierBOT
#

No, the only reason is probably the flash size. In Arduino repo, I will also drop support for SD v2 as well for the next nrf52840 release. It is the pain to have ble driver to support 2 flows of the APIs. Since @arturo182 ask to wait for him to come back. And he is the one writing the ble driver ( I haven't touched it so far). I guess let's wait for him to clean them up later.

gentle bronze
#

hi anyone know how to use sprintf with cp in nrf52 port. It complains that _sbrk is not defined, should I implement the nanolib hook or there is other way to use sprintf function ?

tulip sleet
#

@gentle bronze you can use mp_printf(&mp_plat_print, "foo %d", ...)

#

oh, sprintf, hold on

manic glacierBOT
#

ah, I sorry, I misunderstood your question, since you askabout nrf52832, nrf52832 does not have SD 6.0.0 support. only v2 and v5
https://github.com/adafruit/circuitpython/tree/master/ports/nrf/boards/feather52832#s132-v201-single-bank-recommended

For 6.0.0, only nrf52840 is supported, 6.1.0 is binary compatible with 6.0.0 the flash size is the same, there is no reason to hold 6.0.0. I will remove them in the next push if you like

gentle bronze
#

@tulip sleet not really need a full spritnf, only need to convert mcu unique ID 64-bit int in to serial string for usb descriptor

#

char tmp_serial[17];
sprintf(tmp_serial, "%08lX%08lX", NRF_FICR->DEVICEID[1], NRF_FICR->DEVICEID[0]);

#

something like this

tulip sleet
#

@gentle bronze hmm, but I have a file here that I made up with sd's sizes:

nRF52832 has 512kB flash

size of S132 SoftDevices (info from release notes):

s132_nrf52_6.1.0
Flash: 152 kB (0x26000 bytes)

s132_nrf52_5.1.0
Flash: 140 kB (0x23000 bytes)
#

we have some other code that already converts to hex for unique id's in atmel -- I will find it

gentle bronze
#

SD flash size changed when the first major version change, I though you want to remove 6.0.0 since we got 6.1.0

#

the current nrf52832 is only got to work with v2 & v5. Possibly no v6, since the bootloader with v6 for 832 is not released yet, until now ๐Ÿ˜„

tulip sleet
#

yes 6.1.0 replaces 6.0.0 - don't need to wait for arturo - we'd back up only if necessary

gentle bronze
#

ok, I will remove it then.

tulip sleet
#

i would assume the advantages outweigh the disadvantages

#

@gentle bronze for nibbles to hex, there is some code you can adapt in /ports/atmel-samd/supervisor/serial.c: load_serial_number(). That code reads from specific registers and writes UTF-16 but you can remove that part and just use the conversion code.

#

it was to write UTF-16 into usb descriptors

gentle bronze
#

@tulip sleet only need to remove the download script for s140 6.0.0, currently s132 6.1.0 is not supported at all, I will remove it as well.

#

@tulip sleet thanks, exactly what I am about to do with nrf52 port ๐Ÿ˜„

tidal kiln
manic glacierBOT
gentle bronze
#

@tulip sleet the nibble works, I just wonder if there is anything prevent us to add nanolib sprintf func to the nrf52 port. It will probably take 2k of flash, but nrf52840 have plenty to spare.

tulip sleet
#

@gentle bronze (I thought you were asleep ๐Ÿ˜ƒ ) if sprintf is looking for _sbrk it may be trying to allocate memory, and that may or may not with the rest of the storage mgmt. There are similar routines that do formatted printing or string-making to implement that kind of stuff in python, and you could alternately use those. I was starting to look at how but ended up on the serial number stuff.

#

in other words sprintf might be kind of redundant

gentle bronze
#

Ah I think that is std libc, nano spec does not use sbrk I thibk

#

Didn't try to change the makefile for that

tulip sleet
#

there is py/objstr.c, which has formatting in a static function mp_obj_str_format_helper(), called by several routines there

#

for doing '%' formatting in Python, which is basically printf-style

#

it does it into python objects, so have to see how to use it, but it shouldn't be too hard

gentle bronze
#

Yeah, I am too nervous to use those. I still prefer good old sprintf. It will come handy later on. 2k is not a big deal. Even bootloader uses sprintf :D

#

Maybe we will add it later if needed, the nimble things work now :D

tulip sleet
#

yeah, let's wait, and I'll see if there's an easy way to call the python stuff. there is already mp_printf(), and maybe that or a sister routine even supports printing to a buffer in some way I don't know

gentle bronze
#

๐Ÿ‘

#

Time to sleep now, I submit serial pr tomrrow then focus on Arduino entirely. Since people that buy feather 52840 would expect it to work the same way with arduino as 52832 + usb ๐Ÿ˜ฌ

#

@tulip sleet good night (noon)

tulip sleet
#

yes, good night!

manic glacierBOT
bronze geyser
#

@tulip sleet - re: CP submodules. Your guide notes to: git submodule update --init --recursive ...just thought you might be interested...in my case, I wanted to start using the released version of CP 3 (i'm assuming this is branch 3.x). for me to checkout 3.x correctly, i was not able to cleanly get to a 3.x with the steps in your guide. Rather this worked: git clone --recursive -j8 https://github.com/adafruit/circuitpython.git (caveat - i have just a little idea what i am doing).

manic glacierBOT
raven canopy
upbeat plover
#

im having CPX issue it is in bootloader mode but CPLAYBOOT isnt showing up on PC

tidal kiln
#

how do you know it's in bootloader mode?

upbeat plover
#

red D13 but all neopixels green

#

red d13 is blinking a bit

#

im gana go plug it in other pc see if it is just my windows or something

tidal kiln
#

red d13 should pulse

upbeat plover
#

yeah thats what i mean goes bright then darker

tidal kiln
#

yep. ok. that all sounds correct.

#

did it used to show up on the same machine?

upbeat plover
#

yeah but ive been having issue lately, like stuff shows up as 2 drives

#

i just tried it in other PC working fine

#

UGH!!!! i guess im gana format HD and do fresh windows 10

cunning crypt
#

Oh, SWEET. Since the last time I checked, CPX now has an RFM9x radio library (It's been at least a year, I put down the project and only "found" the radios again today)

cunning crypt
#

Hmmm. So, what's the process to compile things to a .pyc file?

#

@umbral dagger would you happen to know?

velvet badger
#

What are you needing .pyc files for?

#

All the circuit python stuff I've done so far has everything built in, so you just dump the uncompiled code into the drive as main.py or code.py

cunning crypt
#

@velvet badger Using a non-Express board.

#

Python files include comments + other stuff so compiling to pyc saves space

velvet badger
#

Right. No idea how you would do that.

#

I'm pretty sure the Lora boards have a circuit python ROM, though... I think I have a couple...

cunning crypt
#

M0 basic + LoRa (RFM95) feather

umbral dagger
#

@cunning crypt I do not (happen to know)

#

@cunning cryptDo you mean mpy?

cunning crypt
#

Maybe?

umbral dagger
#

mpycross (or similar) is used to do them... precompiled bytecode.

#

I havenโ€™t played with it much though

#

Having files precompiled means you donโ€™t need to use ram to compile them at read-time

solar whale
#

@cunning crypt the " 3.x Bundle" has the ,mpy for the rfmf9x in it. You use mpy-cross to create your own

#

It can work on an M0 basic with rfm9x wing, but you will be very tight on both Flash and RAM

cunning crypt
#

@solar whale Awesome!

#

Honestly, the M0 basic won't be used for final version.

#

I... just want to play around.

solar whale
#

@cunning crypt - I think the only libraries you need are the adafruit_bus_device folder and adafruit_rfm9x.mpy

cunning crypt
#

Yep!

#

Hey, it's working!

solar whale
#

are you using the feather M0 basic with the rfm9x on the same board or a featherwing.

cunning crypt
#

Featherwing

#

M0basic proto

solar whale
#

great -that it is working!!

cunning crypt
#

I'm planning on building a remote rover. Which will likely be an M4 + Featherwing, and the controller for it will probably be an M0 Express + Featherwing. Since all I really have to do is acquire the M4 for that, it makes it a lot easier.

solar whale
#

Sounds like fun!

cunning crypt
#

Huh.

#

Now I'm getting an unexpected indent, when... Hmm.

#

right

solar whale
#

You reminded me that I want to try the rfm9x and rfm69 with an M4 -- on todo list.

cunning crypt
#

The editor made it look like the same indent, but it was tab vs spaces

solar whale
#

tabs are evil

#

Bedtime here -- godd luck and good night!

granite crow
#

Hi, i keep the translation for spanish lang and got a question about how to get my fork updated without having conflicts with my edited .po file, should i just pull from Adafruit's repo?

raven canopy
#

@granite crow yep. do you have adafruit's repo added as a remote?

granite crow
#

now that i think about it i think i don't, iirc my origin is set to my fork, isn't?

#

i only know basic git

raven canopy
#

if you cloned from your fork, then yes you'll need to add it. run git remote -v real quick just to make sure. it will give a list of the current remotes mapped.

#

just make sure you're not in one of the submodule directories (e.g. "asf4", "peripherals", etc)

granite crow
#

thanks @raven canopy , and yes, my fork is set as origin (both fetch and push)

raven canopy
#

do you know how to add the remote? if so, then i will only say, that the standard is to only merge. no rebasing, so the history stays "complete".

granite crow
raven canopy
#

yep. that's the one.

#

then just run:

git pull adafruit master
git submodule update --init --recursive

a merge message may open after the pull. leave the merge message uncommented and close.

granite crow
#

ok, so this command gets the adafruit master and merge it into my branch? does it overwrite my edited .po file?

raven canopy
#

it shouldn't overwrite your local edits ("fast forward merge" is the default). if you're worried, you can use git stash to keep a copy of your local edits, and apply them after the update.

#

this is my goto reference for git. the documentation style takes some getting used to, but it is very comprehensive. https://git-scm.com/doc

granite crow
#

thanks for the link

#

just another question, i'm working on a branch, should i stay on that branch and pull the adafruits master, do you think it's the best way to keep my changes out of master?

raven canopy
#

good that you're working on a branch (i was going to mention that; i waited too long to act on that advice. haha). you're fine either way. i do it both ways at different times; the only difference i've come across is an extra merge from... commit.

granite crow
#

i think i can merge and don't commit the merge 'step'

raven canopy
#

well, if you pull into your branch, it will most likely have a merge commit. if you pull upstream (adafruit) master down to your master, then no merge commit is created. i wouldn't stress the extra commit...

granite crow
#

sounds fair

#

i got a merge conflict when trying to pull into my branch CONFLICT (content): Merge conflict in locale/es.po

raven canopy
#

what does git diff locale/es.po show?

granite crow
#

almost all the new strings marked to be translated

#

most of it it's green, just about three rows in red, which i think are the lines causing the conflic

#

conflict*

#

do you want me to upload the diff to pastebin or something?

raven canopy
#

here is what i would do:

  1. copy your local file to a location outside of the repository just in case.
  2. abort the merge git merge --abort.
  3. stash your local edits with git stash.
  4. attempt the pull from master again
  5. if no conflicts, reapply your local with git stash apply stash@{0}

that is probably the long way to do it. i'm no git master either... ๐Ÿ˜„

#

there are different things you can do with merge strategies, but i don't understand them enough to advise on them. and i've done an interactive rebase when they were allowed; not fun.

granite crow
#

np, i had used git for personal projects only, or projects that didn't moved so fast as circuitpython hehe

raven canopy
#

heh. i was the same. learned quite a bit on this project, with help from folks around here.

granite crow
#

and now you're helping me ๐Ÿ˜ƒ

raven canopy
#

trying, at least. ๐Ÿ˜„

granite crow
#

well, we got it almost working haah

manic glacierBOT
#

While trying to get Travis builds to pass on added module functionality, I'm finding flash space issues with translated builds (non-judgemental! more beautiful languages require more space). In thinking of things to help reduce the hit some, I thought about going through each of the msgids and seeing if we can standardize any of the "close but not exact" iterations.

Having said that, I'm not sure that it will help that much overall, as I still am not quite sure how it's all getting comp...

raven canopy
#

@granite crow is it just the one file that you've changed? it just dawned on me that the easiest option may be to just update your master, create a new branch from that, and then copy the edited file in and commit it.

#

downside is you lose any commit history you've had so far...

granite crow
#

yes, it's just the po file for the spanish strings, i did a couple of commits so far. I was reading about solving the merge conflict using vimdiff

#

i solve three merge conflicts, they were really silly. i saved the po file and now if i run git mergetool i get no files need merging

raven canopy
#

what does git status say?

granite crow
#

all conflicts fixed but you are still merging

#

i jst checked the es.po file and the markers of the conflict still in there, i guess i will work on another branch with the newest master from adafruit

raven canopy
#

this will be the second time i say this today: git is a strange and mystical land... ๐Ÿฆ„

granite crow
#

it certainly does

raven canopy
#

alright. i'm gonna play a little before bed. hope git starts playing nice for you @granite crow! ๐ŸŽฎ ๐Ÿ˜ด

granite crow
#

Thanks @raven canopy for the help, i will let you know when i got it working. Have a good night!

slender iron
#

@granite crow did you finish the merge?

granite crow
#

no i didn't, i aborted it, it seemed like solved but a lot of 'junk' got into the po file

slender iron
#

I'd actually recommend a rebase

#

git rebase -i adafruit/master

#

it still may have conflicts though

manic glacierBOT
granite crow
#

by rebasing i got the two commit i have in my branch

#

should i pick both?

slender iron
#

yup! it'll replay the changes on the newer files

granite crow
#

ok, i now do git status and got a bunch of unstaged files, which i guess are the newer files pulled from the adafruit master

#

and a file named es.po.orig, i'm almost sure i messed something up ๐Ÿ˜’

slender iron
#

hm, its usually similar to a merge

raven canopy
#

hehe. and i steered him away from a rebase. ๐Ÿคท ๐Ÿ˜„

manic glacierBOT
manic glacierBOT
lone sandalBOT
manic glacierBOT
#

I thought the descriptor string had to be UTF-16, so every other byte has to be zero. Am I wrong about that? The code in ports/atmel-samd/supervisor/serial.c does that:

    for (int i = 0; i < 4; i++) {
        for (int j = 0; j < 8; j++) {
            uint8_t nibble = (*(addresses[i]) >> j * 4) & 0xf;
            // Strings are UTF-16-LE encoded.
            serial_number[i * 16 + j * 2] = nibble_to_hex[nibble];
            serial_number[i * 16 + j * 2 + 1] = 0;
        }
    ...
upbeat plover
#

just got my hallowing in the mail

stuck elbow
#

any plans for it?

upbeat plover
#

yeah make something for my mom to wear, she works for Head Start, made a graphic for it the other day while waiting for it....

#

will be boot logo

#

i got some other stuff in mail with it, feather TFT wing, and Feather nRF52

stuck elbow
#

nice

upbeat plover
#

the hallowing when plugged into USB the charge LED blinks fast

#

no battery connected

dusk hemlock
#

Hey guys, I've updated CP on Feather M4 Express to 3.0.1 and on-board NeoPixel stopped working. Is this a known issue?

manic glacierBOT
stuck elbow
#

@dusk hemlock there was a neopixel bug fixed recently

dusk hemlock
#

cheers @stuck elbow

tidal kiln
#

@upbeat plover i think that blink is normal. it happens on some feathers also.

#
 There's also a CHG LED, which will light up while the battery is charging. This LED might also flicker if the battery is not connected.
#

^^ that's from the feather 32u4 guide, but it's probably the same thing, good chance the charge circuit was reused

#

@dusk hemlock this quick test worked for me:

Adafruit CircuitPython 3.0.1 on 2018-08-21; Adafruit Feather M0 Express with samd21g18
>>> import board
>>> import neopixel
>>> pixels = neopixel.NeoPixel(board.NEOPIXEL, 1)
>>> pixels[0] = 0xFF00FF
>>> 

how are you trying to control it?

#

oh wait M4....hold on....

dusk hemlock
#

@tidal kiln it's the NeoPixel that's on the board

#

In 3.0.0 it works as expected but as soon as I flash 3.0.1 it stops working. Blue/green/white to indicate the state the board is in.

tidal kiln
#

i'm getting the same behavior

#

@slender iron @tulip sleet is that ^^ new / know?

slender iron
#

@tidal kiln its supposed to be a fix. its possible I broke it because its undervolted

#

I fixed 5v neopixels

dusk hemlock
#

@tidal kiln @slender iron it works fine on Metro M4 Express

slender iron
#

weird

#

please file an issue. I'll take a look soon but don't want to interrupt what I'm working on now

tidal kiln
#

@dusk hemlock know how to file an issue?

dusk hemlock
#

I do

tidal kiln
#

excellent. thanks for finding this.

manic glacierBOT
#

After upgrading to CP 3.0.1, built in NeoPixel does't work anymore. It doesn't indicate the CP state with green/white and driving it with code has no effect.

Code below works in 3.0.0, doesn't work in 3.0.1

import time
import board

import neopixel
led = neopixel.NeoPixel(board.NEOPIXEL, 1)
 
led.brightness = 0.3
 
while True:
    led[0] = (255, 0, 0)
    time.sleep(0.5)
    led[0] = (0, 255, 0)
    time.sleep(0.5)
    led[0] = (0, 0, 255)
    time.sleep(0.5)
dusk hemlock
#

no problem, happy to help

slender iron
#

thanks @dusk hemlock !

manic glacierBOT
solar whale
#

@tidal kiln @slender iron the my metroM4 neopixel does not work with 3.0.1

slender iron
#

@solar whale are you interested in tuning the waits?

#

I think I may have made it a bit too fast now

solar whale
#

I should have time tomorrow if not later tonight -- be happy to try.

tidal kiln
#

same for me on Metro M4 Express as well as Feather M4 Express

slender iron
#

ok thanks!

solar whale
#

I'll try to find a balance taht works for both 5V on the itsybitsy M4 and the on-board neoppixels for the feather/metro...

slender iron
#

perfect!

manic glacierBOT
granite crow
#

Hi, i'm planning to get a circuitpython supported board, which one do you guys recommend? just for learning purposes, i don't have a lot of projects in mind.

#

i like to work with DMA, so i guess an M4 board would be cool to have

raven canopy
#

CPX would probably be the most recommended, since it has a host of sensors already on it. If you're looking for one of the M4 boards (more flash/ram/mhz), its really just a matter of size and if you want an on board 2x5 SWD port.

#

Also, the M0 boards have DMA available on them as well. i'm not sure if it has as many DMA peripherals supported as the M4 though.

granite crow
#

Hi @raven canopy , how are you? i will take a look into the CPX board, now that i think about it i haven't done anything related to audio, is there any board with mic or I2S periphs onboard?

raven canopy
#

I'm good. hope you are as well. the CPX is the only board that comes with anything already applied; includes a PDM mic. All of the "Express" boards have I2S out available (with exception of the ItsyBitsy M4 Express).

#

correction: CPX has a MEMS mic...not PDM.

granite crow
#

The Circuit Playground Express one looks good

manic glacierBOT
manic glacierBOT
manic glacierBOT
tulip sleet
#

@granite crow @raven canopy CPX has a MEMS mic that outputs the raw PDM (as opposed to I2S). The lack of I2S circuitry on the mic made it cheaper (and maybe smaller).

#

@solar whale you should be able to see travis output by clicking on the Details link on the PR page. I tried that link with an incognito window and still saw travis, so I don't think it's a credential issue

solar whale
#

@tulip sleet I can see it, just did not understand it ๐Ÿ˜‰

#

trying again -- I did see taht if I try to buld the nrf pca10056 without specifying the SD=s140 Under 3.1 the build fails -- this worked before for 4.x

#

waiting to see if that is where travis fails

tulip sleet
#

there was a pr late last night that Scott merged that included my changes and thach's that built ok -- do you have those latest changes?

solar whale
#

I dids a pull this moring -- did you build 3.0.1?

tulip sleet
#

that was a master pr, forgot you're doing in 3.x. I'l get 3.x and see.

#

so pca10056 doesn't build for you on 3.x?

solar whale
#

it builds i f I specify SD=s140

tulip sleet
#

pca10056 built for me on 3.x; maybe you need to git update submodules?

solar whale
#

just make BOARD=pca10058 worked?

tulip sleet
#

yes, my alias is set up to specify SD=s140

solar whale
#

ah -- byt travis does not do that

#

almost there pca10056 is next on travis

#

it seems to be building -- maybey it just needed to retry

tulip sleet
#

was there an exclamation mark or an X when it failed?

solar whale
#

exclamation - if I recall correctly

tulip sleet
#

that's an internal travis failure, not a build step failure. it probably failed to download something or something else went badly wrong with the VM

#

X means that it's our problem. ! is travis's problem

solar whale
#

ok -- pca10056 passed this time

#

good to know!

tulip sleet
#

! happens often than i would expect

solar whale
#

hmm metro_m4 and pirkey are taking a very long time...

#

metro m4 gave exclamation !!

tulip sleet
#

just restart them, travis is having a bad day

stuck elbow
#

EXCLAMATE!

solar whale
#

Ah -- did not realize I could jsut restart individual builds --- much better!

stuck elbow
#

hmm, that could be a name for a soft drink

solar whale
#

when Travis has a bad day, wea ll have a bad day !

tulip sleet
#

it has gotten worse. it may be running on older infrastructure. travis is migrating all travis-ci.org accounts to travis-ci.com, which has newer features. However, it's not an automatic migration yet, so we're waiting. They haven't changed the rules -- it will still be free for open-source projects

solar whale
#

metro-m4 and pirkey passed this time -- now just wating for TRAVIS_TEST=docs

#

yay! all passed -- whew!

tulip sleet
#

i can merge it. should i ask the original issue writer to test it? You saw the same thing, right?

solar whale
#

Yes -- it would be good for the OP to test -- and anyone else!

manic glacierBOT
solar whale
#

thanks!

tulip sleet
#

after the merge build finishes i'll post a link to the s3 build in the issue. thank you

solar whale
#

once we are satisfied with this, it should also get into master

#

@tulip sleet I am getting frequent FS corruptions lately -- not sure if it is a CP issue or something to do with Ubuntu 18,04 -- have you had any problems.

#
[501893.026232] FAT-fs (sdc1): error, fat_get_cluster: invalid cluster chain (i_pos 138)
[501893.026235] FAT-fs (sdc1): Filesystem has been set read-only
[501893.026238] FAT-fs (sdc1): error, fat_get_cluster: invalid cluster chain (i_pos 138)
[501893.027650] FAT-fs (sdc1): error, fat_get_cluster: invalid cluster chain (i_pos 138)
[501893.073174] FAT-fs (sdc1): error, fat_get_cluster: invalid cluster chain (i_pos 138)
stuck elbow
#

no problems here

solar whale
#

I see thsi on power up all too often -- maybe one of 4 times!

stuck elbow
#

perhaps your flash started failing

solar whale
#

it has happend on metro_m4, itsbitsy m4 and feather m4

#

storage.erase_filesystem() then reload works -- for awhile

#

@stuck elbow what OS and boards are you using

stuck elbow
#

@solar whale ubuntu 18.04.1 and all the feathers, trinkets, itsybitsys, metros, as well as my own custom boards...

solar whale
#

OK -- good to know -- sounds like it is a setup problem at my end -

stuck elbow
#

or a faulty device

#

or corrupted filesystem

solar whale
#

or af faulty operator ๐Ÿ˜‰

tulip sleet
#

@solar whale i have not seen that. i always sync after cp-ing, and I always use an editor that writes completely

prime flower
#

Gonna test CircuitPython_NeoPixel with my Pi this AM, hopefully no sparky

meager fog
#

@tidal kiln ok i released the ST7735 library and seesaw, examples now live in the tft library

#

wanna test it?

tidal kiln
#

@meager fog sure. i can test the minitft featherwing, don't have one of the new tftshields yet though.

meager fog
#

yah thats the only one i did so far

tidal kiln
#

while you're here - for PN532 - want me to cookiecutter the repo?

manic glacierBOT
tidal kiln
#

@meager fog miniTFTwing examples look good, left==left, right==right ๐Ÿ‘
(tested both basic and graphicstest examples in 1.2.2 release of ST7735 lib)

covert oxide
#

good day all... is there a way to run travis tests locally? im unfamiliar with them

manic glacierBOT
#

@dhalbert I can confirm, build from caa2328 fixes the problem on both Feather M4 Express and Metro M4 Express.

I have 2 Metros M4 Express and 2 Feathers M4 Express. Yes, I always buy my boards in pairs due to magic white smoke being so eager to escape.

While both Feathers had the same issue with 3.0.1, Metros didn't. One worked fine but the other one presented the same issue. Both Metro boards were purchased at the same time from Mouser so I assume they were from the same batch.

meager fog
#

@tidal kiln back yah if you wanna cookiecutter PN532

#

i killed my hardware but got new hardware so i can continue on that

#

it needs a little more โค

tidal kiln
#

yep. i'm going through a pile of datasheets and ANs, but will be ready to help here in a bit...

#

you wanna merge your personal repo back into the adafruit one? and i'll fork and pr that?

meager fog
#

well let me get it at least working for sure

#

and fix the typos

#

then ill do a PR

tidal kiln
#

cool. i'll look for that.

#

i'm thinking this is going to change a fair amount. maybe have a base PN532 class that I2C/SPI/UART specific classes can derive from? also use @property more, instead of get/set funcs.

meager fog
#

yeah

tulip sleet
#

@covert oxide the travis tests are just shell scripts, which you can run locally. Look at the .travis.yml file in the repo you're looking at. Or you can set up travis for yourself for free, but that may be more trouble that it's worth.

tulip sleet
#

@slender iron any thoughts on when we should do another release for the onboard NeoPixel fix?

slender iron
#

whenever

tulip sleet
#

not fatal but annoying

slender iron
#

maybe look at the other open issues for 3.x?

plush roost
#

Any plans to have circuitpython run on something with a reasonable amount of memory? I'm running out on a cpx just making a simple state machine with 6 states, haven't even put code in the states and it's choking

upbeat plover
#

feather M4 has "192 KB RAM"

manic glacierBOT
umbral dagger
#

@plush roost Check out the "M4" metro, Feather, and ItsyBitsy. As @upbeat plover says, they have 192K ram (512K flash). The upcoming "Grand Central" Metro (Arduino Mega form factor) will have 256K ram (and 1M flash).

#

@plush roost Getting a significant amount of CircuitPython code on an M0 board is challenging. I generally stay away from classes and stick to fairly simple scripts.

umbral dagger
granite crow
#

Thanks @tulip sleet , i will take a closer look into the CPX board.

manic glacierBOT
manic glacierBOT
meager fog
#

@tidal kiln well i got pn532 working 3 ways

#

nothing is really propertyish

#

so i think we can use it as-is

tidal kiln
#

3 ways = i2c/spi/uart?

meager fog
#

yah

#

uart is slow because we only have blocking reads right now

#

but i2c and spi are fast

#

ill do the linting tomorrow

#

time to pass out

#

๐Ÿ’ค

tidal kiln
#

coolio! ill take a looksie. laterzzzzzz

manic glacierBOT
meager fog
#

@prime flower want me to look at neopixel today?

prime flower
#

@meager fog sure!

meager fog
#

ok leme get the pn532 in shape

tidal kiln
#

careful. they're bright. don't look too close.

meager fog
#

lol

prime flower
meager fog
#

yah

#

ill start with that maybe

#

then move to something else if necessary

prime flower
#

I wonder if the wrapper is the OLD one, the one linked is latest

#

i've been poking at it, the pypi install seems to install a forked version of the linked lib.

#

๐Ÿคท I'm uninstalling this one and installing the jgarff one from source

meager fog
#

kk

plush roost
#

@umbral dagger Thanks for the tips!

meager fog
#

@tidal kiln do you by chance know what this erro is?

#

Warning, treated as error: autodoc: failed to import module 'adafruit_pn532'; the following exception was raised: No module named 'digitalio'

#

@raven canopy maybe you know too

#

i think its something simple im missing?

raven canopy
#

@meager fog look in the docs/conf.py. autodoc_modules should have digitalio in the list.

#

i'm opening the repo now...could've done that before i typed. ๐Ÿ˜†

meager fog
#

i dont see that at all

#

all good

#

i cookied this last ite

#

nite

#

oh oh i see it

meager fog
#

boom thanx

raven canopy
#

yeah..i meant autodoc_mock_imports...need more coffee. โ˜•

meager fog
#

lolll

#

thank u

tidal kiln
#

edito uncommento!

raven canopy
#

yw!

meager fog
#

ill test on pi now as well

raven canopy
#

i wish we could get Travis to flag that one the same way it does for ..todo:, but alas, this is the Travis config file. hmm...maybe we can Travis the Travis? ๐Ÿคฃ

meager fog
#

whew ok ill keep adding to that list

tidal kiln
meager fog
#

no, the side RSTPD_N

#

kinda weird design, was a very earily breakout

#

you may not need reset

tidal kiln
#

must not. didn't have it hooked up. working fine. ๐Ÿ˜ƒ

meager fog
#

yay

tidal kiln
#

i2c comms hiccup every now and then though

meager fog
#

yeah

tidal kiln
#
  File "<stdin>", line 1, in <module>
  File "pn532_simpletest.py", line 32, in <module>
  File "/lib/adafruit_pn532.py", line 353, in read_passive_target
  File "/lib/adafruit_pn532.py", line 349, in read_passive_target
  File "/lib/adafruit_pn532.py", line 310, in call_function
  File "/lib/adafruit_pn532.py", line 495, in _read_data
  File "/lib/adafruit_pn532.py", line 495, in _read_data
  File "adafruit_bus_device/i2c_device.py", line 86, in readinto
OSError: [Errno 5] Input/output error
>>>

meager fog
#

i need to work on the timeouts and delays

tidal kiln
#

i had this hooked to a pi the other day and was running i2cdetect

#

it would sometimes return no address, sometimes default+1, sometimes expected default

meager fog
#

yeah so there's a thing wher eyou have to 'wake up' the pn532

#

but the wakeup procedure isnt that clear

prime flower
#

hrmmmm, RGB>GRB on the source repo too.... ๐Ÿคท

tidal kiln
#

i'm using 2.2k pull ups, in case that matters...

meager fog
#

@tidal kiln on what board?

tidal kiln
#

metro m4 express

#

the pi would've been with the built in....1.8k i think?

raven canopy
#

that is based on a quick look...

prime flower
#

@raven canopy It does, but it doesn't behave like that on hardware

meager fog
#

brent, all neopixels are the same order

#

could be something in your code?

prime flower
#

Probably. I've tried their Color() method which converts RGB to a 24-bit color value independently of my code and the setPixelColorRGB() method

tidal kiln
#

@meager fog PN532 / wakeup - did you try attaching to P32 (H_REQ)?

meager fog
#

nope

#

didnt need to (yet?)

tidal kiln
#

yah, it's not well documented, piecing together stuff across ANs.....

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Additions

  • pulseio.FrequencyIn
    • SAMD21 and SAMD51 are working. Accuracy is within ยฑ 1kHz for me so far. Testing throughout has been with the use of a PWMOut program.
    • nRF and ESP8266 are currently stubbed out. Will start working nRF soon.

Changes

  • Moved shared_timer_handler() out of samd-peripherals and back into CircuitPython.
    • New location is .../atmel-samd/timer_handler.c.
    • Updated samd-peripherals submodule.
    • Updated all ...
tawny creek
#

Happy weekend all! I made a custom trinket m0 board and have successfully built the latest firmware for it. I want to use some pins as software UART, following the tutorial on the circuitpython welcome guide:

https://learn.adafruit.com/circuitpython-essentials/circuitpython-uart-serial#trinket-m0-create-uart-before-i2c-13-17 (replacing the RX and TX with board.A5 , board.A6 respectively -- used the Where's my UART? section to figure out which pin to use)

I've defined the pins like so:

    { MP_ROM_QSTR(MP_QSTR_A6),  MP_ROM_PTR(&pin_PA04) }, // PA04```

but I get a "ValueError: Pin A5 in use" - what does this mean?

The next step in learning CircuitPython.

meager fog
#

@tidal kiln ok ive got much better raspi performance

#

its sorta bubble-gum and tape but this chip is like that

#

spi kinda works the best overall

abstract panther
#

Hi everyone! This is my first post on the Adafruit discord server and I'm really excited about it. I'm a big fan of this company and community and I'm having a lot of fun playing with a lot of great tech. I'm new to coding and I'm having a small problem with a neopixel project I am working on. I'm using the code from the LED trampoline tutorial. I've removed the vibration sensor bits and I'm trying to add a couple more modes. Problem is, when I change the if mode > 2 line, to if mode > 3 and then add my new mode if statement, I can switch to the new mode, but I can't switch out of it. Could someone take a look and see what I am missing?
https://github.com/ShepTech40/Neopixels/blob/master/Neopixel demo with modes.py
In summary, when it goes into mode 3 on line 170, it stays there. Another button press doesn't take it to mode 4, which should reset it to 0 and turn off the lights. It stays in rainbow mode.

meager fog
#

yah when it calls rainbow cycle its going to 'sit' in that code for a while

#

because its doing that, it isnt listening to buttons!

#

you may want to listen for button presses inside rainbow cycle's loop

#

and 'return' if so

#

@prime flower ok i think you can pip3 install neopixel now

#

i tried it on a pi and it installed at least

prime flower
#

@meager fog installs but errors

#

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/brentrubell/.pyenv/versions/3.5.2/lib/python3.5/site-packages/neopixel.py", line 34, in <module> from neopixel_write import neopixel_write ImportError: No module named 'neopixel_write'

meager fog
#

where?

#

oh yeah

#

well thats normal

#

there isnt neopixel_write ๐Ÿ˜ƒ

#

we have to add that to blinka ๐Ÿ˜‰

prime flower
#

ok, cool. issue can be closed then.

meager fog
#

i gotta go eat, but can revisit it tonite

#

basically we make a new file, neopixel_write.py and make a single function in it

#

and stick it int....

prime flower
#

ok!

meager fog
#

put it there

#

if you want you can try

#

basically it will then call whatever underlying neopixel support library we want

prime flower
#

I'll try that

meager fog
#

actually sorry it would go here

raven canopy
#

@abstract panther to expand a little on what ladyada is saying, rainbow will block out any other code from executing until the for... loops are finished.

pixel_count = 17
def rainbow_cycle(wait):
    for j in range(255):
        for i in range(pixel_count):

so, the total number of iterations that will complete is 255 * 17 = 4335. which could take quite some time..

meager fog
#

and check the platform, to include the correct file

#

since we'll be adding other platforms

abstract panther
#

@meager fog I see. Thank you. I will investigate. @raven canopy That makes sense. So, because it takes so long and doesn't listen for button presses, I have to wait. I'm am confused as to why the sparkle_code responds to a button press. It doesn't seem to have any code that listens for a button an returns.

raven canopy
#

@abstract panther def sparkle_code doesn't have a blocking loop in it. it runs once. the changes are handled in two places. line 149 in the main loop (while True:), and the sparkle_code function. this is why it will intercept button state changes.

#

you could break out the switch checking code into another function definition. then, you could use it in both your main loop, as well as inside rainbow to break out. Psuedocode:


def rainbow_cycle(wait):
    for j in range(255):
        if button_state() == True: # or "pressed"...depends on the return val
             break
        for i in range(pixel_count):
abstract panther
#

@raven canopy - Very cool! I appreciate the help. Thanks for the lesson!

raven canopy
#

@abstract panther you're very welcome! and welcome to the Discord!

abstract panther
#

๐Ÿ˜ƒ

raven canopy
#

anyone lurking that is up to speed on nRF progress? wondering which SDK version we're working off of...

tulip sleet
#

we are not using the whole SDK, just the nrfx part

#

@tawny creek is PA05 assigned to something else as well?

raven canopy
#

k. so the SoftDevice is more than just the BT stuff?

tulip sleet
#

no, the SD is S140. We are using the nrfx repo, which is a subset of the SDK. I'm not sure what version that's up to. I'm not sure what is in the SDK that's not in nrfx. nrfx is kind of like ASF3 in functionality

tawny creek
#

@tulip sleet nope, it isn't assigned to anything ..

raven canopy
#

ok...that's what i was assuming. i looked at nrfx for a minute, and yeah it doesn't mention much about which SDK version it "matches".

tawny creek