#circuitpython-dev
1 messages ยท Page 182 of 1
do you have a scope?
It's not on, should it be on? Or the switch isn't in the "on" position anyway
it should be on
TP14/TP12 should read that now also
can you see C4 or C5 near the usb port?
yep
can you measure those against the ground?
actually, one end of those is ground, so you can just measure across them
Hey @hathach looks like the docs fail to build, make sure to exclude the tinyusb directory from the doc build like I did here: https://github.com/adafruit/circuitpython/commit/0686857e3c28b69c49a0cbdadc683394754b5f86
200mV
interesting
yes, try with usb connected
I got 3.3v I think
On both
only momentarily but it was there.
Ok moved everything around and am able to keep 3.3 V showing up.
where does CP2104_P3V3 tie into P3V3?
it doesn't
it's from the regulator on the usb to serial
that means the usb to serial works, so the usb device should appear
oh yeah, it's an out on the CP2104
maybe you need the drivers?
Do I need drivers or something?
yes
The CP210x USB to UART Bridge Virtual COM Port (VCP) drivers are required for device operation as a Virtual COM Port to facilitate host communication with CP210x products. These devices can also interface to a host using the direct access driver.
Ok installed, now what
@slender iron wow - i'm around (re: EIC). Also - if you live on the Eastside i could buy you gifts of cake and coffee....
with screen or whatever you use for that
It's not showing up. It's supposed to show up like any of the CP microcontroller boards?
in /dev/ I mean
charge only USB cable?
I have no idea
open a terminal and type it?
command not found
:(
@idle owl one more thing, can you measure the voltage on the 2nd pin of the ESP32 module?
counting from top left
In my system report: ```CP2104 USB to UART Bridge Controller:
Product ID: 0xea60
Vendor ID: 0x10c4 (Silicon Laboratories, Inc.)
Version: 1.00
Serial Number: 0177E8AF
Speed: Up to 12 Mb/sec
Manufacturer: Silicon Labs
Location ID: 0x14442100 / 17
Current Available (mA): 500
Current Required (mA): 100
Extra Operating Current (mA): 0```
So the OS sees it.
ok, os you probably have a new device in /dev with some silly name
dmesg
This shows up when I unplug it and plug it in: Starting poll type 4 Restarting poll type 4 Command 0x2 completed. inCount: 2 data:0x5Command 0x1 completed. inCount: 2 data:0x1001Command 0x16 completed. inCount: 2 data:0x40e0Command 0xa completed. inCount: 2 data:0x0Command 0xb completed. inCount: 2 data:0x0Command 0x12 completed. inCount: 2 data:0xffffCommand 0x13 completed. inCount: 2 data:0xffffCommand 0xf completed. inCount: 2 data:0x1135Command 0x10 completed. inCount: 2 data:0x1135SmartBattery: finished polling type 4
smart battery, eh
I just got an Atmel SamD21 xplained. I am too excited. is it possible to load circuitpython?
yes
@stuck elbow thank you. is there a tool (like on esp i used esptool.py...then on feather something else...?)
yes, it's called bossa
oh right...thank you bossa. yah. That's what i used for feather.
I think we have a howto for using it somewhere
i've used bossa before. thank you very much
i couldn't remember...boosaah bookah...hmmm...
you might need to make a new board definition to get access to all the pins you need
@stuck elbow thank you. i'm not sure how to do this so i'll start splashing around in the shallow end of this pool...then probably get stuck...then...get frustrated...then look at flowers...then all seems ok again.
but just for testing the arduino zero firmware would probably work
@stuck elbow Second pin is 0. With or without USB plugged in, with the power switch on.
Measure it with ground right?
Oh.
try C7 and C8
@bronze geyser I'm back from lunch and can hop into voice chat
C7 is 0.9V. C8 is same.
@slender iron sure <gulp> um... i haven't done this fancy voice chat yet. please bear with my technical difficulties...
@bronze geyser @slender iron Mind if I listen in?
@idle owl ooh - how cool is THAT?
should be 3.3V :(
my typing is sloooooow
I was able to get 0.9 consistently, so I think I was able to get the probes in the right place.
@idle owl considering you got 3.3V for the same bus somewhere else, I would look for scratches and broken traces
It all looks pristine ๐
I'll look closer
@bronze geyser @slender iron Reload Discord. I can hear you both.
@bronze geyser There's a little phone looking icon next to "Voice Connected" below the chat, you click that to disconnect.
@idle owl on a mac the devices wil be /dev/tty.usbmodemxxxxx
@idle owl as always - many thanks. These new fangled phones...i keep looking for a rotary...but alas...
@idle owl oh - puuulllleeeeaaaeeee it's clear...um....wait....i can't see anything.....umm..
there are iphone accessories with a rotary dial and old-school handset
See? I knew it
the hanset is actually nice
and yet, all these smart people can't figure out how to get folks off the streets and into a home...
what if these amazing folks harnessed their awesome powers...not for rotary phones...oh, maybe rotary phones...but dialing got them a place to live...
oh wait. Sorry...wrong forum for my rant.
Hey - wait just a second. Instead of making Rosy dah riveteeerr w/ 3D community parts...we'll build housing like a lego kit. Yah...we'll 3d print the ovens out of steel filament...
oohh...then, we'll 3d print all the food.
the 3d printers will run off solar or of course we all will generate electricity on exercise bicycles...
can you 3d-print tinfoil?
for a hat? Why not!
what can't we 3d print? I mean...let's just say it...HOW HARD CAN IT BE?
as hard as you make it
we can start simple....like 3d printing algae that will soak up all this here CO2. Then we'll take the CO2 and release it near plants. I find CO2 enhances plant growth by oh - 25%
you know what is the best at 3d-printing algae?
other algae
they 3d-print them out of COโ too
oh now THAT is cool. Other than "google is my friend" any reading or such you'd recommend?
on how algae produce more of themselves?
yah - that is probably a dumb question...probably something "I should have learned in 5th grade..." but other than the fact algae soaks up CO2 like a towel soaks up my spilt milk, i don't know much.
yah - after asking the question. I thought so. I apologize.
@idle owl @stuck elbow maybe remove power and switch to continuity test? between ESP-32 pin 2 and TP12/14?
@tidal kiln were you the one using the ADS1x5 with Blinka?
@prime flower don't think so. i just did some updates to the CP library for the ADS1x15. but didn't do any blinka checkout.
ah, @slender iron you around?
Using cached https://files.pythonhosted.org/packages/b7/a4/afc8a046d836dcbf0e53e6d062d576a6fd30ef20e19e0bc3eccf5ef16ae2/adafruit-circuitpython-ads1x15-0.4.0.tar.gz
Collecting Adafruit-Blinka (from adafruit-circuitpython-ads1x15)
Could not find a version that satisfies the requirement Adafruit-Blinka (from adafruit-circuitpython-ads1x15) (from versions: )
No matching distribution found for Adafruit-Blinka (from adafruit-circuitpython-ads1x15)```
(using https://pypi.org/project/adafruit-circuitpython-ads1x15/ on RasPi3 w/blinka installed)
@prime flower @slender iron i did do a release yesterday:
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/releases/tag/0.4.0
if that's somehow related?
nope. tried pip install adafruit-circuitpython-ads1x15==0.3.1 to use the older one w/same errors
dunno then. let me know if i broke something though.
will do
@prime flower I just installed it on my RPi - no problem version 0.4.0
@solar whale really? Weird...with just a standard pip install? 0_o
which version of blinka are you running?
pip3 install adafruit-circuitpython-ads1x15
ah -- needs pip3
pip will default to python2
adafruit-blinka 0.1.9
ah, alright. that's annoying (as I just tore down my pi setup to bring home)
oh btw @solar whale
@indigo wedge basic Bluetooth q: are any API's for BLE going to be similar to regular Bluetooth? Should we have blueio (instead of bleio) because there are some things that can be shared? nrf board says it does regular Bluetooth, but does it make sense to support Bluetooth 5?
new release of the io client incl. lots of new features and blinka compatibility examples to start out!
yup - just installed adafruit-io - have not tred it yet
make sure you're using version 2, I havent fully got pypi to update
working on that tomorrow
pypi takes about 5 mins to update, in my limited experience
I am concerned that it says it need python3.6 -- I only have 3.5 installed
you don't NEED 3.6, but blinka has the same dependency
until i get it goin fullspeed tomorrow, try pip install adafruit-io==2.0.0
pip3!!
nope -- that fails - I can clone it and use setup.py -- if I get to using it tonight -- unlikely -- I'll check pypi tomorrow.
yeah, def use setup.py for now...thought I had it
@tulip sleet is that CIRCUITPY sometimes-read-only-through-GUI behavior any better in 18.04?
it'll be fixed tomorrow
@tidal kiln no diff in Ubuntu I've seen. That means it might be damaged. You can try dosfsck /dev/sdxx and see whether it's just the dirty bit or something worse
@tulip sleet dirty bit was set, but no change clearing it. also, it always works through CLI, just the GUI gets buggy sometimes
was hoping maybe 18.04 going to new UI might have helped with that
nRF52840DK arrived today. now i get be lost on another topic. yay! ๐
Happy birthday, @slender iron! ๐
@raven canopy my adabox arrived today. just in time for summer vacation - and my kids are interested!
@ruby atlas ๐ i wish i could get my kid interested...
@tidal kiln I just ran into that issue with my Feather M0 Express and what fixed it was:
import storage
storage.erase_filesystem()
@raven canopy how old is your kid?
@slender iron yes, that is where I got the idea for updating a vagrant builder. "Vagrant is software that is designed to make it easy to set up and use pre-configured virtual machines. There are potential stumbling blocks. This guide will include Vagrant information in the future." I figured working on the builder would be a good change to get familiar with circuitpython internals while doing something that might potentially be useful.
@ruby atlas 13. and a (waning) comic book, video game nerd... ๐คท
My 7 and 10yo girls are video game nerds, and the 10yo loves books of all kinds, incl graphic novels. i bet she'll jump on comics real soon. the 7yo is just starting reading strongly enough to see.
Oh, and about to see how they re with regards to board and card came nerdiness ๐
Other than pokemon.... which they're already nerdy about.
@slender iron Happy Birthday from me and Sasquatch: https://youtu.be/YXjSvTdxYj0
๐
@ruby atlas yeah, we went through a brief (but un-proportionally expensive) pokemon phase.
@slender iron HBD! ๐
oh my, they're fighting like sisters.
that is to say, loudly, and high pitched.
ooh slammed door.
Ooh
the one that slammed the door then did a lalalalalalala type noise.
so funny.
(must not visibly laugh)
and working during AAE... and windows strikes again... sh not available, so i get to figure out how i want to setup this workflow for adabot and patching. ๐ค
@river quest there is a difference between circuitpython and micropython?
๐ https://forums.adafruit.com/viewtopic.php?f=60&t=138071#p683297 from @torpid goblet
@slender iron question for adabot_patch (still can't decide how to refer to it). would a (1)adabot/patches directory, (2) submodule, or (3) just local-to-user be preferable for containing patch files? having still not run adabot (and, well...windows), my original idea of (1) is going to get kludgey I think. submodule is easier to update on it's own, without pulling in the whole repo. i can't think of pros/cons for local-to-user, really, since I'm not sure if there is a desire to "fire and forget" and have adabot run it standalone (like the bundle update).
- seems better since it documents it
so you'd like to have the commit history on adabot, vs submodule? k. i'll try to at least give a good starting point. smarter people can un-kludge. ๐
ya
@idle owl thank you ๐
Is the HUZZAH32 (feather) a good target for Circuit Python 3.0.0?
@abstract pawn unfortunately, no. ESP8266 is only supported at this time. There is micropython support for the ESP32, but it may still be in development (i think it is at least running though).
anyone using crypto on M4 feather?
That's OK. I have a HUZZAH classic. I can upgrade to bluetooth later.
@pastel patio i haven't heard of anyone doing it, but that doesn't mean it hasn't been done. i'm not even sure if we have any "built-in" support for crypto. I scroll past the AES peripheral in the datasheet; that is one realm i don't have the math for... ๐
supposedly crypto is built in to M$, but no one seems to know anything about how to access it
M4 that is
yeah its there. it has both an AES & Public Key peripheral. I skimmed the AES once; looks like a fair amount of work to implement.
chapters 42 & 43 in the sheet, if you want to take a peek (and crack at it?).
yep. here it is straight from microchip: http://ww1.microchip.com/downloads/en/DeviceDoc/SAM-D5xE5x-Family-Datasheet-01507B.pdf
still in a stand-alone environment, but ๐
repo dir: /home/vagrant/source/Adafruit_CircuitPython_ADS1x15
patch dir: /home/vagrant/source/adabot_patch_test/patches/0001-updated-CoC.patch
Already Applied
repo dir: /home/vagrant/source/Adafruit_CircuitPython_AM2320
patch dir: /home/vagrant/source/adabot_patch_test/patches/0001-updated-CoC.patch
Applying Patch...
yeah. my curiosity ran away quickly... ๐
the other project I heading towards is an M4 hand held game console. I ordered a M4 feather today, joystick, 5-way switch etc.. I have both an Arduboy and MakeBuino but I was looking for more RAM, better display and python.
I knojw that this is on the horizon but no telling... it be a year from now till it sees daylight. https://blog.adafruit.com/2018/05/25/we-are-making-a-circuitpython-based-gaming-platform-adafruit/
hehe. i was about to mention that. if you're wanting to help out with CircuitPython dev on it, here is the current issue list for it: https://github.com/adafruit/circuitpython/issues?q=is%3Aopen+is%3Aissue+milestone%3A"Handheld+Gaming"
I could probably breadboard it pretty easily. Just need to pick up the TFT.
Is there a dev group for it?
how do you mean?
I guess I need to find the current API in the github and see where they're at with it. Most of the draw functionality is already in circuit python. For game dev, functions like collision detection, basic physics, easing are very helpful.
yeah. it's still early days. they're (i haven't gotten involved yet) still discussing higher design stuff (API, namely) and getting sound updated. tannewt (project lead) would probably be the best to talk about any and all of that. we have a weekly meeting on Mondays @ 2PM Eastern, if you'd like to join.
forgot to mention. the meeting is here on Discord in the voice channel.
I doubt I'll be able to attend the meetings as I work during the day (systems engineer). I could devote time in the evening. Before i made the switch I.T. , I did surface mount microprocessor repair for 10 years in the process automation field. I've written several games over the years. Actually my first computer was a Kim-1, so I started witting code in machine language.
totally understand. i'm lucky that i can usually carve out the time at the day job to attend. we're around here most of the time, so the meeting isn't necessarily crucial.
and..time for me to get off. have a good one! ๐ค
I'm not sure what APIs you have already, but having basic physics, movement, basic collision detection and easing functions would go a long way to adoption. I used a lot of game engines and honestly those functions are not hard to write from scratch, at least the basics. I'm not talking about box2d physics, pixel perfect collision or anything that would over tax the MCU, just the basics.
I've personally found this site helpful (note, the code is processing not python but is easy to underst...
When following the digitalio example on https://circuitpython.readthedocs.io/en/latest/shared-bindings/digitalio/__init__.html I get the following error:
from board import *
import digitaliopin = digitalio(D14)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'D14' is not defined
I get the same error for any value of Dnn
Environment:
Clean install of CircuitPython 3.0.0 w. 3.0.0-beta Bundle
Target: Huzzah
Install Met...
@tulip sleet nRF only supports BLE, it doesn't support Bluetooth Classic. I don't have as a much experience with BT but from what I understand they are very different, BLE has Services with Characteristics and Descriptors and BT has Profiles which are more like network sockets. I think if we ever had a port with BT we would have a new module for that.
omigosh @slender iron happy bday ๐ฐ
its this weekend ๐
ah, that's a bit away still
but anyway ๐
I have to say I was a bit surprised that a setter method for a property does not return the new value because I'm used to C assignments returning the left operand value but TIL that in Python assignments are not expressions ๐ https://github.com/adafruit/circuitpython/blob/master/shared-bindings/digitalio/DigitalInOut.c#L202
is there a way to have while True run as fast as it can, but have a secondary thing run on a time.sleep()?
like...
while True:
do thing
also:
do other thing
time.sleep(1)
?
also is there a way to see the polling rate of the feather USB HID function, or otherwise overclock the polling rate?
i ask because afaik the default polling rate of an usb device is like 100-150hz, but i have a lot of peripherals that can increase that to 1000hz to reduce latency and i am interested in also doing this ๐
the trick is to use time.monotonic()
basically you run the while loop as fast as you can, but inside it check the current time, and every so often execute your additional code
to do that you save in a variable the time when you last ran your code, and then compare it with the current time
ah ok! so time.monotonic() will return the current time?
it will return the number of seconds since power on
or something like that
but you are only interested in difference, so it doesn't matter from what moment it is counting
the typical code looks something like this:
import time
last_check = time.monotonic()
while True:
# do something here
current_time = time.monotonic()
if current_time - last_check > 0.5:
last_check = current_time
# do something else
cool, thanks ๐
of course you can have several of those in a single loop, with different intervals
there is also a nicer way to do this with async and await, but that's a bit more advanced
@pastel patio maybe this will be of interest to you: https://hackaday.io/project/27629
@arturo182 thanks, finally the travis build is passed now :)
Ok then, I think we can merge this and make a new PR fixing rest of my comments :)
are there any tutorials for using this with circuitpython?
https://learn.adafruit.com/tlc5947-tlc59711-pwm-led-driver-breakout/overview
loool why am i like this
theres a circuitpython page in those docs ๐
i guess i got to the arduino setup and panicked ๐
The ESP8266 uses pin names GPIOxx rather than Dxx.
Try GPIO14
Also, if you're ever curious about any module's available functions/objects, you use dir(<module>) to get a list.
For example, all of the pin names can be seen with dir(board).
@raven canopy If you're looking for bash/sh on windows, there's Cygwin (http://www.cygwin.com/) and MS Windows Subsystem for Linux (https://docs.microsoft.com/en-us/windows/wsl/about/).
@wraith tiger I thought about going the WSL route, but it's easier to just use the vagrant VM for me. If only WSL could get folder sharing to work. ๐ค
and posix filesystem semantics...
@wraith tiger and to further clarify, it was an issue with the sh CPython module not being available on Windows, not necessarily being able to run bash/sh
Another option for bash on windows is git bash, which (naturally) includes a git client.
I'm personally fond of the VM route, as you can share the whole VM with other people (even people running other operating systems).
Sort of like venv on steroids.
Hello, I encountered some issues when installing CircuitPython on a Raspberry Pi to control an RFM9x. I followed the instructions on this page (https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi) and ran the example code in this repository (https://github.com/adafruit/Adafruit_CircuitPython_RFM9x/blob/master/examples/rfm9x_simpletest.py). However, it produced an error complaining that device.write() got an unexpected keyword argument end.
I think for some reasons these files (https://github.com/adafruit/circuitpython/tree/2.x/shared-bindings/busio) are not installed and instead a different busio.py that comes with pip install adafruit-blinka is used.
Any suggestion is appreciated, and please let me know if this is not the right place to ask this ๐
@cyan fox I don't think the rfm9x driver is compatible with adafruit-blinka - yet. At least, it was not last week. I was able to get it working with some changes to the SPI usage, but it was just a test. The blinka - spi interface is still under development.
@cyan fox see https://github.com/adafruit/Adafruit_Blinka/issues/17 for the details
Thanks, this is exactly the problem I have. I will try to remove the keywork end and see if it works.
@cyan fox you'll have to rewrite some of the calls to send the correct length messages.
ok, thanks for the reminder.
@slender iron Could you take a look at this diff of gc.c between current CPy and recent MicroPython? Is is compatible with your GC changes? I am interested in the first set of the changes, not the MICROPY_ENABLE_PYSTACK part, which is part of this PR (which might be interesting to you): https://github.com/micropython/micropython/pull/3448 and is disabled by default
@solar whale I relaxed the python req. on iopython to 3.4, thanks for the feedback ๐
i am trying to load a firmware.elf onto an XPlained Samd board. I was thinking the arduino zero build might work on the Xplained. So I make BOARD=arduino_zero DEBUG=1 ...sadly, I get region `FLASH' overflowed by 1060 bytes .... i'm looking for advice on how to best approach getting a debug version of circuitpython on the Xplained. Thank you.
@bronze geyser not at home so I can't verify, but I think I've commented out this line on trinket builds to get around that error:https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/Makefile#L109
@raven canopy thank you.
@raven canopy didn't work. Tried commenting out the added CFLAG w/ debugging...still get the FLASH overflow. Thanks though.
So if I have a chip on a board, and I'm supposed to check pin 4, how do I know which pin is pin 4?
There's no markings on it, so there's no obvious top, but I at least think I know the orientation.
Oh the schematic has the pins numbered, nevermind. Still not certain about the orientation though.
Wait, no it doesn't....
I mean there are numbers on it on the schematic, but the chip is symmetrical, and the schematic of it does not reflect that at all.
@idle owl what chip? pins are usually number counter-clockwise from the pin 1 -- Pin 1 is usually marked - various ways
Note 7 on the chip docs reads "PIN 1 IS LOWER LEFT PIN WHEN READING TOP MARK FROM LEFT TO RIGHT"
Here's the diagram: with the chip markings right side up, pin 1 is the lower left pin.
I would expect pin 1 to be at the white dot.
The white dot on the PCB also denotes pin 1.
so pin4 should be at teh U4
For the chip itself, you have to look at the "TAEBH" marking. The dimples, notches, and cut corners we're used to on larger chips just won't fit on these little ones.
what are you checking?
The pin and cap I was instructed to check by the Odroid engineer.
looks like 4 and 6 are tied together and connected to GND
I don't know.
I think pin 6 is the wiper, that's an odd one to ground.
"Also check Pin 4 on U4 to confirm whether the power switch works correctly or not."
hmmm "check"
So I posted what I got and asked for verification of whether I was supposed to test it to ground.
Neither do I.
and you were getting 3.3v yesterday, so seems like the voltage reg is working
The other thing they had me check is getting 4+
They had me check C12
I told them everything we checked yesterday.
@indigo wedge Thanks re Bluetooth info. The reason I asked is that the nRF marketing materials advertise it as "Bluetooth 5". Wikipedia says Bluetooth Low Energy is not backward-compatible with the previous (often called "classic") Bluetooth Basic Rate/Enhanced Data Rate (BR/EDR) protocol. The Bluetooth 4.0 specification permits devices to implement either or both of the LE and BR/EDR systems. . ... (Googles stuff...) DIgging further, I see that the '840 is only LE, not BR/EDR: https://devzone.nordicsemi.com/f/nordic-q-a/10032/dual-mode-soc
so..... i'm working on a driver for these 1.2" segmented displays:
two colons and what i'm guessing is an AM/PM indicator
yeah
thoughts on the following for controlling those?
disp.ampm = True
disp.colon[0] = True
disp.colon[1] = True
looks good
@tidal kiln that's a decimal point and you have it up-side-down
@stuck elbow orientation checks out, i've printed stuff to segments
weird
The text on the PCB is correctly orientation
@cunning crypt that only means you are not the first person that got it wrong
I'd say it's AM/PM indication, since there is only the one
it's a strange place for it
True
it's probably a part of a larger display
that's why only one decimal point
is the initial colon actually a colon, or two separate dots?
actually, all 5 of them are separate, and are labeled DP1 etc.
but the i2c backpack ties the two in the middle together - so they act as a colon
and i'm thinking of just treating the other two the same way - as a colon
ok, so I would say that's a decimal point, and the "colon" is the am/pm indicator
If I want to run a stepper motor off of the Stepper FeatherWing, what's the best suggested power supply? It says 5-12VDC but that isn't very specific.
@idle owl for steppers the higher voltage the better
Thank you
So something like this? https://www.adafruit.com/product/352
that works
Keen, thanks
with higher voltage you have steeper edge of the signal, and thus you can have more steps per second
the driver makes sure the current doesn't exceed the parameters anyways
Excellent
@idle owl are you using a specific stepper?
The one Adafruit sells.
there are a few
PID324?
Yes.
all good then. there is this lower voltage one:
https://www.adafruit.com/product/858
that might not like 12V
Indeed, I noticed that.
But I assume it'll be the bigger one.
I have a 5V10A supply already though.
So if I go with that one, swap it out.
yep, in general, should be able to find a rating for any given stepper
how do i add a new instance variable to a derived class?
Well.
this works, but seems kludgey
class Foo2(Foo1):
def __init__(self, maybe, some, stuff):
super().__init__(maybe, some, stuff)
self.just_for_foo2 = 42
@slender iron I'm realising I'm not sure how to libraryify an already existing repo that doesn't have the expected file structure. Do I create a new repo and do it all there and then add the files? Or just grab the right files from another lib and copy them into the current one and modify them?.. I think I did it from scratch once, the rest of the times the files I was given already included all of the cookiecutter stuff.
@tidal kiln that's the official way
if it's a class attribute, you can also override it in the class
also, use *args and **kwargs to be independent of the args
@slender iron Also, should I update the CoC in the cookiecutter repo?
@stuck elbow thanks! if you got a link to some good info, please share. i tried googling but only found a lot of class vs. instance discussions.
Re: the library repo, there's already a commit history and so on, so I probably don't want to create a new repo, we'd lose that.
@idle owl I merge in by hand
Ok. Thanks
and yes please
@stuck elbow also, adding a new class attribute seems easy - no need to override __init__ - correct?
@tulip sleet can you post the merge somewhere?
Thanks for dir(). I've been trying to track down python's "list internals of xyz" function for a couple weeks.
Since this is probably a documentation issue not a source issue, should I close it?
@slender iron I just pushed again to https://github.com/dhalbert/circuitpython/tree/micropython-25ae98f-merge. Not quite compiling yet, but close.
Well, we could maybe still use the issue to improve the documentation on the ESP's different pin naming. In your experience so far, do you have a recommendation for a location(s) to document. Understand that some are easier to accomplish than others, but we should still strive to make it work.
@idle owl you can update the CoC on the lib you're working. The adabot patch will (should) recognize that it doesn't need to update it.
Ok. I haven't added it yet so easy there.
Oh, I just realised there's a CoC in two locations in that repo.
Right now the base Feather HUZZAH Learn Guide mentions nothing about CircuitPython: https://learn.adafruit.com/adafruit-feather-huzzah-esp8266. There are a bunch of other guides that do, but maybe some elementary info there would be helpful, or at least they could be pointed to. @kattni @ladyada
@tidal kiln correct
The following class creation code works in 2.3.1 but breaks in 3.0.0:
class AttrDict(dict):
def init(self, *args, **kwargs):
super(AttrDict, self).init(*args, **kwargs)
self.dict = self
I loaded 2.3.1 to verify that it works on that version. 3.0.0 claims 'super' is not defined but I will get the exact 3.0.0 error message shortly.
@idle owl one is for the repo and the other is for the generated
@slender iron I assume they both needed to be updated then?
yup
ok keen. made another PR.
(@larryfast put code blocks inside triple backticks to format nicely. I edited the OP.)
As a reasonably green Python programmer I think I represent a lot of your audience. It would be VERY helpful to have a reference to dir() somewhere. Eg. a generic page about diagnosing python errors and especially some help on learning to interpret the C sources.
As for this particular issue, I think the digitalio page should say something about this board-to-board difference.
Thanks, Larry Fast
(@dhalbert can also add language specifier for syntax highlighting. I edited the edited OP.) :smiley:
@bitter hedge super().__init__()
still throws the error unfortunately
are you using built in framebuf?
I was using this framebuf https://github.com/adafruit/micropython-adafruit-framebuf/blob/master/framebuf.py
hrm seems like it should work
This looks like a coincidence with #1017
Woo
61!
๐
Thanks for cleaning up my post. I updated it with the actual 3.0.0 error message.
@superkahuna I started with https://github.com/python-ugame/circuitpython-stage in my testing. I ported Celeste from PICO-8. My plan is to add C apis where we need the performance.
@tulip sleet gc merge looks ok to me
thanks - I'll proceed. Most annoying thing in the merge is that #ifdef SOMETHING was replaced with #if SOMETHING in a lot of places, even if SOMETHING was not defined. Our strict warning checking complains about that (rightly so). I had to explicitly define a bunch of things as (0) and change other places to #if defined(SOMETHING) && SOMETHING
ya sounds annoying but good in the long run
I just tested the bootloader on my custom nrf52840 board and it works very nice ๐
finally MSC
Nice!
BTW, here's a resource we can refer to people new to git (it's a short free class on git): https://www.codecademy.com/learn/learn-git
@tulip sleet I think that can be fixed by doing #if (SOMETHING == 1) because the compiler will warn if SOMETHING is not defined
I should have been clearer: there are cases where SOMETHING is defined (that I added, mostly in mpconfig.h), and cases where it is inconvenient to do so (it's buried in some cpp logic elsewhere). So I need to cover the case where it's not defined and treat it as 0 (false). So I have to check for being defined and then also the right value.
no prob: there were really two kinds of definitions happening: I didn't make that clear. I can understand why Damien changed it to #if, with the warning-errors turned off that works fine when it's not defined, but not otherwise
I would like to respectfully request support for the SAMD21J18 chipset if possible.
If such task becomes to much demand to your group/organization, Would it be possible to indicate where to begin and what files will require modification to get me started?
My real absolute goal would be to be able to use JTAG to program this chipset with CircuitPython!..... in which I will not pursue if by any means breaches your open source policy.
Thank you kindly!
EZ
@indigo wedge before I do something silly, can you clarify what I need to do in order to use the MSC Uf2 bootloader on the pca10056. Do I first do the make SD=s140 BOARD=feather52840 bootloader for both the serial bootloader and the MSC UF2 ? Then can I use either the serial bootlader or the MSC UF2 bootlader. Do both still use the same USB port? Clearly - I'm a bit confused....
I'm not sure what you mean by the serial bootloader, the pca10056 has a jlink chip that allows flashing boards using nrfjutil, it's not a bootloader. To flash the bootloader you do make ... bootloader and then you need to do make ... flash that will flash the firmware and set a bit in flash that will tell the bootloader to bypass the checksum check. Once you have the uf2 bootloader you have to use the other usb port on the board, the one next to the reset button (nRF USB).
I think after you flash the firmware once using make, the bit will stay set in flash and you can flash new firmwares using uf2 files
also you might want to use BOARD=pca10056
ah - ok - that was what I was missing. So after flashing the bootloader via the jlink usb port -- switch to the nrf port and use the uf2 loader.
i think you have to do make ... flash at least once to set the "bypass verification" bit in the flash
ok -- I'll give it a try later tonight or tomorrow. thanks
good luck ๐
it seems the usb cdc might need some work, I can't Ctrl+C while in a while True: and can only do Ctrl+D if there is no text entered in the line, which I'm 95% sure was possible over regular uart
@slender iron For a class with init having too many arguments do you: 1. make a judgement call and pylint: --disable or are you 2. supposed to split it out somehow?
Oh right, lunch.
It should not be that hard. In ports/atmel-samd/boards, make a new directory corresponding to your board. Change everything as appropriate: pin mappings, SAMD21G18A -> SAMD21J18A, etc. If there are extra timers, SERCOMs, etc. that are in the J version, but not G, you may need to change some limits somewhere.
See boards/ugame10 as an example of a third-party board we've included in our source tree. If you succeed and your board design is available to others, we'd be quite amenable t...
๐
catching up while vagrant up does its thing. ok, caught up...naturally, just start typing. no need to check window focus. ๐คฃ
@idle owl every time I've seen that its been a bug so I wouldn't disable
@slender iron It's complaining that this has too many arguments: ```class Adafruit_IL0373(Adafruit_EPD):
def init(self, width, height, rst_pin, dc_pin, busy_pin, srcs_pin, cs_pin, spi):
super(Adafruit_IL0373, self).init(width, height, rst_pin, dc_pin, busy_pin,
srcs_pin, cs_pin, spi)
self.bw_bufsize = int(width * height / 8)
self.red_bufsize = int(width * height / 8)
self.begin()
All but two other cases are definitely errors, but there are two cases with long inits that I want to know how to handle.
k disable away
ok
pulseio.PWMOut.fraction would allow setting/getting the duty cycle as a fraction between 0.0 and 1.0. This was implemented in adafruit_seesaw.PWMOut recently.
As suggested by @dastels in https://github.com/adafruit/Adafruit_Learning_System_Guides/pull/247#discussion_r202186553
@umbral dagger So you want to leave it as-is for now?
As hex, yes. I'll add a comment noting it.
let me do one more commit
Great!
Thanks for your quick response, and in regards to the board being available to others: absolutely, that is a goal as well!
I will start with the information you just provided.
Thanks again.
EZ
@idle owl OK
Travis failed.
Yeah. Some trailing spaces snuck in. i need to add that to an emacs pre-save hook.
OK.. that'll not happen again
Did something change in how the sdcard library works? I'm getting an error saying that "function does not take keyword arguments".
Oh and I am using the adalogger featherwing example and the "Datalogging with feather and circuitpython" example as guides.
Using CP 3.0.0 release and 3.0.0 beta lib bundle.
@stark wolf can you post the full text of the error dump
@tidal kiln Its not very useful as I'm working with the Huzzah esp8266 so the error dump is from ampy.
ampy.pyboard.PyboardError: ('exception', b'', b'Traceback (most recent call last):\r\n File "<stdin>", line 13, in <module>\r\n File "adafruit_sdcard.py", line 113, in init\r\n File "adafruit_sdcard.py", line 138, in _init_card\r\n File "adafruit_sdcard.py", line 257, in _cmd\r\n File "adafruit_sdcard.py", line 239, in _cmd\r\n File "adafruit_sdcard.py", line 215, in _wait_for_ready\r\nTypeError: function does not take keyword arguments\r\n')
Up to line 13 is:
import board
import bitbangio
import digitalio
import storage
import adafruit_sdcard
import adafruit_si7021
setup SPI for SD card
spi = bitbangio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
cs for ESP8266 on GPIO15
cs = digitalio.DigitalInOut(board.GPIO15)
make and mount sdcard
sdcard = adafruit_sdcard.SDCard(spi, cs)
@stark wolf comes down to this:
line 215, in _wait_for_ready
TypeError: function does not take keyword arguments
which is here:
https://github.com/adafruit/Adafruit_CircuitPython_SD/blob/master/adafruit_sdcard.py#L215
the problem being that the bitbangio version of readinto is different than the busio version
@tidal kiln Is it different on the "latest" RTD?
OK, this broke because we turned on MICROPY_CAN_OVERRIDE_BUILTINS in 01443a9619e7cbedd1697418855243cd95e0e674. However, note that it still doesn't really work right even before that change. If you call AttrDict([]) you'll get an error, though dict([]) works fine.
In general subclassing from builtins does not work well in MicroPython/CircuitPython. This is a deliberate choice to save space and time.
I'm not sure how you're class is used. It looks like you're trying to override the ...
@tidal kiln I'm not sure that's it as I'm using 3.0.0 and you referenced 2.x of the docs. I will look into both of those. Thank you for pointing me in that direction.
@idle owl good catch, but appears so, at least for readinto
I need to step away but I'll be back later this evening and look deeper. Thank you @tidal kiln
Thanks for the update. My main goal is to conveniently declare system structure with the more readable dict.foo.bar.baz vs dict['foo']['bar']['baz']. I use this extensively in not-so-real-time world.
I assume the change to MICROPY_CAN_OVERRIDE_BUILTINS isn't going to get undone. Is the slightly-more-broken-than-before behaviour of dict subclasses likely to get fixed or go onto the ...oh-well... pile? Not looking for anything solid, just a vague sense of probability.
Cheers,
Lar...
whaaa??!? i2c checks for existence of pull ups on creation? neat.
Does the M0/M4 have builtin pullups on those lines?
I seem to (vaugely) remember some discussion about including that pullup check, but it's been a while
the built-in pullups are not suitable for i2c
they are too weak, and you don't know what voltage the lines are using, so you can't enable them by default
(it's possible to have 2.8, 3.3 and 5V devices on the same bus)
Makes sense
that last point is kinda moot when all the i2c modules that adafruit sells have built-in pullups anyways
@ladyada the Pin(14, Pin.IN) is on a micropython page, so no worries. Specifically: https://docs.micropython.org/en/latest/esp8266/esp8266/quickref.html.
I'm still getting my feet wet and using any data source that seems to work.
Does anyone have any driver related work on their help wanted lists? That look like a good way for someone like me to learn circuitpython while learning to do something useful:)
@tidal kiln @idle owl So after a closer read, it looks like readinto(), write() are different between busio and bitbangio but also frequency is only in busio. ๐
I think I like the idea of having wifi on chip a lot more then the reality. Fine. I'll buy another feather that isn't an esp8266. I was wanting to play around with packet or lora radio anyway.
@torpid goblet check the issues tagged driver related:
https://github.com/adafruit/circuitpython/issues?q=is%3Aopen+is%3Aissue+label%3Adriver
@tidal kiln thanks.
@slender iron @tulip sleet to what extent are bitbangio and busio meant to be 100% swappable? (see above)
ideally they'd be interchangeable
is the above worth an issue?
sure
@stark wolf know how to create an issue on github?
@tidal kiln Yep, I'll head over there now.
thanks!
Well, actually one min. Am I opening an issue on CP in general or on some specific lib / repository?
they are core modules, so in the main CP repo
Ok, thanks.
@torpid goblet not sure how to do this efficiently, but you could also look for any issues in the existing driver repos. i think using the bundle as a jumping off point may be the easiest way to browse them:
https://github.com/adafruit/Adafruit_CircuitPython_Bundle/tree/master/libraries/drivers
@tidal kiln https://github.com/adafruit/circuitpython/issues/857 looks like a good jumping off point for me. If I understand the process correctly from the hardware end it is mainlu a matter of figuring out which registers to peek and poke ๐ From the software end is is matter of figuring out a reasonable API. There are a few other temperature sensors in the library to use as examples.
I could not find a driver for the TMP007 IR Temperature sensor https://www.adafruit.com/product/2023 There is a Python Driver for the Raspberry Pi and I have adapted it to work under CircuitPython....
Most of the associated methods are identical except for three:
readinto()
busio has these args: readinto(buffer, *, start=0, end=len(buffer), write_value=0)
bitbangio only has: readinto(buf)
write() has the same problem.
busio: write(buffer, *, start=0, end=len(buffer))
bitbangio: write(buf)
Lastly, busio has frequency() but bitbangio doesn't at all.
The learn.adafruit.com documentation does allude to busio and bitbangio being replacements but doesn't mention any S...
@torpid goblet yep. i think you've got the general idea. more details here:
https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/
and this is good to read through:
https://circuitpython.readthedocs.io/en/3.x/docs/design_guide.html#design-guide
in particular, the part about sensor value name conventions:
https://circuitpython.readthedocs.io/en/3.x/docs/design_guide.html#sensor-properties-and-units
@stark wolf thanks!
Is there a way to post an issue for learn.adafruit.com documentation? Or a way to help edit, update said docs? I'd like to help more then just creating issues on github and I'm not really a coder.
in the left hand nav on Learn, theres a feedback/comment option
but in this case, i think the issue you created works
@tidal kiln Not sure how I missed that link. Thank you.
if bitbang and bus agreed, then the guide would (hopefully) be ok
there's also the forums, you can post issues there
I've also noticed other small errors before but never said anything. Realized recently, that I'd like to help more.
I'll see what I can do and hopefully, one of these days, I'll be able to help with the code.
no worries, just pointing out issues is helpful
if you're not sure which venue to send them to, just make best guess and we'll deal with it / route it
Great, thanks.
@torpid goblet / @tidal kiln here is the "condensed" issue list, only library issues; main repo links are tossed. only downside is copy+paste links... (these are the notes from Monday's meeting)
https://gist.github.com/tannewt/bc8d2158069e0b5aad29f02913900bf2
@raven canopy thanks. I'll start by reading through those tomorrow.
how bad of an idea is to update a local repo with git pull within a .py that is running in the local repo? ๐ฉ ๐ ๐ค
It looks like you're using https://github.com/bcj/AttrDict.
Different ports of MicroPython and CircuitPython do or do not turn on MICROPY_CAN_OVERRIDE_BUILTINS. We did choose to turn it on. I think it's an unfortunate accident that it happens to break dict-subclassing, As I mentioned, there are already limitations on subclassing of builtins (search in the micropython issues list for dict, builtin and/or subclass to get some idea of other issues). We don't tend to work on core lan...
@indigo wedge making progress -- I I wasn not able to make the bootlaoader for pca10056, but it did work and load for feather52840 - is this OK? ```jerryneedell@Ubuntu-Macmini:~/circuitpython_master/ports/nrf$ make SD=s140 BOARD=pca10056 bootloader
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
nrfjprog --program boards/pca10056/bootloader/6.0.0/pca10056_bootloader_6.0.0_s140.hex -f nrf52 --chiperase --reset
ERROR: There is no debugger connected to the PC.
Makefile:277: recipe for target 'bootloader' failed
make: *** [bootloader] Error 41
jerryneedell@Ubuntu-Macmini:~/circuitpython_master/ports/nrf$ make SD=s140 BOARD=feather52840 bootloader
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
nrfjprog --program boards/feather52840/bootloader/6.0.0/feather52840_bootloader_6.0.0_s140.hex -f nrf52 --chiperase --reset
Parsing hex file.
Erasing user available code and UICR flash areas.
Applying system reset.
Checking that the area to write is not protected.
Programing device.
Applying system reset.
Run.
Wow that's really strange, it's the same command for both, it should work
as for the uf2 i think you have to stick to feather if the bootloader is for feather
Then I get this at REPL ```Adafruit CircuitPython 3.0.0-rc.0-142-g75f48a5 on 2018-07-13; PCA10056 with nRF52840
import board
dir(board)
['P0_00', 'P0_01', 'P0_02', 'P0_03', 'P0_04', 'P0_05', 'P0_06', 'P0_07', 'P0_08', 'P0_09', 'P0_10', 'P0_11', 'P0_12', 'P0_13', 'P0_14', 'P0_15', 'P0_16', 'P0_17', 'P0_18', 'P0_19', 'P0_20', 'P0_21', 'P0_22', 'P0_23', 'P0_24', 'P0_25', 'P0_26', 'P0_27', 'P0_28', 'P0_29', 'P0_30', 'P0_31', 'P1_00', 'P1_01', 'P1_02', 'P1_03', 'P1_04', 'P1_05', 'P1_06', 'P1_07', 'P1_08', 'P1_09', 'P1_10', 'P1_11', 'P1_12', 'P1_13', 'P1_14', 'P1_15']
import ble_scan
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "ble_scan.py", line 23, in <module>
OSError: Cannot apply GAP parameters.
do I need to provide any power to the board othere than via teh nrf USB port?
OK - no problem -- just want to make sure I had done it right.
think I'll create a issue for this
ok -- do you want an issue for the make pca10056 bootloade as well?
that one I'm not sure if it's a issue with CP, because I did work for me
ok -- I'll try again
maybe you tried to flash it too early after connecting?
at least on Mint it needs a few seconds
sorry -- worked fine this time
glad to hear ๐
thanks -- back to playing -- BTW - I received a "dongle" no rush on that
It is great to be able to copy files now via MSC ๐
cool - I can blink an LED !
oops - but no Control- c ๐
sure -- I just nounted my SDcard!! SPI works!
nice --- great progress
BTW -- I think control-D is only supposed to work as the first char of the line
or at least -- I think it is taht way on other boards as well
ok, if it's like that on other board then fine
i just felt that it used to be anywhere in the line but maybe i was thinking ctrl+C
I'm pretty sure its written that way intentiaonally
After loading current master to pca10056 board (via MSC! ) control-C does not break out of a While True: loop
>>> while True:
... pass
...
...
...
cannot break out with control- c
Same result with a while loop in a script:
import board
import digitalio
import time
led = digitalio.DigitalInOut(board.P0_13)
led.direction = digitalio.Direction.OUTPUT
while True:
led.value = True
time.sleep(0.5)
led.value = False
time.sleep(...
Any hunches @hathach before I dive in too deep? ;)
@prime flower FYI - I still get adafruit-io 1.1.1 when I do a pip3 install adafruit-io -- repeating this in the correct channel
sorry still wrong channel ๐ฆ please reply in #help-with-wippersnapper-and-adafruitio
yay, found a fix for the BLE not working ๐
Need to release the POWER IRQ because the SD takes control over it, so USB and BLE can work at the same time.
@indigo wedge do I need to reflash the bootlaoder to rest teh PR -- or just build new UF2
just uf2
I think it's button 1 or 2 or maybe both ๐
both worked!
๐
>>> import ble_scan
ADDR: c8:69:cd:1c:5d:f8
TYPE: 0
RSSI: -78
AD_TYPE_FLAGS: 0x1A
AD_TYPE_MANUFACTURER_SPECIFIC_DATA: 0x4C 0x00 0x10 0x05 0x01 0x10 0xC8 0x70 0xC0
looks good ๐
It does not show as many responses as I get on feath52823, but taht was the same before just flashing it via Jlink
FYI -- boot to NRF52BOOT does require button 1 and button2
thanks, good to know, I've been flashing with pyocd
Q: are we going to get rid of ubluepy at some point or does it serve some purpose in other nrf ports?
You can do return mp_obj_new_bool(common_hal_bleio_adapter_get_enabled());. This is common in other shared-bindings implementations.
Yes, next step is port ubluepy classes to bleio, I just like to keep things separated and do them one step at a time.
Ah, nothing like friday merging
Always commit major changes on Friday! Or right before the lead dev goes on vacation. ๐
@tulip sleet I re-installed the nrfuitil - to bring mine up to 0.5.2d -- now when I update the repo I am left with ```jerryneedell@Ubuntu-Macmini:~/circuitpython_master$ git diff
diff --git a/lib/nrfutil b/lib/nrfutil
--- a/lib/nrfutil
+++ b/lib/nrfutil
@@ -1 +1 @@
-Subproject commit 9e7dfb28a5c6f3d7a19340971b32e0c2b4128ecf
+Subproject commit 9e7dfb28a5c6f3d7a19340971b32e0c2b4128ecf-dirty
or should I just do a fresh clone of the repo.
i think you can cd into lib/nrfutil and do git reset --hard
that seems to have worked, thanks
๐
quick check on linux with minicom does seems to work. @jerryneedell which OS and terminal you are using
Adafruit CircuitPython 3.0.0-rc.0-148-gbfe14ff-dirty on 2018-07-13; PCA10056 with nRF52840
>>>
>>> while True:
... pass
...
>>> 1+1
I'm also using Linux (Mint) and minicom and it doesn't work for me either :/
I am using screen in Linux Ubuntu 16.04
I am on ubuntu 16.04 as well. Let's me test with screen
I tried minicom under Ubuntu 16.04 and it did not work for me. :-(
I'm happy the Feather M4 is in stock now, but when will the Circuit Playground M4 be released? Any idea?
@indigo wedge just a heads up - I tried connecting the board PCA10056 to my Mac -- works fine -- still Control C does not work via screen.. But in the midst of think, I ended up in a state with CIRCUITPY mounted OK, but REPL did not show anything in the FS?? After a power cycle it was all fine -- may just have been an issue with reseting when I was hung in loop. Seems OK now, but just something to watch for on Macs...
Hmm, screen works with me if I just typed the above while True: then press Ctrl +C.
Though if I go into paste mode and execute, I couldn't Ctrl+C to terminate it anymore. Is it standard or bug as well
- Ctrl +E to go into paste mode,
- paste your blinky loop.
- Then Ctrl + D to run.
PS: I also find out a bug with paste mode, where some character is missing as well. Working on the fix for that
@hathach did you enter enough "returns" to get into the While loop? I thought 3 were needed after the pass
@jerryneedell ah I see, after the 4th CR, it is hanged there. Sorry, I am not familiar with cp :( . Let's me check, may be some loop() is runing ,and the background task that handle usb transfer is not executed while the loop is running.
Whew! Glad we are all seeing the same thing -- thanks!
CircuitPython running on a Raspberry Pi, using busio with the ADS1015 (i2c), sending analog data to Adafruit IO
@tidal kiln @stuck elbow It turns out Odroid meant to have me check pin 8, the enable pin, on the U4 chip. Which is evidently working the way it's supposed to, as are two other things they had me check. If those weren't right, the PCB had an issue. But they are, so I still don't know what's wrong.
At least, they said "if the enable pin is high"... I'm assuming 3.3V means high?
yes
@idle owl seems to confirm what we found in that initial testing - the voltage reg is fine and is outputting 3.3v.
did they provide a next step?
The next step was if it failed, start the RMA process. But, no next step if it was working.
the strange thing is that the 3.3V pin on the regulator side has voltage, but the same bus on the esp32 side doesn't
so it seems like a trace is broken somewhere
So now I wait again. This is a slow process because I believe they're in Korea. So.. basically one reply per day.
oh yeah - did you try a a continuity check on that?
I don't know how to.
go ahead and remove all power, since it's a simple "is there copper" test
pretty sure your multimeter has a continuity setting, look at dial, maybe a diode symbol? also may have some )))) indicating audible beep?
It's this one: https://www.adafruit.com/product/308 You tell me
Is it the one next to "Off"?
yah. think so. one click counter clockwise from OFF.
touch probes to each other - does it beep?
Adafruit's new series of videos with Collin Cunningham is here! Collin's Lab: Multimeters! The multimeter is your greatest ally when working with electronics...
2mins in
no
hmmm. hold....
Wait
press the mode switch twice
(that's a great meter, BTW)
Thanks! But in this case, I need to know specifically on this board what I'm checking to what @prime flower
@errant grail Good to know! It's my first ๐
page 10, "CONTINUITY CHECK":
https://cdn-shop.adafruit.com/pdfs/EX330_UM.pdf
might need to press the MODE button?
@idle owl It's my 12th+ (approximately)
oh. i looked away for 30 secs!
๐
anywho...
@hathach,
PS: I also find out a bug with paste mode, where some character is missing as well. Working on the fix for that
We had a similar problem in SAMD land. Here was the fix:
https://github.com/adafruit/circuitpython/pull/698
Mention it as a possible place to look.
let me look at schematic again....
This won't break anything right? As in I can't blow something out doing a continuity test?
Update: got it, the usb cdc doesn't scan and call mp_keyboard_interrupt() by now. Will try to find a way to add it in.
Battery isn't plugged in.
@sommersoft ah thanks, that will be very helpful :D
@idle owl as long as power is removed, you're ok
That's good. Because I started checking random things to make it beep. Before asking. ๐
you were testing pins on U4 before, right?
Yeah. But Radomir had me check pin 2 on the ESP at some point.
yep. that too.
do a check between Pin 5 on U4 and Pin 2 on ESP
ok
one probe on one, the other probe on the other, doesn't matter which way probes go
nothing
sounds like a bad trace then
It beeps against 8 though, so I'm holding it in the right place I hope
8 on U4?
yah
I am now...
1 is by the white dot.
So 8 has to be the opposite corner
Wait.
Is that not right?
Ok I'm wrong
So I need to check the right pin.
I didn't check the right pin 8 even.
Pin 5 beeps.
Pins on ICs are numbered the same way as on vacuum tubes: counterclockwise viewed from above.
Against pin 2 on the ESP.
so trace is good
@raven canopy thanks for the list last night .that was helpful. I went through 8 this morning. just spent about 15 minutes researching the topic to increase my breadth of knowledge. I'll try to do that for the next week or so. With regard to a 'newbie hurdle' my first inclination was to browse https://github.com/adafruit/circuitpython looking for something bite sized. The list you sent which included all/many of the non-core packages presented a much gentler learning curve.
i'd try and repeat your voltage measurements again, with power applied
Pin 8 is 4+V
volts? where's the power coming from?
3.7V Lipo
which seems to be giving off like 4.1 or something.
That's what I get when I check the battery pins to each other.
So I'm getting the same on pin 8 as I do when I test the battery itself.
TP18 is VBAT, if you want to verify
4.12V
that's that then. that's probably fine. that's just what that battery is.
Pin 8 is 4.10V
A fully charged LiPo will give about 4.2V, so 4.12V is completely reasonable.
switch is "on"?
Yes.
the switch pulls Pin 8 up to VBAT, so that makes sense
Pin 8 is the EN (enable) pin for the voltage reg (LOW = OFF, HIGH = ON)
when the switch is "off", it's open and Pin 8 is pulled low via a pull down resistor
So trace is good, EN is working correctly.
what voltage do you see at Pin 5 on U4?
what voltage do you see at Pin 2 on ESP?
2 to ground right?
yep
3.3... I must have tested it wrong yesterday
you could keep black probe at same point for these two measurements
and just move red probe
right
that's why no backlight
Oh.
but at this point i'd pass it back to whoever you are emailing with
voltage reg is good. ESP is getting 3.3v. but nothing - so what's up?
welp. we'll see what they say next.
Yup
see @main meteor 's comments above about pin numbering and battery voltage - good stuff to know (esp. pin numbering)
Yah I'll probably need to hear it one more time for it to stick, but I did catch that.
I knew the battery thing from a guide I wrote.
Datalogger guide, because it logs the VBAT as well, so I knew where it starts and where it is when it's going to die.
bringing things back on topic.....anyone up for a review:
https://github.com/adafruit/Adafruit_CircuitPython_HT16K33/pull/16
looking. Tested?
yep
So it's two colors of LEDs but they make 3 because yellow?
Confusing to me, but I see that's what the product is actually called.
right. although it looks orange to me. but i stayed with previous definitions.
Yeah solid plan.
"Bi-bolar"?
@idle owl thanks
Page finished, and live. Blogged up. This is all set!
Thanks again and perfectly reasonable that this issue is out of scope for your port. As you said there are other ways to skin this cat.
If anyone has a feather M4 and a 2.4 inch TFT or STMPE610 controller. It would be good to know if you can reproduce this problem https://forums.adafruit.com/viewtopic.php?f=57&t=138101&p=683652#p683652.
Q; on circuitpython debugging. i have jlink / gdb set up. using itsy bitsy. am able to see symbols. i want to break on the c code i wrote for a circuitpython module. the module is called w/in code.py. while i can see symbols for things like eic_get_enable, i can't see my c module's symbol. ALSO - i am used to debugging w/in IDE. First time w/ gdb. So unclear how i am starting debugging w/in gdb and "somehow" code.py is the running program? (Thank you.)
Also - thankyou @slender iron for this very helpful article: https://learn.adafruit.com/debugging-the-samd21-with-gdb/setup
@bronze geyser make sure to make BOARD=itsybitsy_m4_express clean then make BOARD=itsybitsy_m4_express DEBUG=1
code.py runs on start up automatically
@slender iron (i'm using m0...but get the point). I did not do "clean"...note: I did not see this step in your instructions?
thats just useful when enabling debug for the first time
No strong reason. I thought I would close after a day or two. @ExperimentalZeros we can reopen if you come back with a pull request.
Gents,
Letโs do that as I am in the process of following the directions revised by Mr. Halbert.
Please close until then if appropriate!
Thanks
On Jul 13, 2018, at 13:06, Dan Halbert notifications@github.com wrote:
No strong reason. I thought I would close after a day or two. @ExperimentalZeros we can reopen if you come back with a pull request.
โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
I've made the plugin public:
https://github.com/notro/pytest-circuitpython
It's my first attempt at Python packaging, but it seems to be installable.
Next step is to use it for an actual project :-)
@idle owl up for one more?
https://github.com/adafruit/Adafruit_CircuitPython_HT16K33/pull/18
(or anyone else)
Sure!
@idle owl thanks. i'm going to go run some errands. will check back...
@tidal kiln Change request in. Whenever you get to it
Sorry if this is the wrong channel, but Is there any reference material for importing / loading the circuitpython libraries to linux/rasbian? I loaded rasbian with stretch os on an old netbook and want to use this as my new dev machine. I think I need a good general linux/debian how to book, any suggestions?
Is the UF2 code used by circuit python based on the work done at https://opensource.microsoft.com/?tag=uf2 ? If so, kudos to all. It provides a clever solution to a significant "new user" hurdle.
@rigid path take a look at this https://learn.adafruit.com/circuitpython-on-raspberrypi-linux
@solar whale - Thank you
@tidal kiln got the ads1115 working
@prime flower cool. in what setup?
I posted it up way above earlier but
Blinka + ADS1115 (SPI) + Adafruit IO (V2.0.9), Analog Input using a Photoresistor
oh yah! awesome!
the mcp3008 doesn't seem to have a circuitpython port yet
it does have a python one though, I might take on it
@idle owl pushed update
@prime flower go for it! you'll want to change the API to be more like CP. look at the ADS one as an example. basically, use properties more instead of get/set methods.
@tidal kiln I didn't know that about the disables.
@prime flower could you tackle the entire MCP30xx/MCP32xx line? only difference i remember off the top of my head is the resolution (10 vs 12 bit).
@idle owl basing it on this:
https://docs.pylint.org/en/1.6.0/faq.html#is-it-possible-to-locally-disable-a-particular-message
...at the desired block level...
Fair enough.
I have a question about connecting a battery-powered Feather board to USB.
According to https://electronics.stackexchange.com/questions/55445/does-a-self-powered-usb-device-have-to-connect-to-vcc-from-the-host-port the MCU shouldn't pull the pins up before voltage is present on the VBUS, but when I'm powering the Feather from a battery, there is no way for the MCU to know that.
Is there some trick there that I can't see?
Ran through all the code with both boards. Found bugs in a couple of pieces of code, PR already merged. Everything now works on both the Feather and Itsy M4. Edited any code to update comments where needed to reflect both boards. Updated guide pages to include M4 information, including wiring diagrams and where/when to comment out lines of code, etc.
Final PR is in to add M4 details to comments in one last file.
@idle owl thanks for yet another review / merge
@raven canopy ladyada said she has a WIP lib for that, I'll release it with her within the next week most likely as we need it for Adafruit IO Basics: BLINKA EDITION!11!!
some might say its magic, but we all know its just adafruit's awesomeness.
๐
just got all the machines and parts aligned whew
reading the ASF docs makes my head hurt
which ones are you reading? the ones on atmel.com are the old ASF3 version.
The one I have is "ASF4 API reference manual"
๐ not that either is better than the other from a head-hurting perspective. ๐
I long for the old days where it was easy to configure a peripheral ๐
well, adabot is cloning and patching. just can't coerce her to push to repos. though, that may have something to do with the hybridized environment i'm running it in (vagrant, and not with the full venv). she'll have to sit for a couple days; company is almost here... ๐ฆ
and finding online examples is strangely difficult. I find plenty of D21 examples, but barely anything for D51, aside from others asking the same questions. ๐
I'm having problems getting my circuitpython code in MU to work for my LCD that I have breadboarded to a Metro Express. I have followed all the directions to wire it up , and the got the logic, backlight and contrast all worked out seem to be working fine. The code is not though. I downloaded the adafruit_character_lcd library but I keep getting the error "AttributeError:'module' object has no attribute 'Character_LCD'.
@half pendant are you getting the example code from a guide?
yes. I used the basic code from: https://learn.adafruit.com/character-lcds?view=all#usage
let me take a look. that error should be pretty easy to fix.
did you download the individual library? or the bundle?
the bundle
Any help would be greatly appreciated!!
and you're following this in that guide?
https://learn.adafruit.com/character-lcds/circuitpython-code#usage
once you've done the import:
import adafruit_character_lcd
the next step is to create the LCD object:
lcd = adafruit_character_lcd.Character_LCD(lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7, lcd_columns, lcd_rows)
and that seems to be where you are having issues
are you entering things into the REPL? or did you save them to a .py file?
anyone here?
Yes to all. I did try to save the program as a .py file in Mu, but nothing changed on the LCD. Then I tried the program in REPL and was fine until the last line to create a LCD object and then got the error I listed above.
ok. let's try something using the REPL - are you there now?
yes. i'm back
Just let me know what I should try...
This is a screen shot of the REPL error I'm getting.
Ignore the first error about pin 13, that was just a typo. The error that is stumping me is the last line.
type this in the REPL:
dir(adafruit_character_lcd)
and post the output here
oh, sorry, thought that previous capture was your current state
need to import first
import adafruit_character_lcd
@stuck elbow The two power sources (bat and USB) are both connected to the input of the regular via diodes (to prevent back current). So as soon as you connect a regular USB cable it switches to USB power, assuming USB > battery voltage. So I'm not sure this will be a problem. Whether the lines are pulled up prematurely or not I'm not sure, but it basically does not act as a self-powered device, since the diodes I think will prevent the current flow that might lead to that.
ok, now try this:
lcd = adafruit_character_lcd.Character_LCD()
and post what it says
ok. it's seeing the class.
step through setting up your digital pins again
and try again to create the lcd object, same as you did before in first screen capture
Oh! I just figured it out
I installed the 3.0 library, but my Metro is running 2.0.
I just installed the 2.0 library, and it works!
interesting
might as well upgrade to latest CP:
https://github.com/adafruit/circuitpython/releases/tag/3.0.0
then you can use latest bundle
I didn't realize my Metro was 2.0 until you walked me thought the REPL code and it told me.
Will update all to 3.0. Thanks for your help!
i'm surprised it even let you do the import actually
yah. is that somehow broken?
@half pendant what was the exact 2.x version number? (if you remember)
PR is merged. Essentials guide is all set for all currently released boards!
i've gotta run. but will see if i can replicate that.
Hey all. I've recently bought a Feather M0 Bluefruit and been reading docs trying to find out if there is a circuitPython library for it's Bluetooth module. Is it possible to use Bluetooth in CircuitPython?
acher, not at this time
it wouldnt fit ๐ฆ
we are aiming for nrf52 support
where you get more power and ble!
Wouldn't fit, as in 92K of RAM is not enough?
The irony is, I bought a Bluefruit Feather because Flora couldn't handle 1200 neopixels because that takes 4K RAM, and Flora only has 2.5K :-)
I'm sure Feather will handle it just fine
@meager fog thank you for the answer!
ach, it doesnt have 92K it has 32K
but yeah its just not enough because the filesystem is also small. honestly we recommend just skipping ahead to the nrf52 ๐
32, right. nRF52 is out of stock at the moment
I just got an interesting error when updating my stock feather m0 express to cp3
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
main.py output:
Traceback (most recent call last):
File "main.py", line 17, in <module>
File "/lib/adafruit_hid/keyboard.py", line 36, in <module>
MemoryError: memory allocation failed, allocating 512 bytes
soft reboot
the error just keeps cycling through on the serial console.
weird, I''l try downgrading the firmware and lib to 2.3.1
after downgrading....
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
main.py output:
Traceback (most recent call last):
File "main.py", line 17, in <module>
File "adafruit_hid/keyboard.py", line 36, in <module>
File "adafruit_hid/keycode.py", line 31, in <module>
KeyboardInterrupt:
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
main.py output:
Traceback (most recent call last):
File "main.py", line 17, in <module>
File "adafruit_hid/keyboard.py", line 36, in <module>
File "adafruit_hid/keycode.py", line 31, in <module>
KeyboardInterrupt:
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
main.py output:
Traceback (most recent call last):
File "main.py", line 12, in <module>
File "neopixel.py", line 31, in <module>
KeyboardInterrupt:
Adafruit CircuitPython 2.3.1 on 2018-05-07; Adafruit Feather M0 Express with samd21g18
the error ran for about 2 minutes then the repl started
@torpid goblet is line 17 of main.py sending a Ctrl+D?
line 17 of main.py is 'from adafruit_hid.keyboard import Keyboard'
I have not intentially changed main since it arrived.
going to try full reboot of computer, I was playing with the pycharm micropython plugin a couple of hours ago.
Hmm...that's an odd one.
same thing after a reboot. Hiting Ctrl-C a bunch of time finally started the repl. i'll try erasing the flash completely reloading the 3.0.0 firmware, and updating the library and see if that helps.
Howdy folks, I am new here, but not new to Adafruits products, I was wondering if there's a Default Circuit Python, image with most of teh needed defult files in it.
I had to erase mine to bring it back from the Dead and when I went to put 3.0 on it, it does not have any Python files or Libs in it
@craggy nacelle I followed the instructions at https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries to replace the lib dir with 3.0
okay, thanks, what about the main.py file?
I just replaced it with 'print("hello world")'
I would like to get the Demo working again, just to try out it's features with 3.0
I'm fairly certain the demo stuff that is shipped with the boards is somewhere, I just don't remember where... let me look a couple places.
okay Great! Thanks @raven canopy
@torpid goblet I bought the Trinket M0 to try out Circuit Python and now I want to learn more about Python too...just getting my feet wet
@craggy nacelle me too. every thing was working great until i tried to update.
Figures Don't it
I am off to bed and going to look at this with fresh eyes in the morning. The help in this discussion is really good. friday night every one must be out and sommersoft is doing third shift ๐
Finally remembered! Well, stumbled upon I guess. ๐ the demo files are available on the "Downloads" section of each board's Learn Guide.
@craggy nacelle, you're using the trinket m0? they're available on this page (green "buttons"); v2 is probably the one you had: https://learn.adafruit.com/adafruit-trinket-m0-circuitpython-arduino/downloads
hehe. my "shift" is pretty much when i'm not at the day job (even sometimes when i am).
@craggy nacelle you're welcome!
@raven canopy interesting, replacing the main.py with the one on https://learn.adafruit.com/adafruit-feather-m0-express-designed-for-circuit-python-circuitpython?view=all#downloads caused the problem to start again. I know a lot more than a did 3 hours ago ๐ thanks
really? hmm. we should look into that then.
finally! helps to call the params correctly, and setup the venv.
@slender iron @idle owl I think some part of adabot has stopped running. The adabot update of the library bundle last produced a new bundle on July 04. But there have been library updates since then (like for instance I updated crickit on July 5 and made a 2.0.2 release; the bundle has 2.0.1).
what machine does the cron job run on?
I was going to ask where the cron job ran too.
Hey guys, I was updating uf2 of itsybitsy m0 express with circuit python 3.0 and now it cannot boot to file system. Do you know some trick how to fix that?
@timber mango what's the error?
no error, just flashing goes well and no boot to file system
so no CIRCUITPY?
what's the name of the .uf2 you loaded?
adafruit-circuitpython-itsybitsy_m0_express-3.0.0.uf2
does the green LED pulse?
and also the latest distro: adafruit-circuitpython-itsybitsy_m0_express-20180713-bfe14ff.uf2
the green led is just constantly on, no flashing
I don't think so, I was looking for it but there is only CP3.0. itsybitsy m0 express is not just m0 right?
here is 2.3.1: https://github.com/adafruit/circuitpython/releases/tag/2.3.1
that's the right .uf2, and you don't have an itsy m4, right?
but this one is just m0 not m0 express. Will it work?
you mean it says that on the board? There's only one kind of itsy M0
right, good
ok than I will try!
ok, flashing done. Now I can see green-pink-blue-blue
ok FS loaded!
great this really helped. What is the problem with CP3.0 then?
not sure why there is a problem, but I suggest this: copy off the files you want from CIRCUITPY. Then go into the repl and do:
import storage
storage.erase_filesystem()
Then load 3.0.0 and replace your files.
If you want to do some debugging, try re-downloading 3.0.0 and copying it again, just in case there was corruption.
I just loaded that same uf2 onto an itsy m0 and it is fine, so it's not a general problem
let me know - thanks!
now it works great! thanks @tulip sleet
One more questions: how can I address pins on itsybisty which are 13-5 between USB and SCL?
are they board.13 or board.D13? or something else?
ok I will try it, thanks
it worked! It is pity that that it's not available yet this pinout from itsybitsy
@timber mango pinout info: https://learn.adafruit.com/introducing-itsy-bitsy-m0/pinouts
and some info on using the digital ones with CP: https://learn.adafruit.com/introducing-itsy-bitsy-m0/circuitpython-digital-in-out
@tidal kiln Odroid want me to flash the firmware. I can't find it connected to my machine. So I don't know how to go about that.
I installed the SILabs drivers multiple times.
I guess I may not have rebooted. But it didn't ask me to.
seems like a good next step. it does seem like it's acting like there is no firmware. since it's getting power and everything else seems to checkout.
does their wiki, or something else, have firmware flashing instructions?
Yes, but it doesn't explain what to do if you can't find it in /dev/
"Find your serial node" ok... yeah... if it was there that would be great.
I haven't bothered downloading esptool or the firmware yet. Because I can't see the board.
installed esptool and pyserial.
The only thing showing up in dev is the Feather M4 I have connected.
yah
can you do dmesg at command line?
how are you connecting odroid....
Ok so I connect it and this happens:
actually - wanna go dm? since this is off topic?
or is there utility in this for CP stuff?
This is a minor readability issue... it would be more clear in the Core Module section of the api ( http://circuitpython.readthedocs.io/en/latest/shared-bindings/index.html# ) if the API list(Modules) came before the support matrix(Support Matrix).
@tulip sleet its on an intel nuc here. I'll go poke it
is this still the only guide for flashing CP to an ESP8266 ? https://learn.adafruit.com/building-and-running-micropython-on-the-esp8266?view=all#flash-firmware
@tidal kiln ah - thanks -- I'll update the forum post ...
@solar whale @tidal kiln I put pointers to that page at the top of that ESP8266 MicroPython guide and at the top of the one it points to.
I took some time this morning to reflect on learning CircuitPython.
An interesting challenge is that Naming Conventions have not kept up with code and documentation development. That is very reasonable give the high pace of development in general. The result is the same things being called different names in different place of by different people.
A CircuitPython manual of style might be helpful. These are probably 4.0 milestone type enhancements. A couple examples include:
- Port a...
do you people know any good resources on charlieplexing LED matrices?
I need to charlieplex this...
@stuck elbow have you looked at the charlieplex learn guides?
not yet
couple of videos too: https://www.youtube.com/watch?v=n5skkq9UPMg https://www.youtube.com/watch?v=rhlGf5XCfDo
@tulip sleet I can't find any learn guides on charlieplexing
those videos are also not about charlieplexing
just about products that happen to use that technique
i thought Limor's video talked about the theory. I remember her explaining it at some point
I know the theory, thanks
I'm looking for tips on getting them arranged and routed
I guess I can look at https://learn.adafruit.com/i31fl3731-16x9-charliplexed-pwm-led-driver?view=all#downloads and copy that
yeah, the routing is free for you to copy
it's the same as in the datasheet for the IS31FL3731
one thing, though, is that it uses 9 pins to drive a 8x9 matrix, and second set of 9 pins to drive another, whereas I would prefer to use 12 pins to drive 8x16 matrix
which I know is possible, but possibly non-trivial to connect
The featherwings are 15x7: https://learn.adafruit.com/adafruit-15x7-7x15-charlieplex-led-matrix-charliewing-featherwing/downloads
yeah, but the use they same chip, just not use all the lines
you could pose a q to limor