#circuitpython-dev
1 messages Β· Page 139 of 1
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.
Yeah I just saw that too.
HT16K33::_pixel returns a bool if color is None.
ok
Otherwise nothing. I wonder why? (no docs of course)
@robust coral if color is None, you read the current color
Beautiful! Thank you
@robust coral if you specify the color, it sets it
oh! I see. It's a bidirectional accessor. π
@toxic knot and there are docs
at least I had them for my library: http://micropython-ht16k33.readthedocs.io/en/latest/matrix.html
ok, but I don't see docs. I mean there's https://github.com/adafruit/Adafruit_CircuitPython_HT16K33/blob/master/docs/matrix.rst but that doesn't describe the private _pixel accessor of the HT16K33 class, which has no docs.
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.
@stuck elbow Ok so we're good to go merging that one?
@slender iron shoot did we break the bundle somehow >.<
looks
sorry i mean simpleio https://travis-ci.org/adafruit/Adafruit_CircuitPython_SimpleIO
yayyy!
Ok all that's left in Pending PRs is BNO055 which still isn't working.
ok, thats on me
@robust coral if you think that a comment there would help, feel free to add it
Check it out though! It looks pretty good: https://github.com/adafruit/circuitpython/issues/475 π
@tulip sleet @slender iron does 2.x now use the ports/xxxx layout?
no
@solar whale no
that came with a micropython update
nevermind - did pull from master...ugh
hi guys
@lucid arch Hello!
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
@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.
try double clicking to get the bootloader going
then select that port, and try uploading Blink
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.
you can go back and forth - have fun!
@tulip sleet : so, the circuitpy drive is now ejected. I cant really get back to it, can i?
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.
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?
2.2 is properly released now? adafruit-circuitpython-circuitplayground_express-2.2.0.uf2
really cool .. π
yep!
zoom
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?
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.
so cpx is no longer a developer edition but 2.2 is geared towards all users out theere now?
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
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!
@tulip sleet OK - no problem - just curious -
@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
Yay! Good to know on all counts, thanks
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... π€
whew there's a bunch, what's your interest (in general)?
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...
the functionality what is missing in Circuitpython it's good to get so new
boards that is then awesome
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
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!
i have some rotary encoder code
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.
@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.
@tulip sleet my M4 build is ok.
All atmel-samd builds are going into safe mode on ctrl-D after this merge (tnx @jerryneedell). So some issue somewhere.
@solar whale hmm what is the commit showing on startup, and what do you see on ctrl-D?
@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
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
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.
I've pushed to two new repos and it'd be good to get eyes on the code. They are here: https://github.com/adafruit/Adafruit_CircuitPython_FeatherWing and https://github.com/adafruit/Adafruit_CircuitPython_Motor
I'll have a related PCA9685 PR in a few hours
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.
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...
nice. Sounds like fun!
@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
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```
i did that tho??
hmm
oh wait typodz
that'll do it
go-team-me-can-type
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.
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
@timber mango what does dir(adafruit_seesaw) show?
['__name__', '__path__']
>>>
seems like the import failed silently
There's a lot it does bring in, though:
do you have an adafruit_seesaw.py file or mpy?
>>> 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.
didn't you copy a seesaw file over onto the CIRCUITPY drive?
No an entire .zip contents renamed as asked in the tutorial.
under lib
those instructions are weird
Maybe the renaming was mssing a case change on the S in Seesaw
try import adafruit_seesaw.adafruit_seesaw as adafruti_seesaw
the first one is the folder and the second is the file
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
you can also try the mpy files from here: https://github.com/adafruit/Adafruit_CircuitPython_seesaw/releases
(thats really where the guide should point)
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'
what version of bus device did you download?
downloading the bundle and copying to the metro will make it easier than doing individual libraries
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
I was grabbing at straws so I'll roll it forward again (had reverted back to 2.1.0 as a blind attempt here)
yup, I think it was the weird folder structure that was confusing to start
Clearly your new import improved things. ;)
π
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.
yup exactly
the folder structure and filename impacts how you import things
glad you got it going!
This is great. The seesaw hardware is a nice bit of kit.
<@&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
CircuitPython in 2018 Wow, 2017 was an amazing year for CircuitPython. This time last year it was me (@tannewt) working alone on the core while @tdicola did the first guides and drivers. It didnβt ship on any Adafruit products and none had been designed for it. We had just decided to rebrand Adaf...
@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.
it stores the edit history so I won't lose it
Your call. I just don't trust everyone.
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']
>>>
@timber mango it might be called analog write
No kidding. Huh! Thanks.
its an arduino thing
That's not something I would have found until I thought I needed such a thing. It's right there, thank you. /egg
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
@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?
This is win7, and I have a bunch of stuff installed by the arduino boards manager
do you have a teensy that you want to use?
Arduino UI and CP need to "play nice"
I am not sure, did the Trinket (attiny85 type) use it?
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?
hm, unsure, checking
did you look at that forum post I pointed you to a bunch of hours ago, about how to clean up?
I believe SimpleIO can be closed after adafruit/Adafruit_CircuitPython_SimpleIO@6667bb6
hm, there are a number of instances of "Windows Driver Package - Adafruit Industries LLC (usbser) Ports" installs
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
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?
@pastel panther I added some bidirectional SPI support. The big change before that was SPI support at all.
ok
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)
@tulip sleet I'm compiling again for my m4 board to get back to debugging the dotstar issue I ran into
that needs to get fixed, but it's not fatal
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
@ruby lake this https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#cplayboot-trinketboot-featherboot-or-gemmaboot-drive-not-present in the Windows 7 section summarizes most of what I was saying re reinstalling the drivers
@pastel panther right it will work perfectly the first time
and you will make no typos
excellent
It tries to install "Feather M0 Express" and comes back "no driver found" after wiping old drivers and isntalling latest
@ruby lake what is now showing in the "Installed Progarms list"
I tore it all out again one moment
i am firing up my w7 test laptop
I now have ADafruit Boards CDC Driver 11/15/2007 5.1.2600.0
i am doing the same ,with the 2.1.0 driver bundle
again, no driver found
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
it is set up with CP 2.2.0
The CIRUITPY: disk appear fine
it is just the usb serial it cannot install
k, hold on while I set up one the same
where does the installed driver kit get stored so I can do a "browse for driver"
i get an "Installing Device Driver software" and it's searching Windows Update, so I'm skipping that
thats what mine does when it fails
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
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
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
can I change that in the device manager or my own inf
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)
making sure my huzzah still is found brb
yep. it works
as it spams wifitest.adafruit.com π
i made an an installer. will test locally first
@ruby lake works! Just logging into discord on w7 to get it to you
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?
@ruby lake uninstall other "usbser" and install this. Only check the first box. https://drive.google.com/open?id=1GHOVW9dAmjWF75ajRmneCAYfjAikC0PJ
@pastel panther I ... do not know. But TC4 might be defined elsewhere.
TC0,1,2,3 are defined in the same file, makes sense it would be there, right?
@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.
gotta run to get food, bbiab
@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)
Right
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
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.
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
separate init for ring and CPX
So there's 2 num_pixels as well
Each one is a separate sound meter.
oh, i see I though it was chained
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.
maybe just paste your code?
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.
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.
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.
@tulip sleet the serial port now shows up correctly named, but I cant open it
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...
I'm saying it works, even if it apparently shouldn't π
lol. can't really argue with that. π
π 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.
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()
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!
but it didn't expect it to.
Well fancy job, me, then. Figures, because it didn't occur to me that it wouldn't work.
so what's the current problem again? I'm losing track.
are the colors on the CPX itself OK
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.
oh, i see, because of the i + 5
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.
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.
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
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)
I did remember that. That's why you asked me whether it looked good or not when you first did it π
like if you make red 255, vs green 255, does the green look brighter?
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.
but you're not color deficient as far as you know?
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.
so I'd go for blue π
I'm a fan of blue.
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
hmm....pinned messages are not showing up for me. discord issues again, maybe?
ahhh. might need a reload.
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
@tulip sleet both the one in mu editor and putty, can try realterm
mu says "cannot connect to device on port COM30"
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
arduino IDE cant find the port even though it is listed
@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
RealTerm tells me "ie_BadId - Specified comport doesn't exist"
@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?
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
@ruby lake - maybe just unplug, reboot and try again
checking that CPX still works
@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
ah ok
@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
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?
will do
tnx
looks like other parts of the file are allready looking for TC5,6,7 so 4 must have been a off by 1 error
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.
sure, good idea
@ruby lake any luck? I'm fading and can check back tomw. I know how the USB ID slipped between the cracks
@tulip sleet I will continue tomorow as well
good night all
night Dan
@idle owl Remind me next time you see me that I have a question for you
heh, I'll try to remember
ta ta
great, now it cant open the com port for cpx either
something is assuredly broken in the driver kit
more fun later
@pastel panther smaller chips usually have fewer TCs. Its totally possible I missed some ifdefs
@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"
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
ah
@slender iron I think I may have actually cracked combining the two vagrants... building now to check functionality.
nice!
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.
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
Ok, I moved SimpleIO to the Completed PR list.
@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
Hi! I have a noob circuitpython question. We just got a circuit playground express, and it's mostly been working great; but we can't get any sound out of the sound sensor. We tried running this code example:
https://learn.adafruit.com/adafruit-circuit-playground-express/playground-sound-meter
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.
@dense widget Do you have CircuitPython 2.2.0 installed? The download link is on https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-quick-start
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...
@dense widget It appears in the REPL or you can check the boot_out.txt file.
I believe the version prints in the REPL...
The boot_out.txt file is on the CIRCUITPY drive in explorer (finder on Mac)
awesome! Thank you. (I'm working with yminsky)
Did you find the version number?
We did! It's 2.1.0. We'll upgrade and try again. Thanks everyone.
What is the main difference between circuit python and micropython?
Found it on https://github.com/adafruit/circuitpython
Are they differences really that minimal?
@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.
@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.
which basically means that all device drivers need to be separate
Wiring is not good enough?
whats wiring
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
i've wondered about using the uf2 bootloader for everything (at least everything M0 and up)
@meager fog Ok great thanks!
@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.
@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. π
@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.
@tulip sleet I have "Windows Driver Package" kits listed for Cypress PSoC, SILabs, STMicro and Adafruit
that's a lot, and not all of them might have made the best choices for drivers...
I will probably dump the Cypress stuff, I've not used it in years
so... I don't really understand what's going on here https://github.com/adafruit/Adafruit_CircuitPython_DS1307/blob/master/adafruit_ds1307.py#L87
I know what decorators are and did some stackoverflow-reading about them
but I don't see how that translates into anything
wait, I think I needed to click one more time https://docs.python.org/2/library/functions.html#property
@opal elk The decorators make the .datetime visible as something that looks like an attribute. e.g. print(ds1307.datetime) or ds1307.datetime = ...
ahhhhh got it
Ok good π
The first one makes it readable, the second makes it writable.
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.
Now to see how well I can do 4-channel voice assigning in CP
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.
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?
I'm using the .mpy version.
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.
I suppose .mpy is the smallest one ?
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.
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.
Ok then that's unlikely to be it. I don't think Linux drops hidden files anywhere.
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.
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 ?
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
Thanks anyway.
@idle owl heya do you remember how to leave safe mode?
@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.
mm thats not it, my m4 keeps being in safe mode for unknown reasons
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
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.
yah that's odd
yeah there's something weird, i think its reading the flash funny
Here was Danβs post from yesterday day. I donβt think it has been resolved yet.
See last note
Thanks @solar whale. I was scraping from Discord history.
The problem exists on all Atmel boards for 3.0, I think. I first saw it on a trinket M0
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!
@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)
nope for standalone avr programming. avr will never run circuitpython π¦ you really need arm cortex m0 or better
ah, cool....thanks
Oh hi
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)
n/m..got it. gitcmd plays nicer than gitbash. just not as pretty. π
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
@pastel panther awesome! I just ordered my pyoven pcb
@slender iron Sweet! Are you using an m4?
yup the 64 pin qfp
I'm hopin I got the support circuitry right
did you add the inductor? I left it off
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
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
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
any pointers for debugging my mass storage issues?
hows it not working?
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
you are on mac right?
yea
can you tell if its enumerating right? its buried under about this mac or something
I usually use a beagle to debug usb
hmm, I'll check that
any dmesg errors?
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
oh right
it does show up under the USB Device Tree/ USB 3.0 High Speed Bus
did you try unplugging and plugging it back in?
yea, several times
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
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
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```
if you have a debugger you should try breaking in one of the msc handlers
right, ok
what would be the best way to test the flash without MSC working? Is there a lib to access it directly?
did you hook it up as qspi?
otherwise you could do spi from circuitpython
did you try MSC with internal storage?
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
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!)
good ideas, thanks for the help
np, good luck
GJ on the wins
sure thing, ttyl. happy sleeps
night
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).
@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.
@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?
@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!
i agree
@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
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.
@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).
looks like I can only edit my posts
@solar whale Done!, Thanks
@opal elk that probably is a good thing π
well, "authors can only edit their posts", sure, but this is me we're talking about!
πΌ
@opal elk ah - you are referring to editing the guide, I thought you meant editing other peoples discord posts !
same principle, though
@opal elk I think you have to be added as a "contributor" to edit the guide. Edit is grey out for me as well.
(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)
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.
no idea, sadly
@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?
@solar whale I didnβt get an email...
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.
@solar whale @opal elk either of you have the vagrant toolchain setup for esp8266?
@raven canopy I do have it - have not used it in a long time though.
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.
no - it has always eorked for me - there are several warings in the esp8266 compile, bit no errors.
alrighty, thx. i'll keep plugging away at it. who doesn't love a good challenge!? πΆ
just fired mine up - I'll try it - are you building 2.x or 3.0
should be 2.x. Dan moved 2.2 to master right?
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
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....
just compiled 2.x on my vagrant --- did you do a make clean before make?
yeppurs
think (hope?) i found the issue. there is a .patch file that is commenting out the file (prob on make)...
@raven canopy just built master as well - worked ok - one other check - did you do git submodule update --init --recursive ?
yeah, i have that running in the Vagrantfile
well, i didn't add it. i first pulled the esp vagrant like 2 days ago...
is this in the esp_sdk - I was looking in CP
do you have PATCH = patch -b -N on line 21? yeah, in the esp-open-sdk
yes
ok. do you have any files like c_types-c99.patch?
Hey, I found a great project that could perfectly fit the hardware on CPX: http://www.instructables.com/id/TV-Commercial-Volume-Suppressor/
do you have c_types-c99_sdk_2.patch?
yes
It listen to audio, detect when sound level is loud and send IR volume down.
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
that's the one that is commenting out the unsigned ints.... at least on mine. and its line 218 for me...hmm.
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 $@
nope. thats on 223 for me.
I'm reinstalling sdk frm fresh pull
well, i wouldn't. π
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?
@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.
@idle owl thanks!
PC. and thank you...you don't need to go through this much trouble. π
No problem - these things need to work correctly!
argghh! temp rice bag heating pad just spilled on my desk. well, corrosion inhibitor project - complete! π
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...
Correct.
that explains a lot π
Yah π
They said they will get it so contributors can see feedback too, eventually, but no idea when.
that would be nice.
Agreed.
I used mu for the first "real" time today - on a linux box to play with some example code. It worked great!
Nice!
@raven canopy still building SDK -- getting close!
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.
Thanks. I'll try this.
@raven canopy I am just using the one in: https://github.com/adafruit/esp8266-micropython-vagrant
@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.
I created 2 different vagrant VMs
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...
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
humpf...well, thanks for confirming its a me-only problem. π hehe. might have to go the fresh install route.
good luck!
yeah, there goes the next couple hours. oh the rabbit holes i get to experience...
I'm now updating my VM - it was a bit out of date - see if it breaks anything
huh. i think i updated the wrong VM last night. this one still says 14.04.5, with 16.04.3 available...
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 -
yeah...do-release-upgrade got scary with the warnings. run away!!! π
try a clean install from Tony's guide then just clone the circuitpython repo -
i'm going to try cloning micropython to see...yeah, same thought. π
have fun - time to go outside - it has finally gotten above 10 F π
woohoo!! fun is always more funner when >0F.
@solar whale @fading solstice , Thanks for your help, I'll try this.
Hi, i'm trying to test i2c and my 1.2 7 segments LED HT16K33 with this code via REPL from CPX https://github.com/adafruit/Adafruit_CircuitPython_HT16K33/blob/master/examples/segments.py and it stops at >>> display = segments.Seg7x4(i2c, address=0x70) what I have to check, lock unlock address... or hint? thx!
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()
Yes @blazing trail I have tried too
hmmm
are you manually sending it through REPL or are you putting the code into main.py
Through REPL on Atom, maybe I should try with terminal only.
yes, try that. if it doesn't work, I'm trying it as well
what do you mean exactly by "stops"? Do you get an error?
yes, I think so
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)
same error
that looks like your ht16k33 is not connected
π
how did you connect it?
IO to CPX 3.3V, + to powerboost 500 with battery, - to GND to powerboost and CPX, D to SDA and C to SCA
using the breadboard? it worked the second time around, so maybe some wires are loose?
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.
you have to unlock after the scan
Ok, I will retry shortly. Thanks !
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.
I'm rabble-rousing in the LIS3DH library, btw
these emoji's are harrd to see - I thought that was a "monkey wrench" π
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
???
is there a library for it?
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);
}
oh, wait: you aren't using circuitpython? there's "circuit playground express" and "circuit python"
ah no ... I'm using CPX, the board .. not the language
this should be in #help-with-projects (but I'll try to see what could be wrong in the meantime!)
ah cool . ta
@slender iron Thanks, I'll check it out.
do we have a meeting tomorrow?
btw, I might just be misunderstanding how accelerometers work https://github.com/adafruit/Adafruit_CircuitPython_LIS3DH/issues/22
@sage apex for my M0 the defines ar #define RFM69_RST 11 // "A" #define RFM69_CS 10 // "B" #define RFM69_INT 6 // "D"
Yeah, and thats okay but you see The esp has a irq variable instead
sorry wrong channel - I 'll go back to #help-with-projects
@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
ok if anyone is interested in making standalone AVR programmers, https://github.com/adafruit/Adafruit_CircuitPython_AVRprog is done!
aaah, that way, now I understand!
nice, I could include some avrs as helper chips on my devices, and have them automatically programmed
sure! could also use an ESP as a remote-programmer
I will test it on an attiny24 soon
for attiny24 you'll need to make the chip-stats dict
just waiting for them to arrive
Oh wow that is wicked cool
like
attiny85 = {'name': "ATtiny85"}
attiny85['sig'] = [0x1E, 0x93, 0x0B]
attiny85['flash_size'] = 8192
attiny85['page_size'] = 64
attiny85['fuse_mask'] = (0xFF, 0xFF, 0x07, 0x3F)
sure, makes sense
if you do, commit an example please π i dont have all chips, i did what i have handy
what does the fuse mask do?
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
I see, ok
@meager fog I wonder if instead of having avrprog.end() you could use a context manager
I'm a great fan of working software
im gonna document it and take a break - it could also use a file read function
(e.g. save flash to disk)
you would need to enable writing to disk for that
yep - we have some miniguides on that
not too bad, just need an extra pin for a switch
I wonder if you could just detect if the disk is mounted, and switch depending on that
probably not, too soon in the initialization
yah you cannot, we found a switch is the easiest way to keep it save
CPX has a switch π
nice
ok dokumentation time!
goodnight, I will give it a try when the chips arrive
thank u!
no, thank you
@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!
@stuck elbow yes to the meeting
@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.
@tulip sleet Thank you, I was wondering about that.
This fixes the "ctrl-D" enters safe mode which happened after the 2.2->3.0 merge (#510). The canary word setting code was commented out.
Note also that I removed the load_serial_number() call that was part of the commented-out code, because it's called in serial_init(). @tannewt: if this is wrong, let me know.
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/
<@&356864093652516868> Normal meeting time tomorrow here on Discord. 11am Pacific / 2pm Eastern.
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:```
@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.
can I convert to mpy with https://github.com/adafruit/circuitpython-build-tools ?
you don't need that: there are mpy-cross compilers included in each release.
just pick the right one for your OS
https://github.com/adafruit/circuitpython/releases look toward the end of the list of Assets
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?
Is there a circuit python release for the m0 wifi board (https://www.adafruit.com/product/3010)
?
@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.
@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. π
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
can you post wht you have so far on gist.github.com?
@slender iron thanks! is wifi support planned or is there a workaround?
@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 - pos3), 0, int(pos3)]
else:
pos -= 170
return [0, int(pos3), 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
@brazen cedar its not a high priority for us because the esp8266 already supports it
all good @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
@slender iron oh ok I'm confused which product on the website has python and a 8266? I must be missing it
the feather huzzah (not huzzah 32)
Kinda embarrassed I figured it out shortly after building up the courage to go on here and ask
Happens to me all the time.
no problem @fast harness. glad its going!
@slender iron this? https://www.adafruit.com/product/2821
yup
it doesn't act like a usb drive though
vagrant+esp8266+axtls = driving me nuts. π refuses to compile.
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
what happens if you set the minimum higher than 0? (so it never goes off)
# 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.
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.
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 π
hmmm. that would mean it's using GRB vs RGB....
Is there code I can include in the beginning to change that?
and np. it was more @tawny creek. i just changed some bits.
hold on. i was just pulling it up.
Thanks to you too! @tawny creek
well, the docs say its RGB.
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
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)]
there ya go! i had questioned (internally) the < 85 part earlier; looked heavy on the green...
Haha yeah I completely overlooked that originally
It really helps talking on here... very glad I dove in
keep coming back. its awesome around here. helping each other is what we're about!
@tulip sleet Thanks, Thought PDF generation might be the culprit.
@raven canopy have you gotten the esp8266 to compile under vagrant? I just dit a complete clean install (totatlly new VM) following https://learn.adafruit.com/building-and-running-micropython-on-the-esp8266/build-firmware?view=all (cloned circuitpython and built it instead of micropython) and it all worked fine.
@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.
@idle owl cleaned up files and tagged you on github for the linted MetroX circuitpython stuffs
@solar whale @tulip sleet, no luck for me so far. I have followed both guides you mentioned. 3 fresh installs, and it won't budge. Here is a gist of the results I keep getting.
https://gist.github.com/sommersoft/1399fe70936f181f2519efedd044b61f#file-esp8266_wont_compile-txt
@raven canopy 2.x or master?
@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.
the one you posted, is it 2.x or master? I want to try to dupe and compare
Oh. That one is master.
cd to lib/axtls; what does git status print?
At work, so I'd have to run later. I did submodule pulls and updates though.
when you're back at home, if I'm around, we can compare the envs and see what's different
Ok. Thanks.
@fading solstice Thanks for reviewing!
np
@prime flower Great! I'll take a look at it
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?
If you don't want to do anything else during that time, that's perfect
yes, this is thankfully simple that way ; ) Thanks.
@slender iron What's needed to get our pylint configuration on my local machine?
@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
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
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!!
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)
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...
π
CircuitPython in 2018 Wow, 2017 was an amazing year for CircuitPython. This time last year it was me (@tannewt) working alone on the core while @tdicola did the first guides and @deshipu helped with drivers. It didnβt ship on any Adafruit products and none had been designed for it. We had just de...
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)
Determine your audience. If current devs are audience...yeah, what @errant grail said! π
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
So, isn't tomorrow the 1st birthday for CP?
π°
gotta run to a 12pm meeting, dropping out
GlaDOS said there will be cake π
The cake is a lie!
Thanks!
(Also, a bit disappointed that despite me getting home early, other things prevent me from actually hopping in to the meeting)
Thanks! Later.
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 ...
@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.
@slender iron for the record, I'd listen to the meeting as a podcast π
Glad you could make it this week!
yeyeh! I listen to The Amp Hour, Supplyframe's podcast, and EmbeddedFM a lot. I think it'd be fun to have a
one
@prime flower ok awesome! I do want to make it happen
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.
Is this channel also for micropython?
@wooden lichen you are welcome to post a question.
I dont have any questions yet! But good too know π
@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
@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.
This was basically a typo in #513 -- oops.
@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.
@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.
@raven canopy Same axtls commit for me
@tulip sleet non-SMB share build failed the same. might have to re-build esp-sdk?
@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
mine does not show the symbolic link...
now i have to dig deep into my long forgotten linux command list. π
just remove lib/axtls and redo the git submodule update --init --recursive out of that directory
okie dokie
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.
k
@raven canopy any luck?
nope. looks like a VirtualBox problem. they apparently disabled symlinks back in 4.3. trying to see if they've re-introduced it...
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. π
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.
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. π
I have been buying cheap Dell lease returns for the last computer or two: https://www.dealnews.com/search.html?search=dell+refurbished (35-50% off coupons very common)
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).
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...
ttyl; good luck!
@stuck elbow (when you awake) https://forums.adafruit.com/viewtopic.php?f=60&t=129144
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...
@tulip sleet teseted new master CP3.0 on trinket_m0 - no safe mode! Thanks!
thanks for testing!
RST is very picky about spacing.
<@&356864093652516868> Here is the recording from the weekly meeting: https://youtu.be/4QYz0BDKKTI Next week will be normal time. On Tuesday at the normal time.
Join here for the chat all week: http://adafru.it/discord The weekly happens normally at 2pm ET/11am PT on Mondays. Check the #circuitpython channel for noti...
Ooh cp3.0 π
Every time I see CP 3.0 in the chat, I think you should aim for a May 4 release date
not a bad idea π
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!
np @drowsy geyser
@slender iron have you started on IS31FL3731
@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
i ordered hardware for testing purposes, so i will review then
and test
i was also going to do an example
ok great! I'd love your opinion on it too
the experimental version is here: https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731/tree/experimental
excited for hints on the new m4 stuff π
@tulip sleet well...hrmmm. at this point, the linux box route seems easier. π
@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 π
thanks for the report @meager fog we'll iron out the bugs!
ah interesting, sounds like a race condition
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
I'm not surprised if its 3.0
we can also blame asf4 because thats fun
you can blame me. everyone at work does... hehe
its highly unlikely we won't be able to fix it
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....
thats awesome! what was the issue?
@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.
oh weird!
@raven canopy what was the problem with mpy-cross?
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
@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.
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.
It need to be run after a fresh clone or a branch change from 2.x to 3.x
teh sequence I use is ``` git clone https://github.com/adafruit/circuitpython.git
cd circuitpython
git submodule update --init --recursive
make -C mpy-cross
cd ports/esp8266
make clean
make
that is for 3.x for 2.x ```
git clone https://github.com/adafruit/circuitpython.git
cd circuitpython
git checkout 2.x
git submodule update --init --recursive
make -C mpy-cross
cd esp8266
make clean
make
@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.
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
@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)
@tulip sleet Thank you... I'm trying right now... It works perfectly....π
@raven canopy @tulip sleet FWIW I just tried following https://learn.adafruit.com/building-and-running-micropython-on-the-esp8266/build-firmware?view=all on a Window 10 system and I was able to install vagrant/build the open-sdk/ clone circuit python and build it for the esp8266.
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.
@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.
@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
Posted an issue here https://github.com/micropython/micropython/issues/3517, and also see this PR: https://github.com/micropython/micropython/pull/3494
Uses 168 bytes. Implemented via the override-builtins dict, hence the dependence on that flag.
This is turned on in nrf and esp8266 ports. Let's turn it on in atmel-samd for consistency.
First warning is fixed. Second warning awaits a gcc LTO fix beyond our control, so closing this.
Appears to be fixed. Closing. Reopen if still a problem. Thanks!
Close this for now, as the current fix seems to work pretty well. Reopen if it can be duplicated reliably in real-life situations.
dhalbert has been busy!
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.
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.
@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.
@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$
@opal elk you didn't take my PR bait
- Turn off MICROPY_CPYTHON_COMPAT, which includes a number of minor CPython compatibility features, most of which have workarounds, but uses up significant flash.
- Turn on MICROPY_PY_SYS_MAXSIZE, which implements sys.maxsize.
- 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.
@slender iron but it is what it should be
unless you meant in the examples
in which case... give me a minute π
nah, I meant the parens
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? π
not actively but they've been known to if someone is being super helpful
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 
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
sounds good π
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
you should fork it on github first
got it
and yeah, you'll get there eventually
π
if its super small you can do it in the github web editor
we use stash/bitbucket at work and I'm used to having branch-based permissions