#circuitpython-dev
1 messages ยท Page 204 of 1
CS = D5, DC = D6
tried this -- same result ```
from adafruit_seesaw import seesaw as ss
from adafruit_seesaw import digitalio as dio
import busio
import board
import digitalio
from adafruit_rgb_display import st7735
i2c = busio.I2C(board.SCL, board.SDA)
seesaw = ss.Seesaw(i2c, 94)
cs = digitalio.DigitalInOut(board.D5)
rst = dio.DigitalIO(seesaw, 9)
dc = digitalio.DigitalInOut(board.D6)
spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO)
display = st7735.ST7735(spi, cs, dc, rst, 160, 80)
display.fill(0x7521)
display.pixel(64, 64, 0)
https://github.com/adafruit/Adafruit-ST7735-Library/blob/master/examples/miniTFTWing/basic/basic.ino
This is a library for the Adafruit 1.8" SPI display http://www.adafruit.com/products/358 and http://www.adafruit.com/products/618 - adafruit/Adafruit-ST7735-Library
ardino example
This is a library for the Adafruit 1.8" SPI display http://www.adafruit.com/products/358 and http://www.adafruit.com/products/618 - adafruit/Adafruit-ST7735-Library
woot finding buttons, got the joypad select button working too
think ill have joypad done by today
I got it to work
with this:
from adafruit_rgb_display import st7735
from adafruit_seesaw import seesaw as ss
from adafruit_seesaw import digitalio as dio
#from adafruit_seesaw import pwmout as pwm
import busio
import board
import digitalio
i2c = busio.I2C(board.SCL, board.SDA)
seesaw = ss.Seesaw(i2c, 94)
rst = dio.DigitalIO(seesaw, 8)
#rst = None
cs = digitalio.DigitalInOut(board.D5)
dc = digitalio.DigitalInOut(board.D6)
#backlight = pwm.PWMOut(seesaw, 3)
#backlight.duty_cycle = 0x0fff
spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO)
display = st7735.ST7735(spi, cs, dc, rst, 160, 80)
#display.fill(0x7521)
display.pixel(64, 64, 0xffff)
while True:
pass
the seesaw library is really a memory hog
hmm.... made my screen all glitched even when i removed code and reset
it cleared randomly now
my scree just shows randome pixels
so the initial content is random
no clue what that is about
uncomment the fill command
i removed code and it flashed white and is back to default
@stuck elbow thanks -- thatsa big help getting going with thsi
got full joypad working
great! please post the code when you want to.
import time
from board import SCL, SDA
import busio
from micropython import const
from adafruit_seesaw.seesaw import Seesaw
# pylint: disable=bad-whitespace
BUTTON_RIGHT = const(7)
BUTTON_DOWN = const(4)
BUTTON_UP = const(2)
BUTTON_LEFT = const(3)
BUTTON_B = const(9)
BUTTON_A = const(10)
BUTTON_SEL = const(11)
# pylint: enable=bad-whitespace
button_mask = const((1 << BUTTON_RIGHT) |
(1 << BUTTON_DOWN) |
(1 << BUTTON_UP) |
(1 << BUTTON_LEFT) |
(1 << BUTTON_B) |
(1 << BUTTON_A) |
(1 << BUTTON_SEL))
i2c_bus = busio.I2C(SCL, SDA)
ss = Seesaw(i2c_bus, addr=94)
ss.pin_mode_bulk(button_mask, ss.INPUT_PULLUP)
while True:
buttons = ss.digital_read_bulk(button_mask)
if not buttons & (1 << BUTTON_RIGHT):
print("Button Right-D pressed")
if not buttons & (1 << BUTTON_DOWN):
print("Button Down-D pressed")
if not buttons & (1 << BUTTON_LEFT):
print("Button Left-D pressed")
if not buttons & (1 << BUTTON_UP):
print("Button Up-D pressed")
if not buttons & (1 << BUTTON_B):
print("Button B pressed")
if not buttons & (1 << BUTTON_A):
print("Button A pressed")
if not buttons & (1 << BUTTON_SEL):
print("Button SEL pressed")
time.sleep(.01)
all i did is place random numbers in the const() till stuff was correct
thanks!
Ty @stuck elbow for getting screen to do something too
Thanks @upbeat plover - joypad works for me! Thansk for the help @stuck elbow -- I have to go offline for awhile -- more fun later
cheers
I intentionally did this with 4.x to free up space. By the stable release we should have similar functionality through displayio instead.
@tough flax Looks great!
Ok -- feel free to close -- perhaps it would be good to note this in the "release notes".
I'll update the release notes.
Now that I think about this more, let's make it M4 only. The M0 is quickly running out of code space and can't hold much code in memory anyway. Thanks!
I tested the code on PCA10056 and it works there so must be something with either the soldering, the chip or my gpio choice.
"TFT Backlight
- not all Feathers have PWM and also most of the time you don't need to do a lot with the
backlight so we connect it to a seesaw PWM pin so you can dim/brighten as you desire"
what pin is that? @stuck elbow i tried 5 but it doesnt seem to do anything with this code
import busio
from adafruit_seesaw.seesaw import Seesaw
from adafruit_seesaw.pwmout import PWMOut
i2c_bus = busio.I2C(SCL, SDA)
ss = Seesaw(i2c_bus, addr=94)
ss.set_pwm_freq(5, 0)
I think it's 3
3 is left d pad
5 is only one i found that doesnt give "ValueError: Invalid PWM pin"
this is also useful: https://github.com/adafruit/Adafruit_Seesaw/blob/master/Adafruit_miniTFTWing.h
maybe that's pin 0?
im trying to turn the display off i need to set value to "0xFFFF" but not sure how to do that, those links gave me that idea
maybe someone who actually designed this thing could chime in
i'm out 'til monday - have a good weekend, circuitpythonistas.
import busio
from adafruit_seesaw.seesaw import Seesaw
from adafruit_seesaw.pwmout import PWMOut
i2c_bus = busio.I2C(SCL, SDA)
ss = Seesaw(i2c_bus, addr=94)
ss.analog_write(5, 0xFFFF)
turn display backlight off
here is working joypad with backlight off
from adafruit_rgb_display import st7735
from adafruit_seesaw import seesaw as ss
from adafruit_seesaw import digitalio as dio
from adafruit_seesaw import pwmout as pwm
from micropython import const
import time
import busio
import board
import digitalio
i2c = busio.I2C(board.SCL, board.SDA)
seesaw = ss.Seesaw(i2c, 94)
rst = dio.DigitalIO(seesaw, 8)
cs = digitalio.DigitalInOut(board.D5)
dc = digitalio.DigitalInOut(board.D6)
backlight = pwm.PWMOut(seesaw, 5)
backlight.duty_cycle = 0xffff
spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO)
display = st7735.ST7735(spi, cs, dc, rst, 80, 160)
# pylint: disable=bad-whitespace
BUTTON_RIGHT = const(7)
BUTTON_DOWN = const(4)
BUTTON_UP = const(2)
BUTTON_LEFT = const(3)
BUTTON_B = const(9)
BUTTON_A = const(10)
BUTTON_SEL = const(11)
# pylint: enable=bad-whitespace
button_mask = const((1 << BUTTON_RIGHT) |
(1 << BUTTON_DOWN) |
(1 << BUTTON_UP) |
(1 << BUTTON_LEFT) |
(1 << BUTTON_B) |
(1 << BUTTON_A) |
(1 << BUTTON_SEL))
seesaw.pin_mode_bulk(button_mask, seesaw.INPUT_PULLUP)
display.reset()
while True:
buttons = seesaw.digital_read_bulk(button_mask)
if not buttons & (1 << BUTTON_RIGHT):
print("Button Right-D pressed")
if not buttons & (1 << BUTTON_DOWN):
print("Button Down-D pressed")
if not buttons & (1 << BUTTON_LEFT):
print("Button Left-D pressed")
if not buttons & (1 << BUTTON_UP):
print("Button Up-D pressed")
if not buttons & (1 << BUTTON_B):
print("Button B pressed")
if not buttons & (1 << BUTTON_A):
print("Button A pressed")
if not buttons & (1 << BUTTON_SEL):
print("Button SEL pressed")
time.sleep(0.01)
@tidal kiln you around?
He's not around this weekend.
k. the yellow isn't a lie...techincally. ๐
but, i can put the question to anyone that wants to weigh in.
how would you handle this:
>>> fram[0:4] = bytearray(b'length>greater_than_slice')
>>> fram[0:4]
bytearray(b'leng')
>>> fram[0:15]
bytearray(b'length>greater_')
currently, the write length is determined by len(value), and not the length of the slice. So...
- raise an exception warning that value is longer than the requested slice
- don't raise an exception, and ignore writing anything beyond the length of the slice
๐ค
i reject that sentiment...
Actually you may be right, I guess rereading it, it's not as confusing as I thought.
I'd say raise an exception, all the LED libraries do.
hi, i have here sample of NINA B3 to test the CIRCUIT PYTHON ๐
But the LED library usage of slicing is really the extent to which I've done anything with slicing. So my thoughts on it may be scoped by that.
i am leaning towards one of them (trying to keep my bias out for now). thanks @idle owl for pointing towards some standard expectations; i was leaving that out of my thoughts.
I don't know that I would consider that a standard... it's simply the only example I know of. But that's good if it helps.
@slender iron is circuitpython-build-tools ready for another release?
if you think so!
haha. well, version & readme fix PRs are merged. so...i'll get on that i guess. ๐
unless you want that refactoring done before release.
Just wanted to make sure that I understand this. uart can only be used on the TX and RX pins as those are the only accelerated pins and there is no bitbang version of it. Is this correct? I'm on the Itsy Bitsy M4
@bronze shadow i think you can use any pin with an available SERCOM. i was able to do this on a Feather M0 Express:
uart = busio.UART(board.D11, board.D12)
TX/RX are D1/D0 on that board...
Alright. Thank you. I was a little confused as it was under the hardware accelerated part, but that makes sense. Is there an advantage to using the TX and RX then in any way?
although, since the Itsy uses a smaller package SAMD51..it may have more constraints.
Is there an advantage to using the TX and RX then in any way?
I wouldn't say so, since it's all using the SERCOM pads under the hood. But, someone smarter than me may have a better answer.
Alright. Having dedicated pins may just be a guarentee of 1 free lane to do that in maybe. The help is massively appreciated as always here.
So just tested to see if I could use RX as TX and vice versa, and that's definately not possible. I should probably pick diffenet pins?
TX connected to TX, RX to RX, but defined as flipped on one board.
did it give you an Invalid pins error? or is it just not working?
Just not working. Checked connections, and no issues physically.
I had them reversed and it was also working fine (tx to rx, tx to rx) But for reasons I can't explain, I need to connect to the same pins on both sides, and have them reverse role
I can use SCL and SDA if those are better pins
i'd have to step through the UART periph's SERCOM assignment to see if there is some collision going on, though the UART constructor looks like it should catch it...
Thought it finally errored, but the usb cable was pulled. Oops.
i need to order more M4s. only have a Metro... like i said earlier, the Itsy M4 may have more constraints because it uses the "smaller" SAMD51G (vs SAMD51J on Metro). the Itsy schematic has a note "SERCOM3: UART", but i don't see anything code-wise that is limiting it to just SERCOM3. ๐คท danh or tannewt would likely have better answers than i
hey, my st7735r in the feather display w/ seesaw is only displaying white, i'm using the stock rgb library and it is only showing white. however if I read a pixel it gives the sent color
any pointers? I'm out of things I can think of to try to fix it, Any and All help welcome! thanks either way
here is the code I am running
import digitalio
import board
from adafruit_rgb_display import color565
import adafruit_rgb_display.st7735 as st7735
spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO)
display = st7735.ST7735R(spi, cs=digitalio.DigitalInOut(board.D5),
dc=digitalio.DigitalInOut(board.D6),
rst=digitalio.DigitalInOut(board.D13))
display.fill(0x7521)
display.pixel(64, 64, 0)
print(display.pixel(3,3))```
@marble hornet hard to say without knowing more but that has a hardware-feel to it. I'd start by hunting for shorted or disconnected pins, make sure the CS pin is behaving, and that everything is wired up correctly
@solar whale Aha! The issue also occurs on a Sparkfun board AS7263
thanks btw! this gives me hoep
So i went back through and checked every connection and rewetted all thejoints. no change. I can only guess it is a code problem. do you know how to scan an i2c bus? im trying this: ```>>> import busio
from board import *
port = busio.I2C(SCL,SDA)
port.scan()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: Function requires lock.``` but it is not working. thoughs? @lime trellis ?
@marble hornet you need to lock the I2C bus:
>>> import busio
>>>from board import *
>>> port = busio.I2C(SCL,SDA)
>>> port.try_lock()
>>> port.scan()
@raven canopy thanks, will try
also, it will need to be unlocked afterwards. port.unlock()
what does locking and unlocking do ?
ensures that only one object & slave is being communicated with. otherwise, with multiple slaves on the bus, the bits could get smashed.
example would be hard to illustrate, without some serious commenting or visual aids.
while the master actaullly talks to one more than one of the slave thinks it is being talked to ?
@raven canopy , did you do any work with the epd lib?
i have not. don't even have an epd. yet. ๐
its sleepy time for me. ๐ค have a good night!
sleep well
Working feather joypad working joypad, working display
i got the display working
@marble hornet i used your code and it ended up working... changed st7735.ST7735 to st7735.ST7735R
still having issues with height and width, also when i tried using bitmapfont it writes words near A and B button, letters from A to B... so it needs to be rotated -90ยฐ
This uses the Feather nRF52840 tree as a base - haven't yet noticed any real issues aside from the 64MB QSPI flash not being accessible (which makes sense given NRF port doesn't have external flash support at all yet, from what I can tell)
Documented the "weird" bits of this device at least to some level. It's definitely a unique beast - so far it looks like it's the only board in the NRF tree that flashes with pyocd (I entirely skipped flashing hex files over the DAPLink MSC, but it's a...
The MX25R6435F is a 64Mb not MB, that is quite a difference, please use the proper unit in the description here.
Whoa, yep - that's.... not quite the same number. Updating.
Etch A Sketch for featherM4 with mini-tft-featherwing๐
@solar whale
@stuck elbow
Fixed in aefabc5 - good catch, thanks!
@upbeat plover Thanks for the updates -- nice work! I am still not getting very far with bitmap fonts. If you have an example that prints anything, would you minds sharing it. I must be missing something.
@upbeat plover ok -- finally some progress with bitmapfont. Now to figure out why this works and my previous attempts did not. Thanks for all your work on this!
@upbeat plover one thing I still find confusing is the screen orientation and how "x","y" are used in your etch-a-sketch example. If the joystick is on the left, AB buttons on right -- I would call up/down Y and right/left x. Just my bias ๐ Also, why do you have the 24 pixel offset for the x location?
Hi,
Is this a function that works? (I'm getting the idea it doesn't)
I have a problem with a PC USB port not switching off power and that was used to determine if other devices should be on/off.
isUSBconnected() would save a lot of hassle in this case.
The FAT dirty bit (https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system#BIOS_Parameter_Block) might be set to zero when a write transaction is complete, and could be used as an alternative to the 0.5-second time-based auto-reload detection.
On the other hand, this bit might not be set until an actual eject is done, in which case this won't work.
@No1089 you can use the following to determine if a USB serial connection is established:
import supervisor
usb_status = supervisor.runtime.serial_connected()
Since USB status is detected based on a serial connection, we named the function according to that.
Here is a link to the documentation: https://circuitpython.readthedocs.io/en/3.x/shared-bindings/supervisor/Runtime.html#supervisor.Runtime
@upbeat plover , thanks! your code works perfectly, and also with my modded library! thanks. can i ask where you found the information about the seesaw ?
@sommersoft I considered using serial_connected(), but the PC does not have a serial connection running, so would it still work?
The problem is the exhibit this is in, is 1800km away and I don't have access to a CircuitPy device until Monday. Thus I can't test my hypotheses.
@No1089, is it connected to the PC using a data-capable USB cable? You asked about checking if the filesystem has been mounted by the PC, which leads me to believe that it is. serial_connected() is based on the USB connection to the PC. It doesn't require that a separate serial terminal/program is running. Also, as is noted in the documentation, a USB disconnect after initial connect doesn't change the state of serial_connected(). It just isn't supported with the backend firmware.
If i...
@solar whale when i tried using bitmapfont it prints near A and B from A to B it needs to be rotated -90 but i am unsure how to do that, the display is very strange X is up and down Y is left and right.... Was confusing to code.
@marble hornet this arduino stuff was most helpful https://github.com/adafruit/Adafruit_Seesaw/blob/master/Adafruit_miniTFTWing.h
@upbeat plover my modded lib has rotation support I can share it with you later today
If you want
I tried 4.0.0 alpha 2 and used code from docs. I got "object has no attribute 'IPPROTO_SEC'" on "sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_SEC)". Am I doing something wrong or is it still work in progress?
@marble hornet yes please
hmm - I have been using usocket, but I just noticed that checking the installed modules I get
Adafruit CircuitPython 4.0.0-alpha.2-11-gb436666e8-dirty on 2018-10-20; ESP module with ESP8266
>>>
>>> help('modules')
__main__ esp ntptime uio
_boot flashbdev os ujson
_onewire framebuf port_diag upip
_webrepl gc pulseio upip_utarfile
analogio hash...
ah -- looks like a non issue -- socket and usocket are the same module in mpconfigport.h
#define MICROPY_PORT_BUILTIN_MODULES \
{ MP_OBJ_NEW_QSTR(MP_QSTR_esp), (mp_obj_t)&esp_module }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_socket), (mp_obj_t)&mp_module_lwip }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_usocket), (mp_obj_t)&mp_module_lwip }, \
...
#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
...
{ MP_ROM_QSTR(MP_QSTR_socket), MP_ROM_PTR(&mp_module_lwip) }, \
socket does...
@No1089 If you're mostly trying to determine whether USB power is being supplied or not (as opposed to a serial conenction being present), you could put a voltage divider (two series resistors) between the USB voltage pin and ground, and connect the middle to a pin set to be an analog input. Measure the voltage on the pin.The voltage divider could be two equal resistors (say 100k each), so the voltage would be 2.5V if USB is connected, and 0V if not.
anyone know if micropython/circuitpython is running on the TI MSP432?
https://github.com/BonifaceBassey/micropython/tree/porting-to-msp432/msp432 looks abandoned
Thanks @dhalbert. Totally forgot about using the USB power pin...
anyone know an alternative to calling pack on every pixel in a bitmap to pack a bitmap's worth of pixels?
hmm... maybe I can just write the packed version to disk...
here is the library, instead of 'st7735' as the lib name it is 'st7735r' and the class name is ST7735R and it supports x_offset and y_offset when you make an instance, i found 24 right x_offset to make the display work, and Rotation = 3 should do the trick. (i don't support negative input for rotation yet but i will soon)
@upbeat plover
@marble hornet is this a change to adafruit_rgb_display?
it isn't perfect. if you want it to work you need to put it in a folder called tg_modules, and put this next to it:
@pastel panther to the st7735 and rgb part of the adafruit rgb display
you should submit a PR if you think it would be useful
@upbeat plover ^^^^^^
@pastel panther , it isn't quite there yet (i think) b/c it doesn't work for all of the displays and my text method is occasionally buggy
well consider doing so when you have the kinks worked out
Just a question, not a request - is there any plan to include USB Host functionality on the M4?
@tough flax I think it's been discussed.. But probably far off...like post-ASF4 far off.
Ok - thanks
@sabas1080, gracias por las observaciones, algunos strings que seรฑalaste aun no los habia traducido, este PR solo es para actualizar algunos de los strings que ya estaban integrados en circuitpython, pero primero tengo que investigar porque se rompieron los builds de Travis.
Tengo otro PR abierto donde aรฑadirรฉ algunos de tus comentarios.
Por cierto, enhorabuena por la tarjeta de desarrollo que vas a integrar a este ecosistema, le comentarรฉ a unos compaรฑeros para ver si podemos pedir una...
Hi, just did a PR updating some strings of the Spanish translation and none of the Travis builds passed, i'm new to it so bear with me, i checked the build log and the failing test is
So i guess no *.exp nor *.out files are generated on the test directory?
@idle owl look! a thing! still need to make sure some of the random print messages (github, travis) get included...
(.env) sommersoft@thespacebetween:~/Dev/adabot/adabot$ python3 -m adabot.circuitpython_libraries -h
usage: Adabot CircuitPython Libraries Utility [-h] [-o <OUTPUT FILENAME>]
[-v {0,1}] [--error_depth n]
[-P]
Adabot utility for CircuitPython Libraries.
optional arguments:
-h, --help show this help message and exit
-o <OUTPUT FILENAME>, --output_file <OUTPUT FILENAME>
Output log to the filename provided.
-v {0,1}, --verbose {0,1}
Set the level of verbosity printed to the command
prompt. Zero is off; One is on (default).
--error_depth n Set the threshold for outputting an error list.
Default is 5.
I think I missed something a little while ago -- the Circuit Python bundle .zip now contains a (nearly) empty lib directory as well as the one with all the libraries in it beneath another directory named for the build. Is this how it's supposed to be?
@split ocean that was my fault. i missed updating the directory for the README when I added example bundling to the script adabot runs. the fix has been made, so it shouldn't occur going forward.
cool, thanks!
@split ocean other than the snafu, what do you think of the bundle changes? (also going forward, mpy versions will be 3.x and 4.x; no more 2.x)
is the other main change that there is the examples directory?
(point me at a release notes if that's easier!)
yep. main objectives are to allow import examples.some_simpletest to run the documented examples, and allow for easy access to a "building block".
I like the sound of that. I'll try some out. Thanks!
ohh, and all of this reminds me. @idle owl, this learn guide will need to be updated with the folder/example changes to the lib bundles: https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries
@raven canopy can you give me guidance on trying one of these import examples things?
oh, I see, you load on an 'examples' dir on the board itself. got it.
Here is the WIP of the bleio rewrite, it was done in July and August, but I rebased it on the current master, so not 100% everything will work out of the box, but at least this can give a good starting point for the ble work.
I tried to make the API as simple as possible, while still being robust and not limiting more advanced users. I think we could make a separate python API based on this one, like @tannewt suggested way back, so the users can easily create services alike Battery Service...
@indigo wedge thanks!
Thanks! Could you say a little something about how it differs from ubluepy and your thinking when making the changes?
This is intended to be compatible with Python 3.7's time.monotonic_ns. The "actual resolution" is 1ms due to this being the unit at which common_hal_time_monotonic ticks.
Testing performed: I built a firmware for metro-m4-express and flashed it. I then verified that time.monotonic_ns() returns a value 1e9 times larger than time.monotonic(), and the type is (long) integer.
>>> time.monotonic_ns(), time.monotonic()
(541832000000, 541.832)
I did not do any testing that ...
@raven canopy Send me an email to remind me to update the guide please.
can do
Thanks!
@marble hornet i got your example code, looks great like wow
@raven canopy did you figure out something from slices w/ FRAM?
for setitem? yeah. i just need to push the update. was kind of waiting for any additional answers to my long scrolled past question. ๐
switch to working adabot took my attention, too ๐ค
hmm...and just before i push, another question.
which is better behavior:
if val_len > (slice_start + slice_stop):
raise ValueError("Supplied value length is greater than memory slice.")
or
if not val_len == (slice_start + slice_stop):
raise ValueError("Supplied value length does not match memory slice length.")
i could be un-lazy and test...but, only just started โ # 2.
@raven canopy Also that's super exciting the Adabot stuff! (I was mobile earlier and didn't get to respond to that message)
PR is in for the first 2!
I see that!
I just learned that you have to reboot your CP device to see files you've written
I thought I was going crazy or had broken something
hehe. Ctrl+D is your friend! ๐
YOU CAN DO ANYTHING!
๐ฎ
kattni believes in me!
@raven canopy seems like the two cases to deal with are:
- slice smaller than value list
- slice larger than value list
both could be generalized to:
- slice size != value list size
whenever someone says 'tada', this sound, at this bitrate plays in my head
https://www.youtube.com/watch?v=QDUv_8Dw-Mw
I kind of want to record me saying it as lackluster as possible and send it to you to ruin your brain association.
@tidal kiln yeah. originally i realized that you could write beyond the slice. then after handling that, slice len > value len, popped in my head. i feel handling it as a generalized case works...
so many memories of Win3.1 tada...
it also seems a little redundant to need to specify the slice and also provide a list of matching length.
i wonder if we should just do something like:
fram[start] = some_list
so...don't handle/allow slice.stop?
>>> fram[start:stop] = ["Make", "coffee"]
Traceback:
I'm sorry Dave, you can't do that.
of for anything other than an int.
set index to 0x42
fram[index] = 0x42
set memory starting at index to hello
fram[index] = b'hello'
you're not allowing any fancy slicing of where things get written to on the FRAM - which is fine
@raven canopy finally is a thing? I didn't know that.
@idle owl it is. very handy too!
@tidal kiln i can accept no slicing on writes. chalk it up to over-zealous inclusion of coolness.
also...less code! haha
i'm not sure what the application would be, and i think dealing with it would add too much code
so the basic pattern is simple:
fram[index] = value
and behavior changes by simply checking what value is. index can only be an int and is taken as the starting address for the write.
we could say value has to be a list of some kind, even for a single value, but then users couldn't do this:
fram[index] = 0x42
they would have to do this:
fram[index] = b'0x42'
which i think looks a bit awkward for beginners
you gotta love when you come to your bench in the morning to continue your work from the previous night and nothing works anymore ๐
been there entirely too many times.
@pastel panther wait another 24, then it will invert again
@tidal kiln agreed. and with all of this setitem change, i believe i can actually drop the separate _write funcs. for both I2C and SPI. already handling isinstance for int and mutables...just need to marry them.
what i'm suggesting is a simplification from what you currently have, so if it helps clean up the code for the classes, then extra points
can you think of a reason to need to be able to use a slice for the index?
@pastel panther llol
@tidal kiln not precisely. and without extending slice.step, it makes even less sense to allow it.
now if I can just figure out how to flip these bitmaps into the correct order without using up all the memory on the m4...
@raven canopy i'm not either. currently.
there is so much going on with circuitpython at the moment, i could write 2 newsletters a week if there was time https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/_drafts/2018-10-23-draft.md
preview of this weeks'
I just found myself wondering if a board I have is running 4.0.0 Alpha 1 or Alpha 2. Is there/could there be a way to tell, say something in the INFO_UF2.TXT file?
and with wrap around, guess the list could be larger than the memory and it just keeps going round n round, but seems like a better idea to only allow len(value) <= fram.size
@raven canopy
@split ocean If you access the REPL it prints out the crrent version at start.
@split ocean look in boot_out.txt
thanks @solar whale thanks @tidal kiln !
^^ either one of those approaches, REPL or file
I was in bootloader mode, not where I needed to be!
boot.txt is even better!
@river quest looking great!
I made a thing in the thing! Yay!
๐
hmm - just noticed that my nrf52840 (Dongle) does not have a boot.txt file -- is that just a SAMD thing?
apparently not enabled for nrf -- who knew ? https://github.com/adafruit/circuitpython/blob/master/ports/nrf/mpconfigport.h#L246
@solar whale i was just about to put that link up... haha
Ran into this error running the Feather Waveform Generator code on Feather M4 running 4.0.0 Alpha 2 of Circuit Python:
File "adafruit_ssd1306.py", line 35, in <module> ImportError: no module named 'framebuf'
This error is not present with Alpha 1.
@split ocean framebuf was removed from the builds in 4.0.0 alpha2
@split ocean I am not aware of a workaround until displayio is ready -- other than requesting a build with it enabled. If you need one, I can make you one but it is not in the released versions.
@dastels wanna update the guide to indicate you need to use 3.X?
I have been running the following program on my m4 for a few hours:
a, b = time.monotonic_ns(), time.monotonic()
while True:
oa, ob = a, b
a, b = time.monotonic_ns(), time.monotonic()
if oa != a or ob != b:
print(a, b, a-oa, b-ob)
The time values have gotten big enough that differences of exactly zero are frequently seen in floating point timestamps, while differences of just 1ms can still be seen in the new integral timestamp:
11575209000000 11575...
@C47D entendido el caso de las observaciones :D
Gracias por los comentarios del meow meow, le falta memoria para aprovechar al maximo circuitpython pero es una opciรณn para iniciar xD
si necesitas ayuda en alguna revisiรณn no dudes en etiquetarme en el PR.
Ahoy! Does anyone know of a list that contains every possible circuitpython command for the CPX? E.G. all the commands for music etc
hey @idle owl What do you think about the idea of a "here's what's not working/is changing" in 4.x" mini release notes? I just saw JP's issue on not being able to access framebuf and thought that similar questions come up a fair amount and could be quickly addressed or prevented with a few lines of text on either the releases page or the main README
I like the idea, I question where to put it. Release notes make the most sense, but I feel like it should have been included already, why wasn't it?
Currently, to make text appear on an SSD1306 via Circuitpython you'd have to follow this tutorial: https://learn.adafruit.com/micropython-displays-drawing-text/software (some might think this will not work for Circuitpython), update a local copy of: https://github.com/adafruit/micropython-adafruit-bitmap-font to use struct vs ustruct
whats the best way to approach? https://github.com/adafruit/micropython-adafruit-framebuf/pull/4#issuecomment-368594803 suggests to do this via micropython-adafruit-bitmap-font (see also: https://github.com/adafruit/micropython-adafruit-framebuf/issues/2)
This resolves #2, with a caveat: The code I've written uses far more memory than my testing devices have. I successfully tested by removing several unused (in the test string) characters from...
@tawny creek just to clarify, the adafruit_circuitpython_ssd1306 driver imports framebuf so I guess you have to also install the python version of framebuf first.
@solar whale yep
- Copy adafruit_ssd1306 circuitpython lib + framebuf (https://github.com/adafruit/micropython-adafruit-framebuf) to device
- Copy
font5x8.bin,bitmapfont.pyto device, editbitmapfont.pyto usestructvs.ustruct
now trying to figure out why it only displays 3 characters max
thanks @solar whale I haven't run into this other than @umbral dagger learn guide.
no need for a special cut.
@tawny creek this works ```from board import SCL,SDA
from busio import I2C
import time
Import the SSD1306 module.
import adafruit_ssd1306
import bitmapfont
i2c=I2C(SCL,SDA)
display = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c)
display.fill(0)
display.show()
bf = bitmapfont.BitmapFont(128, 32, display.pixel)
bf.init()
bf.text('Hello, World!', 0, 0, 1 )
bf.text('Hello, World!', 0, 10, 1)
bf.text('Hello, World!', 10, 20, 1)
display.show()
time.sleep(2)
display.invert(True)
time.sleep(2)
display.invert(False)
time.sleep(2)
display.fill(0)
display.show()
yay was using:
# Define bitmap font bf = bitmapfont.BitmapFont(15, 7, oled.pixel) bf.init()
doh
i recall doing that in the past
thanks for looking into this, the guide could be updated to include this ๐ค
@idle owl should we enable travis for the ADXL34x repo?
yes- bitmapfont.py should be modified and re-relased and the guide updated if we are going to use this as a work around until displayio is available. I think the intent is not to encourage use of framebuf.
@tidal kiln Probably
@solar whale awesome gotcha!
I can access my CircuitPython devices (Trinket M0, Gemma M0, CPX, Itsy Bitsy M0) as CIRCUITPY on Win7. Why can't Ifind it on my Android phone and tablets?
I get the USB notification Unsupported ATMEL USB drive
(using just one of them for the other side) when I double-reset, I can get the TRINKETBOOT drive on Android but it shows instead as /storage/0042-0042
Gracias @sabas1080, el otro PR ocupa mucho trabajo asรญ que seguro necesitarรฉ ayuda con reviews.
Saludos
I will close this for now and leave things as is. I believe there's no overlap right now. If necessary we can change the way tinyusb finds nrfx.
@klardotsh Do you have a commit in your repo that provokes the problem? I'd like to test against it.
@upbeat plover thank you, I'm flattered
Anyone know anything about the CircuitPython/Android problem?
@dusty plinth as I understand it, not all USB devices are the same. Someone more knowledgeable will have to provide details, but I donโt think it will work at this time.
@dusty plinth The problem is that Android doesn't have support for the FAT12 filesystem, which is the tiniest (<16MB) variant of FAT -- originally used for floppies, etc.
there are one or two apps that do support FAT12 -- I'll try to dredge that info up
@dusty plinth There's some discussion of issues mounting CircuitPython drives on Android, here: https://forums.adafruit.com/viewtopic.php?f=60&t=127765&p=636547&hilit=android+circuitpy
why does the other side (TRINKETBOOT) work?
shouldn't they both use the same filesystem (simpler than handling 2 filesystems in the firmware)?
I'm not quite sure why the UF2 filesystem works, but it's a completely different codebase, and the UF2 ...BOOT drives are "fake": they just simulate a filesystem: you can't store arbitrary files on them.
I've thought about having our FAT12 filesystems report as FAT16 with a very large number of bad blocks (you can mark blocks as bad), but haven't tried that yet.
@tidal kiln during a "final" review before pushing FRAM updates, i realized that changing read() to read the entire buffer before returning the value (Scott's suggestion) breaks slice.steping. thoughts? drop step, or read byte-by-byte when step is provided?
@raven canopy i'd say drop it for the initial release. it's sort of a fancy feature that can be added later if use cases for it start showing up.
ahh..GitHub is having some issues. put some wear on that F5 key... haha
hmm -- is github suppressing comments ??? just posed one , but don't see it
I Got an email from someone else posting one and I don't see theirs either.
I thought it was me
seems like someone shouled post an issue ๐
Actually I got three emails with the same comment, I thought GitHub sent them, I'm betting the poster posted it three times because it didn't show up.
lol
argh -- reposted --- now both show up!
From reading the Linux kernel source, it appears to only clear the dirty bit on unmount. However, I didn't actually test this.
@idle owl from me? i tried 3 or 4 times... ๐
GH is going on about 3 hours of "disrupted service".
FYI - the current guide says 3.x does not works and 4.0 must be used!
I think that's right, and is also true on Windows. There's a command-line utility (fsutil) which is supposed to report the state of the dirty bit, but I'm getting completely incorrect results from it.
Good night all! ๐ค
@raven canopy Nope :)
:phew: guess it was full broke when i put mine in...
github has been pretty flaky for several hours
those comments above seem to have been lost from the issue, at least for now
yep. status has been full red since 18:13 CDT.
@C47D and @sabas1080 I've invited you two to be collaborators so you can review, approve and merge translation PRs without me. Thanks!
well, GH still flaky, and the two pushes i have are affected. guess i'll just have to wait to see if they got through, and call it a night...
yup, me too
lol. 4 of my issue comments just appeared. 3 of which were triplicate. ๐
oops, will do my work tomorrow
@sommersoft Thanks. I'll look into it. There is a button input that I'll poll for a couple of seconds and then do a reset before checking serial_connected() again - will this work? The device remains powered externally to enable it to detect the PC power state, so I would need to force a restart.
@dhalbert I'm using the USB power pin to check power, but the motherboard keeps feeding power to USB, and there is no setting in BIOS to turn it off. Smart devices don't charge, but the itsybitsy ...
https://nbviewer.jupyter.org/urls/gist.github.com/ChrisBeaumont/5758381/raw/descriptor_writeup.ipynb
Hey All, got a question about urllib? I'm unable to import it for some reason.
Do i need to have the urllib.py file uploaded to my board?
it seems to be a core library in micropython: https://github.com/micropython/micropython-lib/tree/master/urllib.urequest
@nocturne sluice yes, youโll have to upload it to your board. It is not built into CircuitPython.
@solar whale
yeh I did but for some reason I'm still getting errors
I manages to import it but cant use any of the functions
@nocturne sluice can you post the error here?
uploaded this file to my board:
https://github.com/micropython/micropython-lib/blob/master/urequests/urequests.py
im using the REPL to test
import works
but then when i try to do
urequest.request("GET","http://google.com")
I'm getting:
AttributeError: 'module' object has no attribute 'request'
Thanks!
I'm working with an ESP32 running MicroPython
Thanks!
@nocturne sluice urequests should be a core module ```
MicroPython v1.9.4-665-g7795b2e5c on 2018-10-21; ESP32 module with ESP32
Type "help()" for more information.
help('modules')
main framebuf socket upip
_boot gc ssl upip_utarfile
_onewire hashlib struct upysh
_thread heapq sys urandom
_webrepl inisetup time ure
apa106 io ubinascii urequests
array json ucollections uselect
binascii machine ucryptolib usocket
btree math uctypes ussl
builtins micropython uerrno ustruct
cmath neopixel uhashlib utime
collections network uhashlib utimeq
dht ntptime uheapq uzlib
ds18x20 onewire uio webrepl
errno os ujson webrepl_setup
esp random umqtt/robust websocket
esp32 re umqtt/simple websocket_helper
flashbdev select uos zlib
Plus any modules on the filesystem
yeh importing urequestss also works
but I don't really inderstand how it works compared to regular Ython3 urlib.requests
>>> urequests.request("GET","http://google.com/%22")
<Response object at 3ffe7360>
Sorry -- I'm not familiar with urllib.
ok I'll keep playing with it
or really with micropython for that matter .. I just knew that urequests worked ok.
good luck!
thanks!
sir, can you give a good link to test python ble examples BLE on NRF52832 ?
@tepid sapphire here is one example to scan for BLE devices -- BLE under CircuitPython is undergoing significant development at this time. The API will likely changes soon. Here is a link https://github.com/adafruit/circuitpython/blob/master/ports/nrf/boards/feather_nrf52832/examples/ble_scan.py
i am support to u-blox to nina b in Brazil and i want to make the Circuit Python the official programming language to our clients
i am working to Smartcore.com, u-blox representative
i have a question
will circuit explore libs and drivers of nordic sdk ?
I submitted a PR to micropython-adafruit-bitmap-font to add the test for struct vs ustruct. It seem like this may get more use now since framebuf is not available. Anyone using it has to modify it to import struct as ustruct so this will simplify. I can't assign reviewers so please take a look if you are interested.
Well, I tried to submit a PR -- but github is still a bit flaky -- hopefully it will appear soon.
ah -- it appeared https://github.com/adafruit/micropython-adafruit-bitmap-font/pulls
@idle owl or @tidal kiln can you turn on the pylint checks for the adxl345 repo?
Yeah
^^ that
@pastel panther Last time I did this in the middle of a PR, there needed to be another commit to trigger a build.
It's activated.
that's fine, thanks
is there anyway to not require that commit-after-turning-on-travis?
If travis is anything like jenkins/hudson it would mean changing the confit to poll for changes instead of triggering off a commit
Oh hmm. Yeah ok. I think I know where that would need to happen as well. But I don't think it's a change we're going to make.
I think it would have to change with the GitHub token setup.
i'd hope/think they could offer a manual GO button through their GUI dashboard or somewhere
Oh... yeah there is that. But it doesn't work with PRs, afaict. It works only with master.
@idle owl I don't have them yet. Will try to run now. Been waiting for github to be happy
@slender iron Ok. I wanted to start filling in my hug reports and so on. No rush.
Thanks!
@stuck elbow oooh waz that?
@meager fog a barrette with plugs for connecting ears and leds and whatever else you want to have on your head
@meager fog project page: https://hackaday.io/project/160167
how adorable ๐ great bolt-on technique
@stuck elbow neat! how heavy is it?
@tawny creek 40g without the battery, battery is 8g
@stuck elbow is that an 18650?
no, that's AAA
but it's a lipo
I know, weird, just what I had at hand, you can use a regular silver lipo instead
Personally I prefer the cylindrical cells when you can as they strike me as a bit more robust
yeah! this
and easy to replace to charge in a more advanced charger
but with the AA and AAA batteries there is a risk of confusing them with the regular alkaline ones and breaking something
normal battery casing, I guess, same as the alkaline ones
@stuck elbow what are you planning to use as thin wire for the earrings?
magnet wire
just not too thin, because they do take some current
for the necklace I'm using some very flexible cable from old headphones
can see this being clipped on a shirt like the iron man core
it really works best on your head, either as the hair clasp, or on a hat
because then you can use all the sensors to make all the things do stuff
but yes, the CPX itself is perfect for ironman cosplay
@stuck elbow thanks for the answers! thinking about last minute halloween stuff >:)
is it already that time? how the time flies
hey @slender iron I'm currently working on some code to load bitmaps from files and display them with adafruit_rgb_display; is my work going to be superseded by the displayio work your're doing once flexible display support is done?
ya, probably
das cool, I expected as much but I really wanted to see a pretty flower on my new screen
bitmap loading works with displayio on the hallowing. I just gotta get back to external screen support
you could hack the hallowing board build for your setup
true
ooh which new screen @pastel panther ๐
@tawny creek https://www.adafruit.com/product/1480
just the perfect size
was thinking of making a mini game thingy with that screen/screensize
I'm currently sending it 565 encoded pixels but I think it should support the pixels of the beast
beast is your new board?
no, it's a stupid joke
does the NRF52840 need a serial to uart ic?
you mean the 18 bit color vs 16?
it costs a full extra byte to transmit though ๐
@tawny creek so 666 vs 565
will displayio support custom fonts ๐
eeew..
@pastel panther LOL or 555
can you use something like a coprocessors for graphics?
if we had one
I think a small gpu on the ice40 would be cool
This demo shows my graphics co-processor board for the Arduino Uno R3. The co-processor is based on an STM32 F0 overclocked to 64MHz. Please visit my website...
something like this?
I was thinking about this with my game console, but in the end I got the main mcu to update it fast enough
I was thinking about using esp8266 for handling the screen and communication, and the samd21 for the user programs
<@&356864093652516868> Meeting in ten minutes or so!
Ahoy!
Only text for me today
Ever used VMIX? @slender iron
It's a better OBS with more features
Pimoroni use it for their Bilge Tank show
You guys heading to PyCon next year? @slender iron
Blue circuitplaygrounds?
@candid stump is a lurker
Looks like no Google Doc this week for me to fill in for you, so since I'm at work and can't talk (can't WFH on meeting days ๐):
Hug report again to tannewt for putting up with my increasingly-in-the-weeds questions and bug reports. Also a shout-out to arturo182 for reviewing my PR 1286.
What's new: finished a huge refactor of the KMK keyboard firmware project (I can now max out my personal typing speed ~100 WPM rather than it getting tripped up at 50WPM or so ๐), and added a bunch of neat more-advanced functionality to it. Found and reported a possible deadlock (and sometimes soft-brick) in CircuitPython (issue 1283). Finished my pinout/"port" of CircuitPython to MakerDiary's NRF52840 MDK board, submitted as PR 1286. This week: going to finish PR 1274 (modgzip/uzlib stuff), hopefully really make a repro scenario for 1283, and even more hopefully add zip module support once 1274 goes through.
Adafruit CircuitPython Weekly October 22th, 2018 Video is available here: Thanks to @kattni for taking notes! 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 notices of...
Not sure if i'll make it yet. It's like $2,500 if you book it now for 2 people
Aw, I'll miss PyCon because I'll just be getting home from VEX Robotics World Champs (a week worth of it...) a day or two prior :\
re pycascades: oooooh. Depending on the day in Feb I should be free ๐
feb. 23-24 on UW campus
Just lurking today
I have no headphones so I'm text only today; I'll put my stuff in the docs
@pastel panther Thanks!
sorry for being late
np @stuck elbow
Hi, I have a chance to listen today for the first time in awhile. Hug reports to everyone reporting and working on issues!
@slender iron Don't forget to read out @pastel panther's hug reports from the notes.
๐
Found a way to get download stats for pypi packages: https://pypistats.org/. has an API we can call too. impressive numbers on the packages I looked at
sorry if they were late!
nice
They weren't late! He's going in alphabetical order.
Hi, I have a chance to listen today for the first time in awhile. Hug reports to everyone reporting and working on issues!
General group hug this week. It's amazing to see and hear about all the amazing things people are doing with CircuitPython. It certainly is evolving quickly
Just lurking.
I have to go, ttyl everyone! Have a great day ๐
kk. bye @pastel panther !
@cater, @tannewt, @kattni for continued review and discussion on FRAM.
@kattni for catching a couple things I missed on adabot changes.
Group hug!
weeds -- clarify 3.x vs 4.x bundle?
I have no staatus updates
@solar whale It turns out the mpy-cross version has coincidentally matched the CircuitPython version - i.e. the current version is 3.x which matched CP 3.x. Well, the current version is still 3.x, however, the coincidental association has been made in people's minds, so we've made a 4.x bundle to match CP 4.x, so there is no confusion as to which bundle to use with which version of CircuitPython.
(this has been held up by my day job, for reasons which are incomprehensible to anyone not following Australian politics. I'll get on with it soon.)
oooooooooo, that looks mega cool!! @meager fog
@idle owl so 3.x and 4.x are identical?
@solar whale Yes.
yeah, definitely will use midi stuff when it eventually shows up. :)
@meager fog speaker thing?
@meager fog is that a game wing for the hallowing?
is this record attendance? 17? plus some lurkers?
close I think!
for my recent work for I2C support of BeagleBone Black in Blinka
https://github.com/adafruit/Adafruit_Blinka/pull/42
The midi stuff will help me with my new project
I developed these changes using an Adafruit BME280 breakout board wired up to P9.19 (SCL) and P9.20 (SDA) and the Adafruit_CircuitPython_BME280 library
Please note that this is just preliminary support. I2C support in Blinka on BeagleBone Black requires hard-coded workarounds in the following libraries.
- Adafruit_CircuitPython_BusDevice
- Adafruit_Python_PureIO
I still need to resolve the root cause and find an acceptable solution.
The biggest challenge for me right now is related to:
Adafruit_CircuitPython_BusDevice
The current behavior is to do a blank write to the I2C address: i2c.writeto(device_address, b'')
This causes a write error on the BeagleBone Black
nothing to report thanks
@idle owl @tidal kiln heya i dont think the slideshow was tested when files are not in /
i changed the code to self.file_list = [folder+"/"+f for f in os.listdir(folder) if (f.endswith(".bmp") and not f.startswith("."))]
please update the library and be sure to test each option not just defaults
@meager fog Ok, yeah, I think you're right.
@onyx hinge did time.monotonic_ns() !
i am lurking, but want to let you know I submitted a PR to the mu editor to add a "Run" button and copy lib files to CIRCUITPY if the files are not already stored on CIRCUITPY. Works great with source code management. We are actively using this with kids at our maker space. The PR is https://github.com/mu-editor/mu/pull/485
This week i've been working on upgrading EduBlocks to use the new Scratch blocks style which is more optimised for touch (blocks are larger with a bigger touch point), which will hopefully help when we get bluetooth working. Includes nice fields like sliders and workspace comments (like sticky notes) too for a better experience. A public BETA will be released this week.
@indigo wedge are you around soon?
yes
FRAM Library: I2C is almost done. I hope. ;D
CircuitPython build tools: fixed README.txt placement in zip file.
Adabot: initial command line args for log output and error depth PR'd. Awaiting confirmation on "disable prompt" issue; will work.
This Week: Update Welcome To CircuitPython learn guide with new library bundle info (examples, versions). Adabot/Travis cron research discussion.
And, time to re-focus on FrequencyIn.
IN THE WEEDS (but I give priority to BLE)
- library file/folder layout for i2c+spi things
- class vs. instance level buffers
- kicking travis without committing
just lurking ๐
No, I just switched from ipad to computer....
late hug report for @tidal kiln @solar whale for all the help with display / sensor stuff i've been poking around in recently
๐
RPi-GPIO
Yep
Gpiozero
It runs RPi-GPIO underneath though
Ben Nuttall ( @ben_nuttall on twitter )
cool, i'll dig into that. thanks.
is the issue on the Blinka repo?
Famous last words...
adafruit_sensor.py
class Sensor
class Sensor_I2C(Sensor)
class Sensor_SPI(Sensor)
adafruit_sensor/
sensor.py
i2c.py
spi.py
there's not to my knowledge an issue filed anywhere yet - i'd just run into the rpi-gpio dependency a handful of places and wasn't sure whether it was a platform-specific thing.po
will dig.
re: libgpiod python bindings, https://github.com/brgl/libgpiod/tree/master/bindings/python/examples
NOTE - the project is now hosted at kernel.org, this repo may not be up-to-date. - brgl/libgpiod
@gusty kiln @fierce girder would be good to start a new issue to document this
yep, i'll file something after i do a bit of investigation.
this is uses the correct way going forward to do GPIO on Linux, which is to use the new character device, instead of the deprecated sysfs GPIO directory
in the blinka repo. I think one issue is that pypi is not good at platform differences
@No1089 You may know this already, but you can force a reset with microcontroller.reset(): https://circuitpython.readthedocs.io/en/3.x/shared-bindings/microcontroller/__init__.html
it might be different for the very first build
Got another meeting. :๐ ๐
It was nice to drop in, ttyl!
@gusty kiln @slender iron re: Blinka and GPIO on Linux, https://github.com/adafruit/Adafruit_Blinka/issues/43
I want BLE for EduBlocks on the CPX ๐
It'd be nice to click a button and your code upload onto the CPX
thanks! Great discussion!
exciting :)! 
๐
Hexlify is what micro:bit uses
I have to run -- looking forward to this. ๐
I've not been here for the whole BLE conversation, is the idea to have the circuitpython boards get flashed by Bluetooth?
Ahh, yes, i think @slender iron mentioned this at PyCon
micro:bit does it via an app
Gotta dash, thanks for a great meetup again!
lunchtime here as well, back in about 10.
There's no commit for it explicitly (it got rebased away when I was squashing down my then-WIP branch), however removing everything above line 37 in https://github.com/KMKfw/kmk_firmware/blob/master/kmk/firmware.py (master branch of KMKfw/kmk_firmware) should trigger at least the RuntimeError - not sure if it repros the deadlock (it may?), and I didn't end up with time this weekend to construct an independent repro example, sadly.
Flashing instructions for KMK are available at https://gith...
@slender iron @idle owl what generates the stats about downloads, etc? I see some scripts in adabot but not all? Was going to add an issue about a source for pypi download stats.
@tulip sleet No idea ๐
ok i'll put it in adabot. ๐
Oh you meant that generally... I thought you meant specifically what part of Adabot generates it. Yah put it in Adabot.
<@&356864093652516868> Here is the meeting recording on diode.zone: https://diode.zone/videos/watch/d89b7f1e-0c80-413e-88d6-a4468ef9a94d
Notes with time codes are available here: https://github.com/adafruit/adafruit-circuitpython-weekly-meeting/blob/master/2018/2018-10-22.md
Thanks to @kattni for taking notes!
Join here for the chat all week: http://adafru.it/discord
The weekly happens normally at 2pm ET/11...
@slender iron Just a thought. But do we really need a pinned message for all of the meetings? Maybe only the most recent one, and put the rest into a google doc or something? There's a lot of pinned messages, and it's really hard to sort through them.
ya, totally. I just need to delete them all.
the notes repo is a central place plus the playlist
@tulip sleet downloads comes from the adabot libraries script: https://github.com/adafruit/adabot/blob/master/adabot/circuitpython_libraries.py#L760
goes for run
HCI is a binary protocol that can be sent over a serial connection, SPI, or via an API. Its messages control a BLE device. It is implemented in the nRF Softdevice, and is also provided on many standalone BLE chips.
We could use HCI as the lowest-level part of a CircuitPython BLE implementation. For example:
- Specific service providers (highest level) - implemented in Python
- Classic BLE API: Service, Characteristic, Peripheral, Central, advertising, etc. - implemented in Python
3....
Is there a circuitpython library to read image files? I am looking for something to convert a png file (of a font) to a matrix so I can display it on a 16x8 LED display
Hi all,
I'm also interested in a better timer. I'm more interested in knowing how long it takes to execute stuff. So, a read-only timer, to the usec would be very useful.
I've been playing with this and just realized that time.monotonic() is only good to 1 decimal. But, learned that is dependent on time since last restarted or reset(?)
Just wanted to chime in to say that I am also looking for the feature.
Thanks,
-Parsko
@keen maple PNG files are harder to read with microcontrollers, and I don't even know of any Arduino libraries to do it. CircuitPython, being newer and less well-known, almost certainly doesn't have any.
BMP files, on the other hand, are fairly well known. And I know there's some support for loading of them.
@cunning crypt Cool, PNG to BMP conversion is easy to do before it is loaded onto microcontroller, so I will have to look into that. Thanks!
Exactly. 24-bit BMP is what's used for ARduino and is fairly simple.
I'm ok with this. My one concern is if there are any gotchas in our 3.4 support that will break with folks using 3.7 instead of 3.4. Anyone know of any of these?
Reference midi controller from value village: $3 ๐
Results of @slender iron going for a run.
๐
๐ = -๐ต
Oh hey, @raven canopy wondering if you could add an optional thing to Adabot to run a check that compares all Adafruit_name libraries to Adafruit_CircuitPython_name libraries and spits out the ones that don't have a CircuitPython repo? i.e. checking to see which hardware has an Arduino library and doesn't have a CircuitPython library.
No idea what would be involved in that.
trying to clean up a memory leak at $DAY_JOB but instead it turns out I wrote an infinite loop .. well .. infinite until it exhausts RAM+swap anyway, since it was also leaking on each loop. ๐ข C++ is hard.
guess i'll start over...
@onyx hinge So, you tried to solve a memory leak, and caused another?
@cunning crypt that's right!
It was a leak leak.
"This leak won't be a problem anymore."
@idle owl should be doable. may start bumping API request rate limit though. being a paying org, the rate limit is high, but i'd like to look out how it can be structured to minimize requests so it doesn't interfere with normal adabot requests.
@raven canopy When I Say optional, I mean seriously optional, as in you have to explicitly ask it to run. I'm not sure it's worth having it run every time.
@raven canopy @idle owl Realistically, it would only really have to be done once. Get a list, and then you can go from there.
Another CLI option that includes it.
@cunning crypt Well we could miss one in the future and the check would be handy to have
Run it every so often.
True
yeah no, i got that. but some of the rate limits are daily reset. iirc.
Wait, is that the blah checks left this hour thing that it shows when you run it?
yep
Ah ok
i'd have to look at it again though. the rate limits are "dependent" on the query i think.
OK, so. I poked.
Script to list all repos for a github organization - list-all-repos.py
I'm not sure if that uses the API
fooey. Travis wants another commit to run the commit i pushed last night while GH was down. ๐ฆ
But if it doesn't, that could totally be used to do it manually. Scrape the list of all repos, then do local comparisons
And we do what Travis wants. ๐
@cunning crypt i don't think we use the same GitHub python module, but yeah i suspect it uses the API
"we" = Scott wrote it...i only make changes. ๐
@tidal kiln for when Travis finishes: https://github.com/adafruit/Adafruit_CircuitPython_Slideshow/pull/8
https://docs.python.org/3.7/whatsnew/3.7.html
I think biggest deal in 3.7 is: "the insertion-order preservation nature of dict objects has been declared to be an official part of the Python language spec". In other words regular dicts behave like OrderedDicts. They already did before 3.x but were not defined to be so. This behavior is not true in MicroPython/CircuitPython, and already didn't match the (not specified but existing) behavior before 3.7. So I'd say this is not something to w...
@raven canopy Wait I can retrigger Travis...
I think
If that's what you're referring to
tried that. its stuck on the previous commit...not the new one.
cest la vie.
i'm sure there's something i missed in last night's push. just gotta find it. ๐
See the "Trigger Build" answers especially
@idle owl i could have brought this up in the weeds today, but it was a weird day for me and the weeds were full today anyway. when i was testing examples in bundles, i noticed A LOT of non-simpletest/non-product file names. should we double back on that, to ease usability?
@tulip sleet to the rescue! maybe a close and reopen is easiest?
well, look for Trigger Build, also see the answer about "Test Service" from GitHub
i don't got them kind of rights on the repo... ๐
dinner has arrived!
@raven canopy which repo?
looks like Travis ran on latest commit
nope. i pushed one last night while GH was having its mood...Travis ran the commit prior to that one.
hehe. i was getting there. discord on one system...everything else on the other. ๐
this is latest commit, right? clean up slicing; PEP8isms
yep
it ran something on that commit ~18min ago
https://github.com/adafruit/Adafruit_CircuitPython_FRAM/pull/1
hmm. that was a half GH fail. i was going off of code...which doesn't match the local code for that commit.
so...my fork shows the correct code on the commit. the adafruit repo show the commit hash...but not the updated code. ๐ต
weird. something must have gotten out of sync during the anomaly.
correction: the PR shows the correct code as well. but, when you open the commit link from the travis run...its wrong.
this is so confusing. dinner...then Travis battle. โ
@raven canopy ping me if you need help when you get back to it, but i'm also not sure how it got to be like it is
i might try the empty commit trick in Dan's link... looks like travis is out of sync on the commit tree.
@idle owl merged slideshow pr
@slender iron Can you explain how UF2 works outside the bootloader? Should we go to PM?
here is best. uf2 is a bootloader only thing
I don't know what you mean "outside the bootloader"
oh, I thought files could be dragged and dropped anytime
well python files can but not uf2s
I see
@tidal kiln Thanks!
@margaret Thanks again for starting this work. I'm closing this PR because we just merged in time.monotonic_ns support which is in CPython 3.7.
Another member of atsamd-rs was under the impression there was a firmware resident in memory post-bootloader that allowed UF2s to be downloaded anytime.
@sabas1080 You already had I think. I'll merge now and feel free to do it yourselves next time. Thanks!
wow look at you go ๐
sings the merge song
There's a merge song?!?! ๐ฎ
Is that like the free software song? ๐
ยฏ_(ใ)_/ยฏ
My boards came! ๐
yay!
works with linux out of the box
speaking of boards-in-the-mail, anyone got any update on pre-order Particle Mesh boards shipping?
nope, I ordered some as well
I have rust running over uf2
it requires a lot of manual work at the moment but I plan to automate it
man, where does time go.
Fleeting away
boo crashes ```
#0 HardFault_Handler () at supervisor/port.c:306
#1 <signal handler called>
#2 mp_decode_uint_skip (
ptr=0xffffffff <error: Cannot access memory at address 0xffffffff>)
at ../../py/bc.c:70
#3 mp_execute_bytecode (code_state=0x2002fe70, inject_exc=<optimized out>)
at ../../py/vm.c:1385
#4 0x00000000 in ?? ()
So I am actually trying to install MicroPython on an ESP32 and I keep getting this error:
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57```
I know this channel is for circuitpython but they are similar.
@haughty bobcat I see that sometimes as weel -- but it then continues on and boots ```rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4768
ho 0 tail 12 room 4
load:0x40078000,len:7496
ho 0 tail 12 room 4
load:0x40080400,len:5512
entry 0x4008114c
I (403) cpu_start: Pro cpu up.
I (403) cpu_start: Single core mode
I (404) heap_init: Initializing. RAM available for dynamic allocation:
I (407) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (413) heap_init: At 3FFC4F78 len 0001B088 (108 KiB): DRAM
I (419) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (426) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (432) heap_init: At 40091604 len 0000E9FC (58 KiB): IRAM
I (438) cpu_start: Pro cpu start user code
I (9) cpu_start: Starting scheduler on PRO CPU.
connecting to network...
hmm
well mine never boots
just tried an arduino script and it compiled and uploaded fine
Is it possible to use SWD on a CPX?
for a debugger, yes. as a GPIO, i don't think so.
where are the pins?
thanks
@tidal kiln Travis woes un-woed!
woe = not woe
ahh man. i'm sitting here with tunes playing...need to catch up on the parts of the meeting i missed. ๐คฆ
The backtrace cannot be given because it relies on the validity
of the qstr data structures on the heap which may have been
corrupted.
In fact, it still can crash hard when the bytecode itself is
overwritten. To fix, we'd need a way to skip gathering the
backtrace completely.
This also increases the default stack size on M4s so it can
accomodate the stack needed by ASF4s nvm API.
@raven canopy did you have to do anything other than push a new commit?
nope. just needed to get Travis back on the tree i think. that outage has probably caused a bit of out_rage_ today...
hooray for unintentional pun!
@raven canopy The first rule of being a punner: Always claim puns were intentional. It makes people think you're a better punner without much effort.
Hi
We've portd the board MKR1300 to Circuit Python
Thanks
Since this is a very bad error, we should probably also say something like "Please restart" or "Please type ctrl-D". The heap may be damaged and may not be safe to do anything else
where does the neopixel_write module live? is it part of circuitpython?
answered my own question https://github.com/adafruit/circuitpython/blob/3177e10e9e7b6ce720ca4cd0a952c884c876bcd6/ports/atmel-samd/common-hal/neopixel_write/__init__.c
what's with all the nops?
timing
neopixels are more complicated than adafruit makes them look ๐ซ
I have two colours working: white and yellow
See Zephyr project: https://github.com/zephyrproject-rtos/zephyr
They've already implemented HCI over serial, SPI, USB, etc., also for the nRF.
Micropython can run on top of Zephyr, I don't know if that port is still alive in circuitpython.
We've discussed using Zephyr or MyNewt as well, but that's a major change and probably for a later version (some discussion in the audio above). Zephyr and MyNewt have support for the chips we support, but it's not complete - we'd have to port our current drivers into the RTOS's driver structure.
@idle owl should I initiate a release for the adafruit_circuitpython_dht library that was updated yesterday?
@idle owl sorry for the duplicate posts -- first went to wrong channel
you guys need to look at @marble hornet 's RGB font and ST7735R it works great, the rotation feature is needed for both miniTFTwing and the hallowing display
^ that my grow room tool to visually see if VPD is in good range
@upbeat plover think it is worth doing a pull request?
But it is only for the st7735r
well if you could get it for st7735 too then the hallowing will work right aswell
I'll see when I am free
The halliwinh uses the r, I thought. Just not the lower 32 pixels
๐คทโโ๏ธbut I don't have one
={
all i know for sure is hallowing needs rotation of 2
everything upside down for it
Did the tg-rgb work ?
i havent tested your mods with hallowing yet, ill do so today
when i used bitmapfont from micropython it printed text upside down
@solar whale Yes please! Or let me know if you can't and I'll take care of it.
I'll give it a shot
@idle owl seems to have worked -- let me know if I missed anything.
I couldn't find Hallowing under the README so I thought it should be put in. Follows the same format as the other board (product page + circuitpython guide)
@solar whale Looks great, thank you!
Completed changes suggested @tulip sleet https://github.com/adafruit/circuitpython/pull/1296
@tulip sleet https://github.com/adafruit/circuitpython/pull/1282
Hello, has anybody had their device stuck in read-only? My HalloWing CIRCUITPY is trapped and I can't modify it.
@steel vale this is usually becuase the filesystem has become corrupted. See https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#circuitpy-drive-issues-18-13
Yes, I tried copying the python file to wipe the drive and I can't because it is stuck in read-only.
can you access REPL?
let me see
btw I'm not using Mu because there is an SHA mismatch error right now when trying to install it. I'm hoping they'll fix it, soon. I'm using sublime and arduino ide
Arduino says it's connected to the serial console
@tidal kiln I've connected on the REPL
should all be updated now with the boards. Also added M0 and M4 labels
Ah, the REPL isn't responding to anything - crap
Could you change this to "Metro M4 Express"? That's the last thing. Thanks! The product pages don't say Express, but the guide pages do, and it is an Express board.
@steel vale you're connecting to REPL through the Arduino serial console?
No, regular linux terminal
do you see the REPL prompt?
>>>
I just tried booting the HW as HALLOWBOOT and was able to put the latest .uf2 on it. Still, when it comes back as CIRCUITPY it's read only
No >>>, when it set it up it's just blank.
what's blank?
press enter
nothing, just blinking box
press <CTRL>-<C>
Traceback (most recent call last):
File "main.py", line 62, in <module>
KeyboardInterrupt:
Press any key to enter the REPL. Use CTRL-D to reload.
now press enter
got it!
your main.py was running
Adafruit CircuitPython 3.0.3 on 2018-10-10; HalloWing M0 Express with samd21g18
you should be able to run the file system erase commands now
backup any programs first though
Got it. Did it just become corrupted or something?
possibly. hard to say. what was main.py?
It was just a sample program to use neopixels that I was modding
you said you were using sublime - was that to edit files directly on the CIRCUITPY folder?
Yes
but
I think what did it was trying to unpack the zip with the libraries and examples.
I started having problems after that.
Think I should make it safe mode instead? It'd work more reliably because then it wouldn't try to use the heap at all.
how were you unpacking the zip?
I'll take a look at this again later this week. I'm hoping to have a MIDI demo tomorrow so I need to go heads down on it.
I followed the instructions to do it locally
@solar whale added you as a collaborator to bitmap font
The instructions for using the circuitpython bundle could use a little more explaintion
Whoops I forgot that one, Done!
@steel vale feel free to open an issue on the Bundle repo or post in the forums. We're interested in what stumbling blocks you come across.
Oh yes, there are lots of them. I can't seem to set this up correctly. The instructions are very vague and they are not in order.
It's becoming very frustrating not being able to set up the libraries.
@tidal kiln Yes, as well as the ones on the github. Unfortunately, the zip contains a libraries folder full of empty folders. When I try to use git submodule add (in hopes of filling the empty folder) I just get a response saying the address isn't a repository.
hold on. let me check things. the layout of the bundle is currently being changed. so things may be a little out of sync with the guide.
did you download?
adafruit-circuitpython-bundle-3.x-mpy-20181019.zip
yes
Hahaha, that explains everything
it's a work in progress, and right now it's a little broken
I know I can't build it in the virtual environment or I'll fill up the drive
the goal is to have the examples included along with the libraries in the bundle
what you want is in that zip file though
you want the lib folder under build_adafruit_circuitpython_bundle_3.x_mpy_20181019
I unzipped it and the folders were empty
@tidal kiln @idle owl I tried to release micropython-bitmap-font but the mpy-cross fails since it was originally set up for micropython. Can you see if there is a simple fix to its .travis.yml that will allow it to build -- It can use the circutpython mpy-cross. Should we kludge somehting to get a .mpy into the release or do you want this to get made "proper" for CircuitPython.
will this library be needed when displayio is fully implemented? @solar whale
@tawny creek I'm not sure. If not, then it's not worth a lot of effort.
Scott would know. If it is needed, I would say we should do it up proper.
I agree in the long run -- is there an easy way to get a .mpy out there without that?
@steel vale i just looked and i'm seeing content.
That I don't know. Make it locally and manually upload it? That won't help if Travis is having issues with it though.
If not - should we remove the release until it is fixed?
I won't be able to work on circuitpythonifying it until the weekend and I'll likely need help getting it set up.
@steel vale you're downloading a zip of the repo, not the release zip
download zip from here:
https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases
I DL'd the only .tar.gz there
download the zip named adafruit-circuitpython-bundle-3.x-mpy-20181019.zip
not the source code
๐
@slender iron will bitmapfont.py still be used after displayio is implemented. It was originally built for micropython and travis is not happy with it. Trying to determine how much effort to put into it.
I'm not sure. I wouldn't put time into it though
my hope is to support ttf on the board
sounds good -- we
but may have the loader cache data on the fs
we'll do the minimum necessary to get it released.
@solar whale i haven't actually dealt with that directly before, but the lines that need changing seem obvious
- git clone https://github.com/adafruit/micropython.git
- make -C micropython/mpy-cross
- export PATH=$PATH:$PWD/micropython/mpy-cross/
OK -- if I update .travis.yml do I do another PR then a new release?
Hey @idle owl, do you think it's worth me writing a learn guide on EduBlocks for CPX?
I also don't see where it copies font5x8.bin to the release
i've got all the permissions setup
@fluid helm Yeah! But run it by Mike since he's the Learn System Gatekeeper ๐
That would be a great way to get it out there though, and I think it's perfect for a Learn guide
Cool, is he on Discord?
Yeah but email is best for him, he's not on right now.
cool, thanks!
@solar whale i think so. a PR would be needed to change .travis.yml. then when everything is happy, a release.
@tidal kiln unfortunately, travis did not complain until the release -- it does not build the .mpy until then
is there a way to just drop the .mpy and font5x8.bin file into the release ?
You can upload assets as far as I know.
@idle owl is that acceptable?
sure I don't see why not. For now it works, worst case we delete the release or the assets later.
ok done ๐
When I have more time, I can play with "fixing it" or anyone else is welcome to ....
@idle owl thanks -- sorry for taking the "easy" path but I think this gets us where we need to be for now.
Nah it's all good. No point in doing a bunch of work to have it deprecated in a couple of weeks.
Better to get it working for now and deal with it when we know what will actually need to happen
how do i fix my hallowing? some code has it stuck, i cant even connect to it with PuTTY
I am able to load it into bootloader but changing versions doesnt fix this issue im having... do i need to load something on it in arduino?
If you can't get to the REPL, you could try loading something Arduino on it, but that typically doesn't erase what's on there. So usually when you load CircuitPython back on after Arduino, your code is still there.
im gana try "Adafruit SPI Flash FatFs Format Example"
in arduino and see
no luck so far
i got it to this point but no luck after ```Adafruit SPI Flash FatFs Format Example
Flash chip JEDEC ID: 0xFFFFFFFF
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This sketch will ERASE ALL DATA on the flash chip and format it with a new filesystem!
Type OK (all caps) and press enter to continue.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
There were special eraser files made for earlier boards, but we haven't done them in a long time because of the way to erase the FS from the REPL. They won't work on the Hallowing as far as I know, unfortunately. There's also a way to make a special build of CP that does something to stop the code from running and allow you to delete it... But I don't remember how to do it. Dan did it for me the one time I needed it. And it wasn't for Hallowing, so I don't have it sitting around to give you.
@tulip sleet Do you have any better suggestions?
well i got it further to here in arduino ```Partitioning flash with 1 primary partition...
Couldn't erase sector before performing write!
Error, f_fdisk failed with error code: 1
Omg @slender iron TTF support โค โค โค
transparent stuff?
Whoops I forgot that one, Done!
HAH RTD. I OWN YOU. (this time.)........ (Me 1 : RTD the rest)
"cicuitpyton_backupFiles" sketch works ๐ hallowing fixed
Can I please get a status on the PIRKey? Is the code done? Any idea on the hardware?
Trying to give advice between rfm radio and ir for an at project
No ETA on either at the moment, as far as I know.
Bummer. Thanks
@tough flax RFM on Python or Arduino?
Both actually ๐
Current device is a Leonardo with a Bluetooth shield
On that side he can add a breakout board (or wing) and add it to his arduino code
Good news!
On the HID side he would use an m0 with cp I think
The timeframe is aggressive. But itโs probably doable
Check the post-the range will be โin the same roomโ
Oh, lemmie read thru it
I feel IR and WiFi would be the best choices for that, instead of using LoRa
IR maybe. WiFi will likely cause headaches
hmm the difficulty would be addressing the individual boards though...
I pointed him at @split ocean โs effects tutorial
Radiohead library can do that
In it youโd have to add an address to @brisk cairnโs custom HID over IR protocol
All devices would โhereโ the packet but only those addressed would send the HId
We are a bit off topic - sorry #circuitpython-dev
Hear
Not here
just looked at it, that's neat.
Itโs a nice application of all our stuff to AT ๐
good work @umbral dagger
I've had something odd happen a few times now on HalloWing w the Hackaday Superconference badge code. I rename the touchslideshow_code.py to code.py in the Finder, and when it, restarts the code.py file is an entirely empty file.
Running 4.0.0 Alpha 2 and this code: (https://github.com/adafruit/CircuitPython_Badge_README/tree/master/final_versions/HACKADAY_SUPERCON_2018)
@velvet badger No, sorry. You can do a lot with just split() and readline() on reading, and print(...,sep=',') on writing. But if you need quote handling, that's more work
Hrm, ok thanks.
Do you know if anyone has tried to do something like sqlite on adafruit devices?
@velvet badger there's not really enough memory for that. The sqlite library is like half a megabyte. You might want to look in to the RPi Zero, etc.
@tulip sleet Where would one look to see what of cpython is and is not available in CP? I'm wondering about pickle
there are very few libraries available. There's a library list in RTD, maybe in the micropython rtd
we have most of these, but they are mostly renamed from "u": http://docs.micropython.org/en/latest/library/index.html
@velvet badger What is your use case for sqlite? Depending on the constraints you could probably roll your own simple database
ooh, btree is supported?
I'm thinking a db under 2MB for a single user.
Huh. Never heard of btree, but that might work.
Doing early voting tomorrow, myself. I just want to encourage everyone else to vote for the midterm!
^^^ related: https://www.ballotready.org
please vote. ๐
โค kbx
@velvet badger btree is only turned on right now in the esp8266 port, though it could be turned on in others
@gentle bronze you around?
@slender iron yeah
I'm taking a stab at moving the samd51 to tinyusb
have you thought about enabling for more dynamic allocation of descriptors and buffers?
It is up to application, tinyusb only take the pointer to the descriptor
where is it passed in?
there is device driver porting for samd, let's me check if I have a samd board, and run a simple example in my repo first before applying it to the huge code base of cpython.
there is work to port it already? is it on github?
tinyusb require teh exact variable to be define in application
ah, its passed through global state. I expected it as a function parameter
app can change the pointer anytime it like, but better not within the enumeration progress
right, that works for me
I really like the fifo that tinyusb has
the buffer management in asf4 is super gross
I haven't work with samd usb controller, but that shouldn't be too much issue to have a proof of concept demo. I will start some work on samd port soon enough.
I'm trying it now ๐
I thought you may have it already
but if not then I'll start it
there is a bit mess in the usb repo now :(, not much documentation, and it still keeps changing ๐ฆ
~.~
no worries, I'm starting with what circuitpython has
its already way better than asf4
ping me if you need some clarification, there is no need to read tons of code, that you don't need to interact with ๐
there is some porting hint here https://github.com/hathach/tinyusb/issues/5
ok awesome! thanks!
np !
That'd have some advantages. You'd have to write the drivers only once, and then have them available for both C and CircuitPython (or other high-level languages, like node.js, Lua, etc.).
Porting to new platforms, like RISC-V, would be easier.
But it would also collide with ports, that already use an OS, like the ESP ports, that use FreeRTOS.
Added more german translation strings, fixed some existing translations
Creating an advanced section for things that don't fit in their own category or are not relevant for basic users
MPL115A2 - I2C Barometric Pressure/Temperature Sensor
https://www.adafruit.com/product/992
@raven canopy @slender iron Just got a note that the particle boards "start" shipping on Friday...we'll see who gets them first.
@solar whale yep, me too. We'll see...
I had some add-on stuff so may be in the back of the pile
And who doesn't need more breadboard, right? Thought that was a nice gesture for the delay.
Can anyone explain with any reasonable ease why an input series resistor before an LDO drops the input voltage? I can't seem to wrap my head around why the LDO itself acts as a resistor to ground - the numbers in sim don't make sense to me.
Always happy to get more stuff!
Why would a resistor not drop the input voltage?? I think I misinderstand the question
input -> 4ohm -> LDO -> output... I guess I just don't see why the voltage is being divided. I see why the resistor will have a current pulled through it. I see why it's not exactly efficient. I see why the LDO will have to pull a little harder. But I don't see a voltage divider
there will be a votlage drop across the 4ohm resistor.
Yes, I agree there will be. But why, and by how much?
V=IR -- 4* current
V=IR. As resistance increases, voltage decreases.
I of the LDO's Q, or I of the LDO's total pull on the other side?
if you pull curreent through a resisto it drops the voltage by I*R
The LDO is not a linear device; it can't be modeled just as a resistor, since the "resistance" will vary based on what's happening at the output. It consumes some current on the input side to act like a voltage source on the output side. The current consumed depends on the current on the output side but is not the same. It will waste some as heat.
So total pull on the other side... Anything that is being pulled through the resistor - except my stupid sim doesn't show this. If I sim up a basic LDO, and pull an LED with a 100ohm, the voltage drop is X on the input side. But if I increase to a 200ohm on the output side, same voltage drop on the input side. Makes no sense to me
Hmm
So 14V in, 4ohm series, total pull is .300mA, should be a 1.2V drop to 12.8V, ya?
mind moving to #help-with-projects ? this doesn't have to do with circuitpython
You can calculate its "resistance" for a static load on the output side, but
Note: ahhh...tannewt beat me to it.
Thanks for the ping! Sorry I didn't do any additional review. I didn't know the state of this PR.
I don't want to re-use the u* versions of modules because MicroPython uses them. How about weak linking to the top level and adding a circuitpython module to wrap them? That way to access CircuitPython's time would be from circuitpython import time.
You can now add extensions into EduBlocks CircuitPython, so any libraries you make for CircuitPython you can add into EduBlocks. I'll make a learn guide on how to do it. Here's an example of @idle owl's CircuitPlayground library as an extension.
anyone want to help this person? https://forums.adafruit.com/viewtopic.php?f=60&t=142494
@fluid helm That's great!
@slender iron huh. i was helping them in another thread. the thread you linked is more on topic, so we should continue in that one. i can test the code they posted, but - got any insights on the issue?
not using brightness could help
not using play_file could help too since it has to reallocate the buffers each time
@jedgarpark What do you mean by restart? Are you unplugging it and plugging back in?
We should list non-Adafruit boards as well. It can be a separate list though so that its clear its not made by Adafruit.
I think that would be strange.
The reason I used u is because it's the MicroPython way of naming C modules.
Here's how the MP stdlib extends utime for instance: time.py
If you don't like it, can we do what CPython does with its C modules and prepend it with an underscore _time?
I tried the posters code on cp4.0.0alpha2 and it works
@tidal kiln have you rerproduced the error?
There are also samples you can click on and run
@solar whale haven't tried yet
it runs fine for me -- free memory varies a lot from 10K to <2K but it runs