#circuitpython-dev
1 messages ยท Page 186 of 1
yeah the circuit playground express
ok. here's a boot.py i've used before:
# boot.py
# Use this to control file system state on power up and/or HW reset.
# If read only is set to False, then CP can write to the file system.
# If read only is set to True, then USB can write to the file system.
import storage
from adafruit_circuitplayground.express import cpx
# toward ear = False (CP can write to file system)
# toward note = True (USB can write to file system)
read_only = cpx.switch
print("Read Only = ", read_only)
storage.remount("/", read_only)
you use the CPX slide switch to set mode
ok so have cpx lib on board
im still getting OSError 30
how do you get the boot.py to load?
i tried reset button, and unplugging it and waiting then plugging it back in
switch in both possitions
with open("/tmp.txt", "a") as fp:
... fp.write("hello, world!")
...
then gives me error
do you see tmp.txt in the CIRCUITPY folder?
it was not there so i made one and still nothing
@upbeat plover what version of CP are you currently running?
actually. nvm.
post the contents of boot_out.txt
okay
Adafruit CircuitPython 3.0.0-rc.0 on 2018-06-18; Adafruit CircuitPlayground Express with samd21g18
boot.py output:
Testing
is it working?
lol... i think i found issue, was using Atom, now using Mu gana go back and try with your boot.py
also. update to release version of 3.0:
https://github.com/adafruit/circuitpython/releases/latest
you're using RC0
Adafruit CircuitPython 3.0.0-rc.0 on 2018-06-18; Adafruit CircuitPlayground Express with samd21g18
boot.py output:
Traceback (most recent call last):
File "boot.py", line 6, in <module>
File "adafruit_circuitplayground/express.py", line 691, in <module>
File "adafruit_circuitplayground/express.py", line 121, in __init__
File "adafruit_circuitplayground/express.py", line 146, in detect_taps
File "adafruit_lis3dh.py", line 334, in _read_register
MemoryError:
that was with your boot.py
ok. that's similar to what i'm getting with 3.0 (see my note about updating CP firmware above)
use 3.0
same with bundle
i'm going to cook up a different boot.py that doesn't use adafruit_circuitplayground
alright im gana put the newer CP on there then storage.erase_filesystem() and put newer lib in there
ok. that'll be good to get back to a clean slate.
then try this for boot.py:
import board
import digitalio
import storage
# For Gemma M0, Trinket M0, Metro M0/M4 Express, ItsyBitsy M0/M4 Express
#switch = digitalio.DigitalInOut(board.D2)
# switch = digitalio.DigitalInOut(board.D5) # For Feather M0/M4 Express
switch = digitalio.DigitalInOut(board.D7) # For Circuit Playground Express
switch.direction = digitalio.Direction.INPUT
switch.pull = digitalio.Pull.UP
# If the switch pin is connected to ground CircuitPython can write to the drive
read_only = switch.value
print("Read Only = ", read_only)
storage.remount("/", read_only)
@tannewt
@kattni
Not sure if this will work as a reply. I had inquired about some drivers and when they would be available on Pypi. I am working on a project using Adafruit boards with a Raspberrypi. I was asked if I would like to help with the conversion. I said yes and was directed here. Would like to help.
Mark
@tidal kiln working now, thank you for your patience
yeah!
fwiw, i got that boot.py from here:
https://learn.adafruit.com/circuitpython-essentials/circuitpython-storage
and just tweaked it to add the print, so you would get some confirmation in boot_out.txt
and they show up in boot_out.txt
handy!
Weirdly I just said "handy!" to someone else.
keen!
@crude fossil saw your several-hours old msg; are you still having trouble?
@tulip sleet tab completion on the MCP for pin-mapping was def. the way to go
easy to use, esp. for when people are going to be doing differential reads (nice to see what pins are available per-IC)
vg! yes, that's the idea. I do it all the time when I can't remember something (or am just a lazy typist)
It'll be neat when it's implemented on the crickit
like CRICKIT.MOTOR_PIN# or however it's implemented
i think we've got what you want:
>>> from adafruit_crickit import crickit
>>> sv = crickit.
touch_2 touch_1 __init__
feather_drive_stepper_motor servo_4 servo_3
drive_4 servo_2 drive_2 drive_3
SIGNAL8 drive_1 servo_1 __qualname__
SIGNAL3 SIGNAL2 SIGNAL1 SIGNAL4
SIGNAL7 SIGNAL6 __module__
continuous_servo_4 SIGNAL5
continuous_servo_1 _touch
drive_stepper_motor _drive
continuous_servo_3 _servo
continuous_servo_2 neopixel init_neopixel
reset _motor feather_drive_1
feather_drive_2 feather_drive_4
feather_drive_3 seesaw stepper_motor
dc_motor_1 dc_motor_2 touch_4 touch_3
๐ yep
@upbeat plover I tried you code on my adalogger with an si7021 -- no memory proble, but it does throw an erro -- have not looked into it yet ```
import hexthat
Logging to filesystem
0.73105
Temperature: 27.2926 degrees C
Humidity: 79.7887%
Temperature = 24.5
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "hexthat.py", line 49, in <module>
File "hexthat.py", line 45, in <module>
TypeError: object with buffer protocol required
almost done with a newer version that needs testing
here is what i got so far
import adafruit_sdcard
import adafruit_si7021
import board
import busio
import digitalio
import math
import microcontroller
import storage
import time
# si7021 sensor
i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_si7021.SI7021(i2c)
# LEDs
redled = digitalio.DigitalInOut(board.D13)
redled.direction = digitalio.Direction.OUTPUT
greenled = digitalio.DigitalInOut(board.D8)
greenled.direction = digitalio.Direction.OUTPUT
# SD card
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
cs = digitalio.DigitalInOut(board.SD_CS)
sdcard = adafruit_sdcard.SDCard(spi, cs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
# calculate current Vapour-pressure deficit
def vpd():
temp = sensor.temperature
# Estimate Saturation Pressure
# Saturation Vapor Pressure method 1
es1 = 0.6108 * math.exp(17.27 * temp / (temp + 237.3))
# Saturation Vapor Pressure method 2
es2 = 6.11 * 10**((7.5*temp)/(237.3+temp)) / 10
# Saturation Vapor Pressure method 3
es3 = 6.112 * math.exp(17.62 * temp / (temp + 243.12)) / 10
# Saturation Vapor Pressure mean
es = (es1 + es2 + es3) / 3
# actual partial pressure of water vapor in air
ea = sensor.relative_humidity / 100 * es
# return Vapour-pressure deficit
vpd = es - ea
return vpd
def sdwrite(sdlog):
with open("/sd/log.txt", "a") as f:
redled.value = True
print(sdlog)
f.write(sdlog)
redled.value = False
print("Basic Logging of Vapour-pressure Deficit to filesystem")
while True:
# CPU temperature
cput = microcontroller.cpu.temperature
# write to text fiel
sdwrite('VPD ='.format(vpd()))
sdwrite('Temperature: {} degrees C'.format(sensor.temperature))
sdwrite('Humidity: {}%'.format(sensor.relative_humidity))
sdwrite('CPU Temperature = {0:f}\n'.format(cput))
sdwrite('----next-----')
#
greenled.value = True
time.sleep(10)
greenled.value = False
not sure how the def sdwrite will do...have not tested that stuff yet was about to test it with CPX
with tweek
it runs ```
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 3.0.0 on 2018-07-09; Adafruit Feather M0 Adalogger with samd21g18
import hexthat2
Basic Logging of Vapour-pressure Deficit to filesystem
VPD =
Temperature: 27.1746 degrees C
Humidity: 80.8797%
CPU Temperature = 25.044954
----next-----
VPD =
Temperature: 27.1746 degrees C
Humidity: 80.9331%
CPU Temperature = 24.826691
----next-----
VPD =
Temperature: 27.1961 degrees C
Humidity: 80.9865%
CPU Temperature = 24.826691
----next-----
VPD =
Temperature: 27.1961 degrees C
Humidity: 81.1315%
CPU Temperature = 24.826691
----next-----
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "hexthat2.py", line 64, in <module>
KeyboardInterrupt:
the VPD is missing... hmm
contents of log.txt -- after both runs - may be mixed ---This is another line!--- VPD =Temperature: 27.1746 degrees CHumidity: 80.8797%CPU Temperature = 25.044954 ----next-----VPD =Temperature: 27.1746 degrees CHumidity: 80.9331%CPU Temperature = 24.826691 ----next-----VPD =Temperature: 27.1961 degrees CHumidity: 80.9865%CPU Temperature = 24.826691 ----next-----VPD =Temperature: 27.1961 degrees CHumidity: 81.1315%CPU Temperature = 24.826691 ----next-----
import adafruit_sdcard
import adafruit_si7021
import board
import busio
import digitalio
import math
import microcontroller
import storage
import time
# si7021 sensor
i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_si7021.SI7021(i2c)
# LEDs
redled = digitalio.DigitalInOut(board.D13)
redled.direction = digitalio.Direction.OUTPUT
greenled = digitalio.DigitalInOut(board.D8)
greenled.direction = digitalio.Direction.OUTPUT
# SD card
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
cs = digitalio.DigitalInOut(board.SD_CS)
sdcard = adafruit_sdcard.SDCard(spi, cs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
# calculate current Vapour-pressure deficit
def vpd():
temp = sensor.temperature
# Estimate Saturation Pressure
# Saturation Vapor Pressure method 1
es1 = 0.6108 * math.exp(17.27 * temp / (temp + 237.3))
# Saturation Vapor Pressure method 2
es2 = 6.11 * 10**((7.5*temp)/(237.3+temp)) / 10
# Saturation Vapor Pressure method 3
es3 = 6.112 * math.exp(17.62 * temp / (temp + 243.12)) / 10
# Saturation Vapor Pressure mean
es = (es1 + es2 + es3) / 3
# actual partial pressure of water vapor in air
ea = sensor.relative_humidity / 100 * es
# return Vapour-pressure deficit
vpd = es - ea
return vpd
def sdwrite(sdlog):
with open("/sd/log.txt", "a") as f:
redled.value = True
print(sdlog)
f.write(sdlog)
redled.value = False
print("Basic Logging of Vapour-pressure Deficit to filesystem")
while True:
# CPU temperature
cput = microcontroller.cpu.temperature
# write to text filesystem
vapord = vpd()
sdwrite('VPD ='.format(vapord))
sdwrite('Temperature: {} degrees C'.format(sensor.temperature))
sdwrite('Humidity: {}%'.format(sensor.relative_humidity))
sdwrite('CPU Temperature = {0:f}\n'.format(cput))
sdwrite('----next-----')
#
greenled.value = True
time.sleep(10)
greenled.value = False
slight change made line 56ish
hmm ill add /r/n to lines.... too
runnin test -- you can perfect it when you get your HW ๐
yeah thank you very much
>>>
>>>
>>> import hexthat3
Basic Logging of Vapour-pressure Deficit to filesystem
VPD =
Temperature: 27.1746 degrees C
Humidity: 80.689%
CPU Temperature = 24.390106
----next-----
VPD =
Temperature: 27.1746 degrees C
Humidity: 80.628%
CPU Temperature = 24.608414
----next-----
VPD =
Temperature: 27.1532 degrees C
Humidity: 80.6203%
CPU Temperature = 24.826691
----next-----
VPD =
Temperature: 27.1532 degrees C
Humidity: 80.5517%
CPU Temperature = 24.717553
----next-----
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "hexthat3.py", line 65, in <module>
KeyboardInterrupt:
>>>
looks great!
you should be all set when you get the board! Good luck!
thanks
You're welcome!
Any idea why a cpx and crickit would be throwing an error on a continuous servo demo code?
Code:
import time
from adafruit_crickit import crickit
print("1 Continuous Servo demo!")
while True:
crickit.continuous_servo_1.throttle = 1.0 # Forwards
time.sleep(2)
crickit.continuous_servo_1.throttle = 0.5 # Forwards halfspeed
time.sleep(2)
crickit.continuous_servo_1.throttle = 0 # Stop
time.sleep(2)
crickit.continuous_servo_1.throttle = -0.5 # Backwards halfspeed
time.sleep(2)
crickit.continuous_servo_1.throttle = -1 # Forwards
time.sleep(2)
crickit.continuous_servo_1.throttle = 0 # Stop
time.sleep(2)
REPL
File "code.py", line 7, in <module>
File "adafruit_motor/servo.py", line 132, in throttle
File "adafruit_motor/servo.py", line 66, in fraction
File "adafruit_seesaw/pwmout.py", line 57, in duty_cycle
File "adafruit_seesaw/seesaw.py", line 302, in analog_write
File "adafruit_seesaw/seesaw.py", line 376, in write
File "adafruit_seesaw/seesaw.py", line 376, in write
File "adafruit_bus_device/i2c_device.py", line 102, in write
OSError: [Errno 5] Input/output error
@pallid cliff That code works on mine.
huh
It consistently does one cycle, then throws the errors and just runs half foward endlessly
at least the servo turns -- not quite sure the speeds are as expected -- first time I've tried a CR servo.
no erros for me - but it does not got to full stop
yeah, just noticed that too. doesn't pause. It is still a fairly new library though, think it's worth opening an issue?
I have not looked at it at all -- not sure what to expect. Open an issue if you thing the driver is at fault. May just need to be calibrated.
as t the errors -- that sounds like a wiring or power issue.
waht are you powering it with?
make sure they are fresh
yup
It's all good. what CR servo are you using?
FS90R
I'm using a fitec fs5103r, and just noticed it has a trim for the zero position, so at least mine is stopping now ๐
nice! but you still get the errors?
yup, consistent errors though
one cycle through the code, then freeze
newest crickit firmware and circuit python 3.0 on the cpx with the crickit library
same - here -- mine does have an adjust pot as well -- have not played with it.
Have you tried other crikit funtions -- does it typucally comunicate OK?
What are you powering the CPX with?
dc motors are good, stepper on drive is good, standard servo is good. signal io is good. cap touch is good
USB power for CPX
It does throw "RuntimeError: SDA or SCL needs a pull up" despite the screws being on really good
occasionally
DO you have a meter to check to battery voltage -- they are alkalines, correct?
That is not normal -- possibly worth making sure the contact to the spacers/xcrews are clean so it is maing good contact, Try new batteries . 4.2 is getting low.
just tried using 4 NiMH batteries and it works fine
ok, contacts checked, 3 new batteries, and it's doing multiple cycles. but only 4.6V, not that much more
just checked my batteries -- its at 5.2V -- they may be alkalines as well -- still much highr voltage
might have to buy some NiMH batteries
so no errors
none yet, almost a dozen cycles in a row
so I think its jsut a power issue --
sigh, it's always the simple things isn't it? ๐
it says > 4.5 -- guess they mean it!
yeah!
gotta run -- good luck
Thank you!
you're wecome
@pallid cliff it does say 4-5V so 4.2 "shpuld" work --- hopefully someone else with more knowledge of the CRIKIT power req can comment.
alright
@pallid cliff Also measure the voltage when it's under load. It might be sagging when the servos are moving
Is it possible to simplify this code? I am looking for a "chasing" type animation on the CPX and would like to see what other ideas may be.
@indigo hazel easiest is to just use one of the built in animations
LIGHT -> show animation...
but another way to do what you're doing is to use the LIGHT -> show ring block
then you can individually set each neopixel with one block
also, try asking in #help-with-makecode, the makecode devs often hangout in that channel (this one is for circuitpython)
Okay thank you.
np. i'm just a user myself. you might get better info over there. good luck!
so much stuff to install on a new system... ๐ต
indeed. always shocks me too. and you need to install stuff that installs the stuff that then runs the install scripts that installs the stuff so you can finally install the thing.
@idle owl hey0 kattni since yer at a conf, maybe @tidal kiln can take a look at makecode'n the zombie game
Ok. @tidal kiln? I can link you to the CP part of the guide and the code.
think i already got it from earlier?
Yes, that was the same
you can TEAMUP
also, @tidal kiln you make hilarious images, please make some free-clipart CPX-zombie and CPX-nurse to demonstrate how it works?
uh oh. thanks. but it might just be free clip art that you're already seeing?
that i just re-used
ah. gotcha.
Nurse's hat.
looks like that was made to fit
@idle owl for makecode, will probably just make three separate programs. they choose what they want to be when they drag the UF2 over. or is there a reason to have it be field changeable?
@tidal kiln Not that I'm aware of, we just did the CP code in one program. I don't know that it's a requirement. @meager fog?
i think for circuitpython it was easiest to do this way
for makecode its fine to have 3 programs
because you cant edit easily
so just make em fixed-usage
and they can drag the uf2 around
zombie.uf2, healer.uf2, human.uf2 easy peasy
but see how you fair!
its gonna be very easy in makecode - btw if fading LEDs is hard, just blink the neopixels instead
oh, i see, that's for the zombie and healer
human is just a health counter, no fading (pulsing)
right
hmmmm. a human can become a zombie....that puts a wrinkle in it...
@idle owl i'll play around with it and then can just send you the makecode published links
yeah @tidal kiln
@tidal kiln Alright, I'm out for tomorrow and the weekend but I'll take a look at them on Monday.
just trying to load a CPy build onto the pca10056. I haven't done this for a couple of weeks and can't remember if I can do this with dfu-flash or not. When I try it doesn't work, but I'm not sure how to get the board into DFU mode.
@upbeat plover ran you latest code ```Adafruit CircuitPython 3.0.0 on 2018-07-09; Adafruit Feather M0 Adalogger with samd21g18
import adalog_VPD
Basic Logging of Vapour-pressure Deficit to filesystem
Start/Reset
VPD = 0.444998
Temperature: 25.1797 degrees C
Humidity: 86.0219%
CPU Temperature = 22.535064
----next-----
VPD = 0.450739
Temperature: 25.1797 degrees C
Humidity: 85.8694%
CPU Temperature = 22.535064
----next-----
VPD = 0.455337
Temperature: 25.1905 degrees C
Humidity: 85.7397%
CPU Temperature = 23.189759
----next-----
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adalog_VPD.py", line 76, in <module>
File "adalog_VPD.py", line 67, in <module>
KeyboardInterrupt:
OK, so, quick question. My Metro M4 Express seems to be corrupting the main.py file.
What am I doing wrong?
what editor are you using?
I'm editing a main.py file locally, saving it, copying it over. Verify it's correct. Reboot the device, and... corrupted file.
Notepad++, locally.
how are you copying it over, on what OS
Standard file transfer, Windows 10
you have to eject after copying to force all the bits to get written
@tulip sleet not dfu-flash -- you can use the Jlink interface and just flash
it might look ok from the windows side but that's because windows is looking at the cache, not the actual flash
@solar whale but can I do dfu-flash at all, without jlink?
how are you "rebooting the device?" reset button or ctrl-D?
not taht I am awate of -- it is not a dfu boot loader -- justa sec
@tulip sleet Copied it over. Waited a few seconds. Ejected. Saw confirmation it was ejected. Unplugged, plugged back in. Same deal.
@cunning crypt the filesystem could be corrupted. Don't unplug or press the reset button. Just go into the repl and type ctrl-D
to get a soft reload
I seem to remember a board doing this and having to re-copy CP over to it.
to fix up the filesystem, save any files you don't have backups of, and then do in the REPL:
import storage
storage.erase_filesystem()
you'll have a clean CIRCUITPY and can copy stuff back
@tulip sleet I set mine up for teh MSC bootlader https://github.com/adafruit/circuitpython/tree/master/ports/nrf/boards/feather52840
use BOARD=pca10056 not feather52840 though
to get to boot loader hold buttons 1 and 2 then RESET
wow, where is that written down?
is the MSC bootloader working now? I thought it was just for show
and not yet working
@tulip sleet Seems to be working. Except now it's filling the character LCD with blank spaces as soon as it runs. Interesting.
@tulip sleet trying to recall how I got the bootloder installed in the first place...
Aaand fixed. Apparently the LCD doesn't like "nothing" happening.
Thanks @tulip sleet - Filesystem seems to be working great now.
its on that same page - CDC boot laoader make SD=s140 BOARD=pca10056 bootloader
@cunning crypt great. If you tire of ejecting all the time, you can use an editor that writes everything back immediately: VS Code, Atom (with a plugin), emacs, vim, Mu. NOT Notepad++ or Notepad.
Yeah, notepad++ is for local only
When I copy the files over now, I can watch it reload in the REPL
Haven't had to eject.
@tulip sleet it may support both dfu and MSC -- sorry -- still a bit fuzzy
i'll try the reset +1 +2. I was just doing reset
i did a couple of weeks ago
comes up as NRF52BOOT
ah, mine says FEATHER5284, so I think it's a much older version. I need nrfjprog. It's not in my PATH. (It was once but that's when I was trying Limor's versions.)
so plug in from the jlink port, and then load bootloader and then switch to nrf USB (on long edge)?
yes
so I guess the dfu laoder may also still work, but have not tried it -- jerryneedell@Ubuntu-Macmini:~/projects/feather_adalogger$ nrfutil version nrfutil version 0.5.2d from the repo
It takes quite awhile to reboot after flash -- much longer tahtn SAMD -- be patient - give it 30 seconds
ok, got 0.5.2d from adafruit/nRF52_nrfutil, but where is nrfjprog, or is that just an alias?
I did not do anything special for it -- just insatlled nrfutil
it may come from Segger jerryneedell@Ubuntu-Macmini:~/projects/feather_adalogger$ nrfjprog -v nrfjprog version: 9.7.2 JLinkARM.dll version: 6.30h
what do which nrfutil and which nrfjprog say?
jerryneedell@Ubuntu-Macmini:~/projects/feather_adalogger$ which nrfutil
/usr/local/bin/nrfutil
jerryneedell@Ubuntu-Macmini:~/projects/feather_adalogger$ which nrfjprog
/home/jerryneedell/bin/nrfjprog
nrfjprog is installed locally
k, i'll look around for where to get it from
ah, it's linked from here: https://github.com/adafruit/circuitpython/blob/master/ports/nrf/README.md
isn't it part of the SDK in the repo? (the cobwebs in my brain can't read back far enough...)
lrwxrwxrwx 1 jerryneedell jerryneedell 54 Oct 29 2017 nrfjprog -> /home/jerryneedell/projects/nrf52840/nrfjprog/nrfjprog
it's in nRFx-Command-Line-Tools. That's what the link downloads
ahh...yeah. guess i downloaded it before. ๐
looks like I have not updated it recently -- must have been part of the DK setup originally
https://github.com/adafruit/circuitpython/tree/master/ports/nrf/boards/feather52840#install-nrfjprog
wow this is spread out all over the READMEs
woohoo!
i accidentally flipped that "nRF ONLY | default" slide switch above LED1 the wrong way and it made the board appear dead. took a while to figure that out. luckily I have two boards
@slender iron i totally just remembered about running adabot; new laptop and getting ready for vacation has consumed most of my brain. and, i'll have to figure out the credential part.
too many buttons and switches on this board!
ok REPL!
yeah, i was a little surprised by that when i unpacked mine. "oh good..more variables". ๐
the power slide switch is confusing. I have it in the middle, VDD. USB position does not seem to be right, though you might think that would be it
when the board seemed dead, i tried that first
the point of all this was to test the merge from upstream micropython, which seems finally to be working on all platforms. Still have to run the unix tests
Wow - nice!
you might be an esp8266 guinea pig on this - but I think it's ok. Upstream changed some stuff about the serial connection and I had to change it back: they were relying on dupterm which we moved to multiterminal, but not providing the same functionality. we are drifting further and further away from upstream on various things
i spent like four hours looking at 3-way diffs to vet the merges and fix things up
ugh
I've noticed taht if I try to unmount the nrf CIRCUITPY - it often tells me it has to finish writing then gives an error when I thrn it off. seems to be OK afterward, but just a heads up
it's a completely different USB stack, so not surprising, thanks
just remounted and unmounted fine so its not reproducible -- don't think it is issue-worthy -- yet
have you tried the beta saleae Logic program yet? v nice, does realtime capture display
oohh - thanks had not seen it
just restarted reading KTowns BLE book -- determined to learn how to use it!!
too many acronyms
๐ ๐
.... Running Patch Checks On 93 Repos ....
@slender iron PR #1057 failed in travis (a long time ago); prob you know that already
hmm...well, that didn't work at all. but, its a local problem. also, it seems to not be grabbing everything (unless it's another symptom of the local problem)
.... Patches Applied: 0
.... Patches Skipped: 1
.... Patches Failed: 59
@tulip sleet yup. been heads down on rom byte hunting. string compression looks promising using huffman encoding
will likely do translation support as well
qstr 4217 bytes -> 2807
wow, you're on a roll. I think I finally finished the merge. have repl in atmel, esp8266, and nrf. still need to run unix tests
Brings tears to my eyes -- someone actually remembered to test the esp8266 ๐
goodnight all! ๐ค
@slender iron @tulip sleet so the first 6 patches (initial live test) from adabot have been run for the code of conduct. successively! buuuuut, its causing Travis failures with pylint 2.0 on a few repos. do we want to run the rest of the CoC patch, and then run a patch for .travis.yml? or would you rather put up the patchfile now and then run the two patches together?
@slender iron k. i'll grab the commit from the one Dan did and submit the PR for the patch. found something i missed that needs a PR anyway. ๐
๐ค as well...
@solar whale eject/safe remove send a scsi command which is not handled now, causing host to complain. It will be fixed in the next PR.
@tulip sleet both uf2 and cdc (dfu) works. UF2 only upgrade the firmware, cdc/dfu in addition to firmware could also upgrade the bootloader + Softdevice
SD is defaullt to s140 for nrf52840 (feather & pca10056) and s132 for nrf52832 (feather & pca10040). That is most people do, only need to SD= for no SD usage.
@gentle bronze when using CDC/dfu is it done via the J-Link USB port or the nrf USBPort?
it is done via CDC on the nrf52840, there is no usage of jlink CDC
OK so all flashing of bootlader, SD or firmware is done via the same port the one labeled nrfUSB near the BLE antenna - no need to use the one near the battery any more.
Yeah, one you flashed the bootloader, it is self upgradable.
great! thank you. That makes sense.
Flash target still just jlink + nrfjprog, dfu-gen dfu-flash or uf2 copy if you want to omit jlink
No problem, it is confusing since we have 2 cdc, and we used to work with jlink cdc until recently
OK - good -- that is what I had been doing -- since loading the botloader via Jlink, I have only updated the firmware via uf2.. I have not tried dfu or loading bootloader again. I did not realize that the dfu was an option.
Yeah, dfu is better for scripting, we will use it for arduino repo as well.
ah -- that makes sense. So the feather52840 will support both dfu and UF2 -- the feather52832 will only ever use dfu -- it cannot support UF2
Exactly, since 832 does not has native usb hw
Thank you for all the clarifications. The PCA10056 board is partiularly confusing because of the multiple ports and the various buttons and switches -- it takes some time to get used to it!
for the PCA10056 -- you have to hold buttons 1&2 down when RESETTING to get to the bootloader -- on the feather52840 will it just be a double-tap of the RESET like the other feathers?
Yeah agreed, to get into bootloader mode, you need to press button0 while reset. Too bad double reset trick cannot be implemented if nrf5x series, at least I couldn't.
Only button1, holding 2 button will put it into dfu mode with ota support
hm -- let me try again
Button1 : normal dfu + uf2, led0 blink
Button1 and 2: ota dfu + uf: LED1 will also blink as well
oh -- you are correct -- ok so 1 & 2 -- still works, jut not needed but allow OTA
Double reset won't work since nrf5x will clear all the registers, sram mem. Nordic spents extra logic gate to make sure they are all clean. I tried but couldn't figure to do double reset trick. You are back to default when reset.
OK - so the feather52840 will have to have a differnt method.
I mean the chip is back to default
Wow -- I tried button 1 & 2 and I see device adaDFU in the Bluefruit app on my phone!!
and I can connect to it!
You can upgrade it there as well, though you need to use Nordic app, since our app does not support the pkg format (it still uses the good old init+binary)
Use the pkg .zip file created in the dfu-gen target, the same one cdc interface used to upgrade
Another note, if holding only button2 while reset, it will clear the firmware, serving as factory reset button
Only bootloader remains afterward
AH -- good to knw!
Ah, there are 2 extra ways to go into bootloader as well without using phys buttons (not implemented yet)
The 1200bps cdc touch, which is used by Arduino. And a simple command using usb control transfer
The usb control command may have a bit of driver issue with windows (needs extra step for binding libusbk driver). But it wilk work flawless under macos and linux. Can be used as part of dfu-flash target for auto update
I wilk submit a PR for bootloader update later.
That sounds great! Thank you for all you have done and for how quickly this has been implemented!
No problems, the usb stack is written for like 3 years :( . So it is not really that quick :((
Not for you -- the nrf52 has gotten a quick start due to all your work!
just reading instructions in the nrf app for using OTA -- sounds really nice -- I'll give it a try when I feel brave!
๐
For nr52, @indigo wedge did a lot more, I am just involved in usb related thing ๐
It's a great team! Thanks for answering all my questions this morning ( evening for you)
i'm trying to get up to speed on makefile. i found i was getting confused when building CP. i am trying to build a debug "hello.c" binary/cross-compile to itsy-bitsy m0version. i think my current challenge is in the linker script. i found one for samd21x18.ld w/in CP build. However, I think there is something (when defining sections?) that strips the symbols (e.g.: compile w/ -ggdb)? What am I missing? Any advice greatly appreciated.
Yeah, not at all.
@bronze geyser to build the DEBUG version just make DEBUG=1 BOARD=xxxx
@solar whale yes. I can do that and it works great. However, i am trying to understand what is going on within a makefile since i found it confusing. so i started w/ basic hello.c then went through setting up CFLAGS, LFLAGS. I get a .elf. gdb however tells me the .elf does not have symbol files. I am not using a -s in the link stage, i do use -ggdb in the compile stage. So i thought is was the .ld file?
@solar whale - i very much thank you for your reply.
@bronze geyser sorry - you are much deeper into it than I realized. Hopefully Dan or Scott can help soon.
@solar whale i do seem to have my hip boots on. again, thank you. it was kind of you to jump in.
@bronze geyser I have enjoyed following and learning from your progress. Thank you!
Anyone have any ideas as to whether this could be made to work with CircuitPython? https://github.com/pimoroni/vl53l1x-python
It's an I2C device, so it should not only be possible but pretty straightforward.
@small cypress there's a library for the VL53L0X, so it's probably just a matter of adjusting some protocol (maybe more, maybe less). https://github.com/adafruit/Adafruit_CircuitPython_VL53L0X
I spent some time digging through why I couldn't get mqtt over TLS to work on my Feather HUZZAH. I have come to the conclusion that micropython/extmod/modussl_axtls.c is ahead of circuitpython/extmod/modussl_axtls.c.
What would it take to update this?
@ubiquitousthey,
@dhalbert is currently working on pulling upstream down. This may be included, but I'm not sure. Also, it may not immediately be available in a stable release (3.x atm).
@bronze geyser Hello World in this case is more like three paragraphs than "Hello World" in terms of all the supporting stuff
Getting the .ld map and the Makefile right are tricky. I'd suggest taking the existing Makefile and .ld map and pruning them rather than starting from scratch. Maybe you are doing that already.
there is also a lot of setup needed at the beginning to set up the clocks, etc. initialize the chip in other ways, etc.
@tulip sleet thank you. i'm using atmel-samd/boards/samd21x18.ld . I leave it be. i think that is right? but i'm not getting the symbols (compile with -ggdb, LFLAGS doesn't strip symbols)....
it's a tremendous amount to learn and understand and may not be productive if your main goal is understanding how to modify or enhance CircuitPython.
@tulip sleet so i'm trying to take an online embedded systems course. They use Keil. I wanted to use Atom + gdb command line. I thought this would help me get a better feel for why the 2nd call to standby wasn't coming back to me (i.e.: i could use more embedded sys background).
@tulip sleet I also dorked around with Eclipse. But the more I used Eclipse, the more I gasped, particularly around managed make files. OMG!
@tulip sleet I got sad just thinking about Eclipse and Keil. And Happy thinking about Atom. I mean, i get pluggins that show me the actual colors of hex values. Now THAT is useful!
note that when we link we use gcc to link, not ld. Not sure if you are doing it as well. The settings in the Makefile and in py/*.mk are tuned to do the right thing.
@tulip sleet - i'm using ld because the examples i found did this. hmmm...
Have you tried Atmel Studio? (Or maybe you don't have Windows.) Another approach is to use Atmel START to build a simple program: it generates a Makefile that does "the right thing", I believe (though I haven't tried it). https://start.atmel.com
$(BUILD)/firmware.elf: $(OBJ)
$(STEPECHO) "LINK $@"
$(Q)$(CC) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(LIBS) -Wl,--end-group
$(Q)$(SIZE) $@ | $(PYTHON3) $(TOP)/tools/build_memory_info.py $(LD_FILE)
@tulip sleet i don't have Windows.... and thank you. i will take a closer look at the makefile w/in atmel-samd.
try one of the simple examples in Atmel START as well. The config .h files are kind of a mess, but the basic .c and Makefile files are fairly simple.
@tulip sleet Will do. I very much appreciate your time/help.
happy to help!
@tulip sleet - ooh YIPPEE (at least for now...?) the Atmel start goo worked... WOW...i guess the lesson for me is USE THE DARN HALL (two LLs intentional) layer.
FYI - I checked the 3.x branch, and it is not updated. @dhalbert, let me know if you need someone to test this when you pull it in. I have pretty much ready to test it. It is currently complaining to me that I am sending kwargs that are not supported.
what is OSError 28? is it out of space?
had CPX logging all night and finally at 0 bytes left
I am new to circuitpython but I have a neopixel strip connected. It's RGBW so I was wondering if the circuitpython neopixel lib supports them.
@bronze geyser what course are you taking? I was searching the ARM offerings earlier today, coincidentally.
@loud reef yes it does here is an example of the "color wheel" on a feather_m4_express -- the main change was to add the bpp=4 parameter to the configuration line ```
from digitalio import *
from board import *
import neopixel
import time
pixpin = D6
numpix = 8
strip = neopixel.NeoPixel(pixpin, numpix, bpp=4, brightness=0.3,auto_write=False)
def wheel(pos):
# Input a value 0 to 255 to get a color value.
# The colours are a transition r - g - b - back to r.
if (pos < 0):
return (0, 0, 0, 0)
if (pos > 255):
return (0, 0, 0, 0)
if (pos < 85):
return (int(pos * 3), int(255 - (pos3)), 0, 0)
elif (pos < 170):
pos -= 85
return (int(255 - pos3), 0, int(pos3), 0)
else:
pos -= 170
return (0, int(pos3), int(255 - pos*3), 0)
def rainbow_cycle(wait):
for j in range(255):
for i in range(len(strip)):
idx = int ((i * 256 / len(strip)) + j)
strip[i] = wheel(idx & 255)
strip.show()
time.sleep(wait)
try:
while True:
rainbow_cycle(0.001)
except:
pass
finally:
strip.fill((0,0,0,0))
strip.show()
or as noted here - you can spcify the pixel_order and then the bpp is set automatically -- I have not tried taht myself.
Oh, ok. Thanks
the default pixel order is GRBW, but with bpp=3 (it ignores the W). So do go ahead and set bpp=4
@loud reef here is the full documentation https://circuitpython.readthedocs.io/projects/neopixel/en/latest/api.html
@tulip sleet the RTD implies it set bpp based pn pixel_order -- is that not correct?
Note that bpp does not need to be specified as it is computed from the supplied pixel_order.
if you specify order=GRBW, then it sets bpp=4, but if you leave order alone (as None), then it sets it to GRBW but sets bpp=3. https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel/blob/master/neopixel.py. I think the doc is confusing.
agreed -- best tp specify bpp.
I'll try that with the example
It should probably say "Note that if you supply pixel_order, the bpp will be set appropriately" or something like that.
It's sort of implied, since if you don't set pixel_order then it would not know bpp was 4 instead of 3, but it could be more explicit.
@tulip sleet I finally took the plunge and upgraded to Ubuntu 1804 -- so far so good -- no issues yet
only problem I had was getting the shutter screenshot app to be able to edit. It's possible but annoying
i am using cinnamon and it's working fine with the supplied cinnamon instead of having to use a ppa.
I did update the team-gcc-arm ppa to use "bionic" but I was altready at the latest version so no real change. all the boards built fine with the toolsets I have installed
here is some code for logging on to CPX, without the need for any lib in CPX, for "CircuitPython 3.0.0 on 2018-07-09"
@raven canopy well...i'm not sure i'd recommend it. i get up super early and love to watch videos while i walk on a treadmill. so i found this udemy course - https://www.udemy.com/embedded-system-programming-on-arm-cortex-m3m4/learn/v4/content - it caught my eye because of arm cortex-m...i figured it's better than watching some other stuff...
My feather M0 adalogger and sensor came in the mail this morning. ๐ป
@raven canopy the instructor / guy / person got into installing Keil to make main.c ... it was at that point i went down a rabbit hole saying "how hard can it be?" to do this using Atom....so just for jollies I check out someone else. They use Eclipse...ho ho...i think..i've used that before...so i go down THAT rabbit hole...but recalled...oh just how yucky managed make / etc. was and then there are all these layers... so back to "Atom - good to meet you, how hard can it be?"
@raven canopy then Atom says to me "Hey HappyDay...check out the plug in that shows all these colors..." this made me think...well, ok...but...
@raven canopy i did find https://hackaday.com/2016/03/22/embed-with-elliot-arm-makefile-madness/ very nicely written/informative. The challenge is alot of stuff is using the ST chips.. microchip's "programming to the peripherals" and such seems a tad more convoluted/complicated.
any update for current version of bossac?
like using the GUI that comes with bossac
i clicked info then used info from it before i changed to match the settings.... select; "boot to flash", "brownout reset", "brownout detect", "Erase all"
circuitpython working fine
<@&327289013561982976> is there a way to mount the sd card for windows to use when plugged into PC?
@upbeat plover Not that I am aware of.
mkay thanks ill just take it out and put it something else lol...
thanks for reply
Just to confirm after a bunch of searching... There is no TFT support in Circuit Python, right? I have a 480x320 FeatherWing, but did not see HX8357D in the Bundle.
And I should say that I am using 8266, not M0. ๐
@torn grail there is support for some TFT displays see https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display/tree/master/adafruit_rgb_display
Youโre welcome
is there a way in the REPL on a circuit playground express running circuit python to get its circuitpython version out of it? trying to determine why my installed libs files are getting that mpy msimatch
ah wait if you enter repl and reset it prints it out
sweet got it running. once youre set up this is pretty sweet
When I log in to the REPL on ESP8266, I get this message: Do you?
"Adafruit CircuitPython 3.0.0 on 2018-07-09; ESP module with ESP8266"
I'm still trying to make the HX8357D display work... Uploaded all the latest modules from adafruit_rgb_display and adafruit_bus_device, and have esp8266_tft_featherwing.py saved as main.py on my device. When I reboot, I see a white screen. No errors in the serial console, even when I try a hard or soft reset. Any ideas? Running 3.0.0 on ESP8266. Thanks!
O I C --- The demo script is for the ILI9341. ugh. I'll try changing it to HX8357 and see how much smoke that makes!!
No smoke, but also no fire... Still a while screen.
I guess the hx8353 is not close enough to the hx8357, so it appears that it may not be supported after all. ๐ฆ
@velvet scroll you can also look in boot_out.txt
I have several circuit playground expresses that i bought before 3.0.0 was released.
I have several circuit playground expresses that i bought before 3.0.0 was released I flashed one of them with the new release using uf2 file. When I reset it the demo did not work. There was no indication of any errors. Do I need to refresh the /lib diretory too?
You'll need to use new bundles too, yes
@tulip sleet this is what I've been heads down on https://github.com/tannewt/circuitpython/tree/i18n now to make dinner
@idle owl You should put a note in the docs for updating from 2 to 3 that in order for the demo code to work, you need to replace the files and directories in lib with new ones from the new 3.0.0 library bundle. I mention this because I have a number of cpx's that I bought before the change over to 3.
may i ask, did adafruit opensource the bin for the as7262 flash chip? i could not find it on github or the website?
@marble hornet are you looking for the binary (?) or just the library? https://github.com/adafruit/Adafruit_CircuitPython_AS726x
@slender iron woot! you have been on a tear! I noticed micropython is commented out. Is that temp?
also, your "flash chip" may have me confused. i couldn't find a flash chip with that part number...
@raven canopy I am looking for the bin that is flashed onto the onboard soic flash via the pogo on the back. Link to store incoming...
@marble hornet after looking at the datasheet, i understand what you're asking now. per the sheet, the software comes from the manufacturer (ams). i looked on ams's website and didn't see any downloads available. i imagine the license is proprietary and restricted to release...
@raven canopy thanks!
there has to be a way around that
[insert devious laugh]
read and save off of purchased unit?
good night all, sleep well
hmmm from adafruit_crickit import crickit is triggering a memory allocation error - do I have to remove libs from the bundle to be able to run this?
(circuit express w/ crickit)
File "code.py", line 4, in <module>
File "adafruit_crickit.py", line 58, in <module>
MemoryError: memory allocation failed, allocating 235 bytes
it seems like its in the library itself
im using cpx bundle for v3 of circuit express
that firmware has the Crickit library "frozen" into the firmware to keep available space to a maximum.
yep. that link is to the 3.0 version.
no. that is entirely different firmware. so go into bootloader mode (CPLAYBOOT) and drag that over.
ah i see. ok one sec
yeah that did it
stupidly i had a motor with a wheel plugged in
so naturally it dove off the table haha
๐
now to bother you with one more - why is it asking to enable a pullup resistor butn ot list that in the given examples? (Setting up a servo now)
File "code.py", line 4, in <module>
File "adafruit_crickit.py", line 373, in <module>
RuntimeError: SDA or SCL needs a pull up
examples dont show setting SDA or SCL pull ups
oh
cause i cut power
alright sweet got both kinds of movement working
thanks
see...didn't need me at all! ๐
yeah didnt see itb efore because i powered it down so i wouldnt have it firing itself off of the desk again
now to think up a project that uses this thing...
@bronze geyser you may be interested in segger embedded studios as well. It is better than Keil in many ways. No limit for personal usage, debugging is super easy as long you have jlink.
if i'm being honest, i've been spoiled by Atmel Studio...
Those vendor-specific is all nice, though I hate switching IDE when switching mcu :)
Keil is still look like 9x GUI ๐๐
understandable. i've only worked the SAMDs at this point. i will need to figure something out if i ever dive into the nRF; still haven't even plugged in the DK yet. ๐
*esp doesn't count, since its pretty much flash and hope...
@tulip sleet yup, just experimenting
Yeah, I would hope to just use Segger Studio for all mcu now. It is still gcc, so we have option to compile with makefile project with ease and decent debugger tool
@slender iron in case you didn't see it, i put in the PR for adabot. once that is merged, i'll run the full monty. i have a suspicion though that the patch script is going to need some additional GitHub API handling for the data throttle; i've seen mixed numbers of repos when running tests.
and..i finally got FREQM clock setup working. first measurements of DFLL: 467nnMHz
@raven canopy will get to it in the next few days after taking a break
k. i'll be out of town for the next couple weeks starting Sunday, but not a total ghost.
@marble hornet @raven canopy https://github.com/sparkfun/Qwiic_Spectral_Sensor_AS726X/tree/master/Firmware/Firmware for AT25SF041
@tawny creek nice find!
Building a board for this myself!
Hey @Navyjetfixer. Sorry for the silence. I've been busy. What libraries are you looking to have? Steps 5-8 above are ones you should be able to help with to get started. Someone can then follow up with the others. Thanks!
Lets say I connected the trinket m0's unused pins and want to use them, is there a guide where I can learn how to properly define them? or move around existing pin definitions? (Is there a general guide to doing this, where should I begin) --
is there a way to set localtime on CPX, currently all i can use the time.localtime() for is to check how long has been powered for
hey all, im trying to load circuitPython on the Adafruit Feather M0 WiFi - ATSAMD21 + ATWINC1500
but not sure which version should I use?:
https://github.com/adafruit/circuitpython/releases/tag/3.0.0
And which library enables using the WINC1500?
thanks!
@nocturne sluice there is no WiFi support for that board in CircuitPython. You can run CP on it - use the Feather M0 Basic image. The only WiFi support is for the ESP8266.
hello everyone
@proven bluff Hello
@tawny creek you can just look at atmel-samd/boards/*/pins.c to see how other boards do the mapping. The general idea is to maximize available functionality, such as exposing a set of pins that can be used for a particular SERCOM, etc. It's kind of tedious. Ladyada calls this pin sudoku, because changing one pin usually has a ripple effect.
how do I debug print to serial from within the C code in circuit python? I'm running my code on Feather M0 Express if that matters.
@proven bluff I'm not sure I unerstand what you are trying to do. Can you provide an example?
So I'm in the middle of shared-modules/os/init.c, I don't have a JTAG debugger and I wanted to use a printf like function to display some values.
I thought you could just use printf @tulip sleet is there any reason not to just use printf ?
a simple printf() is not usually available but mp_printf(&mp_plat_print, "%d %d", i, j) is
thanks - does DEBUG=1 enable simple printf? I thought I saw some examples using it
i don't think it's across everything; there are some files that define a printf() macro when a debug flag is enabled
ah --thanks -- sorry for the confusion.
it would be nice ๐
thanks @solar whale and @tulip sleet
@proven bluff Good luck! I'm glad you asked -- I learned from it as well ๐
@bronze geyser I learned make from this book (which for some odd reason appears to be offered online, in .PDF -- for free viewing). /boggle
Hmm, is uctypes a built-in library? I can't seem to find it in the downloads, but importing it in my code gets "ImportError: no module named 'uctypes'"
what's the context, @small cypress
One time I used 'ag' on an entire source tree only to find what I was looking for was enumerated in the same file I was working on. ;)
looking to get this working in CP: https://github.com/pimoroni/vl53l1x-python
Do you have a paste or screenshot of the error in context?
@small cypress uctypes is a micropython thing:
http://docs.micropython.org/en/latest/pyboard/library/uctypes.html
which is their small size optimized implementation of the full Python ctypes module:
https://docs.python.org/3/library/ctypes.html
which is what the library you linked is using
yah. that may be out of date. sry ๐ฆ
see the warning though
you're running into one of the micropython vs. circuitpython differences
i think it was originally left in early on, but not sure what current status is
it's actually still there
it's only available on the unix port, though
because it doesn't make any sense on a non-Von Nemann architectures
and that driver looks like it's a python wrapper for a C library
@small cypress this may provide a useful reference / example of what would be required for circuitpython:
https://github.com/adafruit/Adafruit_CircuitPython_VL53L0X/blob/master/adafruit_vl53l0x.py
@small cypress did you look at the existing CircuitPython VL53L0X library? I would work from that, and adjust any of the protocol functioning...
another newbie question: how do I run all the tests I can? tests/run-tests passes with 33 tests skipped
hmmm might try that
I don't want to make a PR with some test failing
@small cypress and compare it to the arduino version so you can see what it looked like originally:
https://github.com/adafruit/Adafruit_VL53L0X
@proven bluff if you setup a TravisCI account, and link it to your forked repo, it will run all the tests.
thanks
there is a way to do it all locally...i've just never used it. ๐
Treats / and \ at the end of path as if it wasn't there.
Side effect: /dir/file.py/ is a valid path despite file.py not being a directory.
hmm, github is trying to be too smart when suggesting PR branches didn't notice the destination is adafruit/circuitpython
Hi. I'm running into some issues building the unix port at the EuroPython sprints, and I'm wondering if anyone has advice for how to troubleshoot.
I'm running:
make axtls
on osx in the circuitpython/ports/unix directory.
I'm seeing the following errors:
sha512.c:119:15: error: implicit declaration of function '__be64_to_cpu' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
w[t] = be64toh(w[t]);
^
../ssl/os_port.h:68:20: note: expanded from macro 'be64toh'
#define be64toh(x) __be64_to_cpu(x)
^
sha512.c:119:15: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
../ssl/os_port.h:68:20: note: expanded from macro 'be64toh'
#define be64toh(x) __be64_to_cpu(x)
^
2 errors generated.
make[2]: *** [sha512.o] Error 1
make[1]: *** [target] Error 2
make: *** [build/libaxtls.a] Error 2
@small cypress could you file an issue about uctypes being in the doc but not in any build? Thanks.
@fathom trellis I see that's a warning converted to an error. You could remove -Werror from the Makefile.
make sure you did git submodule update to get the latest axtls
I don't see that issue when it's compiled on Linux
so it may have to do with your build environment
This is in the Makefile: CWARN = -Wall -Werror
I have a few questions about using a battery, with adalogger;
How does the CHG LED work?
3.7v 2045mAh 7.8Wh work?
@tulip sleet Do I file it on the doc itself?
no, just in adafruit/circuitpython; there's a "documentation" tag, I think.
@small cypress here: https://github.com/adafruit/circuitpython/issues
the button called "Labels" let's you tag the issue "documentation"
hexthat is asking same questions in projecthelp
So this exists: http://circuitpython.readthedocs.io/en/3.x/docs/library/uctypes.html
Yet if I try to import it on a Feather M4 I get "ImportError: no module named 'uctypes'", which implies maybe it's not actually included, despite the docs implying it does?
not sure how to add a label to it myself, think you need write access
no prob we will label it
done
@tidal kiln @tulip sleet sorry for double posting question, posted first here and then noticed it was more a project help thing then circuitpython... sorry guys wont happen again
no prob, just delete your originals if you move or give a pointer to the channel you've moved to
im not sure how to do a pointer but i can delete =}
hashtag hashtag #help-with-projects ๐
sweet thanks
all of the hashtags, or one anyway
Hi, thank you for this forum. Have done some googling, but can't find anything about USB Midi and CircuitPython - are there any projects or libraries out there?
@half sonnet we have an open issue for midi, but no one's started working on it yet: https://github.com/adafruit/circuitpython/issues/672
Thanks @tulip sleet I'll see what I can work out myself
flogs himself by just trying to get the VL53L0X library working with the VL53L1X
Hokay. Thank you all. So...on my quest to learn more about the SamD21 by dorking around with small "getting to Blinky" ish apps, I ended up taking the route I wrote up here: https://github.com/BitKnitting/wakey_circuitpython/wiki/Deeper-Dive-into-the-SamD21 ...thought others might find useful (if not, I apologize).
@tulip sleet thanks,, good idea! Is it non destructive for me to just tinker around with the pin configurations? or is that ripple effect something I can be more aware of in some way?
Just finished with the CircuitPython Open Spaces at PyOhio. Went well!
This merges from https://github.com/micropython/micropython/commit/25ae98f07cb3c4488cb955403dfe56b8bb8db6f0.
I did some REPL testing, and it passes the Unix tests (that took some work), but some hidden issues may show up. Atmel, esp8266, and nrf all compile and bring up the REPL.
Some notes:
- Churn in
extmod/vfs*: some files removed, some renamings. We exposed some statics for our use elsewhere, which means it was not a simple merge. - In MPy, lots of
#ifdef->#if, but withou...
holy moly, Dan! that looks even more painful than i imagined. a tip-o-the-hat, and thank you! ๐ฉ
@hathatch thank you for the Segger tools recommendation. i'm in process installing.
Adafruit_CircuitPython_Featherwing motor isn't working
I'll file an issue but we tried to use it and it says something like "pwm doesn't have frequency"
well, it doesn't if you don't give it one... ๐ค ๐
Hmm, would it be possible to add uctypes to CircuitPython from MP? Trying to figure out how to use the existing library for the older ST sensor has me wanting to run and hide.
@idle owl do you have more specifics? what code were you running?
@tidal kiln I'll have to have him run it again to get the exactly error but we were running the code from the guide. https://learn.adafruit.com/adafruit-stepper-dc-motor-featherwing/tdicola-circuitpython
I don't have it in front of me anymore.
[unrelated to above] hooray for predictably reoccurring HardFaults! always means your getting close to being complete...at least that's what i'm telling myself on this one. ๐ ๐
@idle owl i'll take a look through guide for anything obvious. but, yah, if you can recreate the error, let me know. (or is it too late?)
@tidal kiln Greg said he'd try it again tonight, but I'm not sure he'll have time. If I don't get him to do it, I'll try to recreate it when I get home. He's super new to CircuitPython so I'd need to walk him through recreating it.
It was failing on line 77/78 of stepper.
@idle owl i think i see it. looks like a bug.
@tidal kiln That's what I thought
@tulip sleet -- My submodules were already up to date. I just pulled them down when I forked the project today. Your tip worked, and the build completed successfully. My environment is OSX High Sierra
@idle owl lots of layers, pretty convoluted, but i'll try:
adafruit_motor/stepper.py in StepperMotor __init__:
self._coil[i].frequency = 2000
where _coil is a tuple of outputs that should support PWM. However, in adafruit_featherwing/motor_featherwing.py, the stepper is created with something like:
self._stepper1 = stepper.StepperMotor(self._pca.channels[10], self._pca.channels[9],
self._pca.channels[11], self._pca.channels[12])
and _pca is a PCA9685 instance. So we look there. In adafruit_pca9685.py, .channels is a PCAChannels instance, the accessor of that returns a PWMChannel (from the same adafruit_pca9685 module). That class has a frequency property, but no frequency setter.
woo. that's a quick brain dump. let me read through it and edit if needed....
Right. Needs to be set to True I thought. I figured it was a change from 2.x
this is the problematic class:
https://github.com/adafruit/Adafruit_CircuitPython_PCA9685/blob/master/adafruit_pca9685.py#L60
but i'm not sure if the problem is that class's lack of a frequency setter, or if adafruit_motor/stepper.py is doing something wrong.
my guess is the former
or, to put it another way, this would work:
print(self._coil[i].frequency)
but this doesn't:
self._coil[i].frequency = 2000
the other important detail is that the PWM support is coming from the PCA9685, and not a built in PWM channel.
i.e., you're using adafruit_pca9685, not pulseio.PWMOut
@idle owl it might be an easy fix, if you want to try??
hey circuit python folks! i'm not able to find the files to copy to my trinket to keep my os from putting hidden files on my device. i'm following these instructions, but when i click on the link to download the zip, the unzipped files don't contain the files i'm looking for: .fseventsd
.metadata_never_index
.Trashes
am i just looking in the wrong place? any help appreciated ๐
@idle owl in case you want to try - add this:
@frequency.setter
def frequency(self, value):
self._pca.frequency = value
at line 70, here:
https://github.com/adafruit/Adafruit_CircuitPython_PCA9685/blob/master/adafruit_pca9685.py#L70
@fierce oar i see them. the link on that page just goes to the Downloads page for the Trinket M0 - that's where the actual .zip files are - did you download one of those?
@fierce oar that's what i see. maybe your software is hiding dot files?
@fierce oar if you're using a mac, hold down Cmd + Shift + . (dot) in the finder window to see hidden files
press the same key combination again to hide them
@ninja--#8902 awesome. thanks.
@fathom trellis Holy moly that's useful
even better, if you want to see hidden files permanently, do:
defaults write com.apple.finder AppleShowAllFiles YES
killall Finder
(fyi this will cause all your currently open finder windows to close)
^^^ well, that's intriguing... ^^^ ๐?
@tawny creek the pin shuffling is done by studying the possible assignments based on the big tables in the "I/O Multiplexing" section in the datasheet.
487dbdb py/compile: Use alloca instead of qstr_build wh... - dpgeorge
58c7856 docs/esp8266/general: TLS limitations: Mention ... - pfalcon
3a9b15f zephyr/README: "make qemu" was replaced with "m... - pfalcon
0719c93 extmod/modussl_axtls: socket_read: Handle EAGAIN. - pfalcon
1cf6d48 extmod/modussl_axtls: Typo fix in comment. - pfalcon
@tulip sleet Thank you kind sir!!
would consider myself a newbie when it comes to all of this, and appreciate the guidance! I haven't had much time to dedicate to electronics recently ๐ญ
Hello! Just started playing with my playground express today. Question -- when looking for add on modules I found - https://learn.adafruit.com/character-lcds/circuitpython-code - which says it works with circuitpython, and even has an example express board in the wiring diagram, but I don't see anything about the playground express or if it would be possible to wire to that too?
Hello! Just started playing with my playground express today. Question -- when looking for add on modules I found - https://learn.adafruit.com/character-lcds/circuitpython-code - which says it works with circuitpython, and even has an example express board in the wiring diagram, but I don't see anything about the playground express or if it would be possible to wire to that too?
@drowsy swift if you give me a link to your specific character module I can help you out with wiring
the issue is that sometimes some pins are swapped and I don't want to give wrong info
CircuitPython support "Adafruit Mini Color TFT with Joystick FeatherWing"???
that thing is pretty sweet, think of making a portable game with; feather M4, adalogger feather wing (to store massive amounts of code) and the "Adafruit Mini Color TFT with Joystick FeatherWing"
What is the REPL command to get how much ram you have used or have left? I remeber seeing Tony D do it in a video, but not sure of how... I thought it was in the "import os" but i dont see it when i do dir(os)
@proven bluff Thanks for your reply. I haven't chosen one yet, but the one I linked is a likely contender, I like the RGB backlight option. So I do have all of the pins required for one? It comes down to a matter of translating the instructions to the correct ones?
import gc
gc.mem_free()
might be what you're thinking of @upbeat plover
@slender iron I'm getting all the builds to work on the micropython merge. Is there any reason we are still building the qemu build?
@drowsy swift The i2c/SPI backpack is used to talk to a character LCD.
๐น https://learn.adafruit.com/i2c-spi-lcd-backpack/circuitpython-code
๐น https://github.com/adafruit/Adafruit_CircuitPython_CharLCD
i2c / SPI character LCD backpack
http://adafru.it/292
@tulip sleet just pulled PR1068 and am buildiing boards -- tried CPX crickit - no problems yet.. Anything in particular taht it would be helpful to try?
hi lady ada and friends ๐
@solar whale thanks for testing. esp8266 merge was not easy, so if you can try some things, esp network, filesystem, and repl-related, that would be great. nrf could use more testing too but that is undergoing enough change that I'm not as worried about breaking it. I'm still trying to get the docs build to work and I think I will remove the qemu-arm build -- not sure it is useful for us anyway. I tried it locally and qemu itself crashes (!).
OK -- I'll concetrate on the ESP8266 and nrfs
@timber mango Would I switch the vusb to my vout to get the 5v needed? https://learn.adafruit.com/i2c-spi-lcd-backpack/circuitpython-code and are the connections scl and sda universal across boards? (I don't know what they stand for)
HD44780 is a chip used on many (not all) character LCD's.
It needs I think 6 pins back to the microcontroller, plus power, ground, and especially, a 'contrast' line (not controlled by the microcontroller).
The backpack saves you a lot of wiring, but if there's enough GPIO on a given board, you can drive it 'manually'.
@drowsy swift Not sure I understood all that.
Signals (pins) SDA and SCL are specific to a two-wire serial protocol called i2c (inter-integrated circuit; aka iic or SMB).
@timber mango doesn't look like I understand much here either ๐ This is what I have to work with https://learn.adafruit.com/adafruit-circuit-playground-express/pinouts
Make faster and easier than ever with MakeCode, code.org CSD, CircuitPython or Arduino!
Voltage levels can be a problem; I don't remember offhand what the elegant solution is for a 3.3 volt target board such as the Circuit Playground Express.
You may need a level shifter IC such as 74HCT125 (let me look that up for sure).
http://adafru.it/1787 74AHCT125 buffer (level-shifter).
wow all you care about is a stupid microchip ๐
@drowsy swift Well you want to look at i2c and SPI and GPIO on the pinouts page of the learning guide for the Circuit Playground Express.
8 GPIO (general purpose Input/Output) pins. That's more than enough to drive a character LCD using a 4-bit parallel interface.
Not sure if you can (easily) do SPI (Serial Peripheral Interface) with the Circuit Playground Express (CPX) or not. @solar whale or @tulip sleet would know (several others as well).
So all of the pins are GPIO? I don't have to use them for their printed purpose? like I don't have to use a6/rx for rx?
No just about (if not every single) port pin is GPIO on most boards. There may be one or two exceptions but I can' t think of any at the moment.
I'm not used trying to squeeze an extra GPIO pin out of a given system, so I may be mistaken.
The silcscreen labels are unknown to the microcontroller. ;)
In the case of an analog input, you are not going to see that on every single pin by any means.
@timber mango at first glance , i don't see the SPI pins broken out on the CPX -- I have not tried it. SPI is used for some of the internal sensors.
Traditionally any pin good for GPIO (including ones you don't get a solder pad for) are labeled D1 D2 D3 and so on, somewhere in documentation.
These correspond 1:1 with the Arduino IDE development environment.
@jerry I just don't remember if software SPI is used for CPX projects or not.
@drowsy swift you don't need hardware SPI to do SPI projects but they won't run as fast, and there may be software issues you'd have to resolve less easily.
@timber mango -- hold on -- I think they are there - just not in the guide -- still looking
Is there a good resource I can use to learn more about this stuff? Buried somewhere in the adafruit site or elsewhere? Seems like most of the pages I've come across are only so technical
SCL and SDA are SERCOM 5.1 and SERCOM 5.0 (respectively).
@drowsy swift I skip over a lot of introductory matter, but any article in the Learn site that has a @idle owl byline is going to be good for you. ;)
Once you are not swimming in new terminology it starts to make better sense.
I would personally start with the basics, to get comfortable with very simple expectations, such as uploading the firmware and how that system (all by itself) typically behaves.
This way you get a gut feeling for when it's not performing as expected.
Get a Parts Pal, too.
http://adafru.it/2975
@timber mango -- in the pins.c https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/boards/circuitplayground_express/pins.c board.SCK,board.MOSI,board.MISO are A1,A3,A2
@solar whale right right right
Awesome, I had the built-ins page next on my list to read. I had finished the first round of setting it up yesterday, adding libraries, trying repl and all...Lol, before you linked the parts pal, I was thinking you meant an actual person
haha yeah Howard the Parts Pal .. he visits here right after the Mac Tools guy leaves ;)
I have a ST7565 wired (and working) to CPX.
http://adafru.it/250
oooo that one is nice
It is at least technically an SPI device.
I am not able to remember a thing about how I programmed it -- oh wait I wrote a Circuit Python driver for it (or a direct program in CircuitPython, anyway)
I also did one in the Arduino IDE (probably used an existing Library that LadyAda wrote aeons ago)
I even got the Adafruit graphic working on it.
Unpublished because at the time I hadn't understood github very well, and was mixed up about intellectual property right and so forth.
Sounds like you've been doing this for a while now?
I have to leave the house. Ask in #general-tech and in #help-with-projects if your questions aren't very much related to #circuitpython-dev -- ask those (and any difficult SAMD21 or SAMD51 hardware questions) right here, in #circuitpython-dev .
gotcha, will do, and thank you!
Nice to meet you. Looking forward to the next time.
@tulip sleet so-far so-goo on esp8266 -- connect to network - I can upload/download via ampy -- send data to adafruit_io -- looks good!
vg!
@tulip sleet I thought we used it to run tests. I'm ok turning it off
hi hi @fathom trellis glad to see you here (we met at pycon us)
it does run a simple test. The unix port runs most of the tests, I think.
@small cypress you may be able to use struct instead. Its worth looking into
@tulip sleet up to you!
i'll double check and remove it if it is duplicative.
kk. back to chores for me
@tulip sleet not looking good for nrf52832 --- does not come out of bootloader after load -- still checking
i only tried pca10056
I'll try that next -- want to double chech the SOFTDEV settings
@tulip sleet reverting to master works on feather52832 -- pr1068 does not -- do you want me to open an issue?
or just post to the PR
just add a comment to the pr
will do
@tulip sleet never-mind ----I repeated the build -- including reflash of the bootloader and now it works ...... will try a few more tests
!
I'm confused -- It now works with both the default SOFTDV_VERSION (2.0.1) and (5.0.0) -- I had flahed both the bootlader and the image a few times earlier when it failed --- looking at history to see if I had somehting wrong -- in any case, its fine now -- REPLOK -- it does a BLE scan -- ampy works
i myself have not internalized what needs to get built and loaded with what
on the nrf boards
or I should say ampy works as usual -- still some ampy issues with ampy the nrf port -- but not new
the defaults should be OK , but I have been using the SOFTEV_VERSION 5.0.0 on the 52832 -- just to be cool ๐ I have no idea what the diffences are. pca10056 defaults are fine s140/SOFDEV_VERSION 6.0.0.. 52832 uses SD=s132
ampy "get" does not work on the nrf's -- I think there is an issue open already -- I'll verify
https://github.com/adafruit/ampy/issues/47 note sure if this is really an ampy issue or a CP issue -- the nrf port does not have sys.stdout
I pulled this PR and loaded it on to a few boards for test:
CPX_crickit -- no issues
esp8266 - no issues - tested Iternect connection -- send data to Adafruit-IO - tested ampy read/write
nrf52 - feather52832 -- on first attempt I had several cases where to board would not exit bootloader - after flashing. Treied multiple times. Then in order to provide documentation, I reverted to current master build - and reflashed bootloader and CP (used default SD=s132 SOFTDEV_VERSION=2.0.1)
this w...
@hathach could you confirm this suggested change? Thanks.
From @jerryneedell in https://github.com/adafruit/circuitpython/pull/1068#issuecomment-40870499:
note that instructions for loading the bootloader to the feather52832 are out-dated on
https://github.com/adafruit/circuitpython/tree/master/ports/nrf/boards/feather52832
the command is shown as
$ make BOARD=feather52832 SERIAL=/dev/tty.SLAB_USBtoUART SOFTDEV_VERSION=5.0.0 boot-flash
but it should be
$ make BOARD...
Removed qemu build because it does only minimal testing and is building for Cortex-M3 architecture.
Travis is finally happy, so this is ready for review. Thanks!
This is related to the AMPY issue
https://github.com/adafruit/ampy/issues/47
the atmel samd and esp8266 builds have sys.stdout implmented, but the nrf52 build does not and tehampy "get" function fails since it relies on sys.stdout.
I noticed that some key items are not enable in the nrf mpconfigport.h
nrf mpconfigport.h
#define MICROPY_PY_SYS_STDFILES (0)
#define MICROPY_PY_SYS_STDIO_BUFFER (0)
#define MICROPY_PY_IO (0)
#define MICROPY_PY_IO_FILEIO (0)
esp8266 mpconfigport.h
#define MICROPY_PY_IO (1)
#define MICROPY_PY_IO_FILEIO (1)
#define MICROPY_PY_SYS_STDFILES (1)
#define MICROPY_P...
lemme test each pin - i checked the SPI flash (played 3min long audio file) but didnt do each GPIO :)
Hi All, Just got Adabox008, and thought I'd build a proper bump-bot. I saw JP's Carnival Bumper Car bot, and the Ruiz's Brothers' Lego Crickit rover, but both of those use MakeCode. Not that I'm against new fangled programming tools, but I'd really feel at home with C (as in Arduino) or some flavor of Python (as in derived from C) or anything else that is of that ilk (procedural, structurable programming language). I'm most familiar with languages such as these, as I've been around since Fido's grandaddy was a tiny pup (actually, JFK was President when I took my first programming class). So my question is: is there a piece of code that I can use to build a bumper car bot program that is written in CircuitPython, or Arduino that I can use with a Crickit (either the CPX or the Feather version) and where do I find it? Circuit Python on CPX would be best, as I can make use of all of the CPX on-board goodies as my desire to add totally cool and useless features (i.e., creeping elegance) to the bot. My goal is to provide this bot, as a ruggedized toy to my 1-year old twin grandkids. - Thanks
Still playing with automated testing. Current project is automated board detection using the logic from mu. Does anyone have a suggestion for a high quality large (10 to 15 port) powered USB hub? My cheap 5 port unit is not up to the task ๐ฆ
@torpid goblet I like plugable's hubs
@slender iron thanks I'll look them up.
@slender iron Does https://plugable.com/products/usb3-hub10c2/ look sane?
@torpid goblet On my Linux system, I have had problems with connecting to CP devices via USB 3.0 hubs. USB 2.0 hubs work much better for me. Of course, you mileage may vary ;-)
@solar whale thanks. From a testing point of view would their be a difference USB 2.0 and 3.0? If so I will go with 2.0 to avoid the hub trigging extraneous errors.
The only testing impact I have seen is that it won;t connect on the 3.0 hub ๐ I have not ut a lot of effort int testing this. I t was jsut simple to use a 2.0 hub. I hope others can comment on their experience.
@solar whale thanks, What About doing hard reset. I was looking at splicing a relay into the power lines of the USB cables to be able to do hard resets. Would that be useful or is that getting too carried away?
I have two of their 7 port hubs. they are usually 4 port hubs daisy chained internally
my hub allows me to cut the power to each port. That comes in handy. It does not cut the data lines which can be problematic if the poard is externally powed, then it connects even if the port is "off". It is a vety inexpesive 4 port belkin hub.
sorr about the typos -- having trouble editing...
Is there a Raspberry Pi specific channel to ask about pinout/hardware stuff? (I'm new to discord and Pi but have programming experience---but not for embedded systems etc.)
Or do I just ask in #help-with-projects ?
interesting. thanks
@brazen rover #help-with-projects or #general-tech
OK. All I got so far is crickets over there... I guess people are asleep or doing other stuff on a sunday night.
thanks for the response @solar whale
Thanks for working on this!
7k bytes seems like a lot! Split it into its own module and list it here: https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/mpconfigport.h#L221
Remove this whole line. This has it always download it when the line above covers the other cases.
Its similar to these instructions: https://circuitpython.readthedocs.io/en/3.x/docs/common_hal.html
(Sorry for the slow reply.)
The warning states its unsupported. We could add it back as ctypes but I doubt its what you need.
Yeah, right. I changed it from dfu-boot to dfu-bootloader to be consistent with the "bootloader" only target that need jlink. But forgot to update the document. After the next usb PR, I will focus on bootloader, making it submodule + various enhancement, then I will update bootloader document for both nrf52832 and nrf52840 (e.g how to enable and use OTA etc ...)
PS: and also migrating the bootloader on nrf52832 to S132 v6 as well, having the same API with S140 v6 will make maintaining repo easier.
@timber mango thank you very much for the o'reilly make book recommendation. It certainly clarifies much of the initimidated confusion i have had when looking at make files. To the point that some things look quite elegant. I can see the engineers in the late 70's and 80's find honing their toolset. What a legacy! How wonderful that we can stand work from the shoulders of their work.
Is there a CircuitPython driver for the new miniTFT OLED https://www.adafruit.com/product/3321 I thoughtt I saw one, but cant' find it.
Add a dazzling color display to your Feather project with thisย Adafruit Mini Color TFT with Joystick FeatherWing.It has so much stuff going on, we could not fit any more parts on the ...
@solar whale I haven't seen one. What IC is the display driver?
still trying to find that out -- not finding a lot of information
It might be using this display -> https://learn.adafruit.com/adafruit-mini-tft-0-dot-96-inch-180x60-breakout/
not sure if that helps
yup - just found that as well -- may be relevant!
But the joystick feather wing says it uses I2c not SPI
it uses both
i2c for the joystick and spi for the display, afaik
hard to say for sure with no docs or schematic
@stuck elbow Its not clear to me how to set up the RGB driver for this - It support the st7735, but since this goes through the seesaw, I'm not sure how to configure it.
the display doesn't go through seesaw
ah -- thanks so it s just eh backlight
backlight and maybe the dc/rst pins
but they are normal pin objects, you can pass them around
ok -- that helps me get started
Nordic #SoftDevices S112, S132, S140 v6.1.0 released! Find more info on our product pages: https://t.co/FyanGlv6FB
I am totaly confused by the lack of documentation for the miniTFT -- no idea how to assign the pins ...
@solar whale https://github.com/adafruit/Adafruit_CircuitPython_seesaw/blob/master/examples/Joy_Featherwing.py
@opaque patrol -- Thank you!!!
Just looked at it though, don't see the tft
yes - tahts a different board -- getting closeer though!
Make a game or robotic controller with this Joy-ful FeatherWing. This FeatherWing has a 2-axis joystick and 5 momentary buttons (4 large and 1 small) so you can turn your feather board into ...
Look at the image showing the back of the board (or look at the board) and you can see which pins are connected to CS and DC and that there are solder pad to change them
yes - I see the CS/DC, but are thsose for the display or the TFT -- don't seem to work for the display.
This is what I have for the 1.44" display, just need to change the rst pin...```
dc = digitalio.DigitalInOut(board.D5)
cs = digitalio.DigitalInOut(board.D6)
rst = digitalio.DigitalInOut(board.D9)
cs.switch_to_output(value=1)
spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO)
spi.try_lock()
spi.configure(baudrate=24000000, polarity=0, phase=0)
spi.unlock()
cs.value = 0
display = st7735.ST7735R(spi, dc, cs, rst, 128, 128)
Change the screensize too
my confusion is that apparently te RST goes through the seesaw , but I have no idea how to configure taht -- I'm just missing something fundamental here.
@opaque patrol Thanks for trying to help -- As I noted, I' am missing some baisc understaning of how this board works -- maybe more coffee will help.
This is one I want to get, they sold out really fast
I was lucky to get one, now just need to make it work! When I ordereed it, I could have sworn I saw a new driver or some other info pop up but I can't find it now...
@solar whale โ always the answer. I'll ask dean about the board when he gets in
@prime flower Thanks!
I don't know if you need to have rst connected. It defaults to None and is only used if set
I just got an email from Nordic about new versions of the softdevices, now at v6.1.0:
SoftDevice S112 v6.1.0
For a full overview of all changes, please read the release notes located in the installation directory.
Highlights of this release:
Production tested for nRF52832 API to get the SoftDevice variant, flash usage, reserved PPIs, and reserved interrupt priorities Fixed an issue with the S112 6.0.0 workaround for Errata 201 where the HFXO would s...
Just 30 seconds before your comment ๐๐
Saw a new wing added to boards....don't want to say the name in case it is supposed to be secret
so - just to add to my confusin regarding the miniTFT - I thoght I'd just try an I2C scan ```Adafruit CircuitPython 4.0.0-alpha on 2018-07-21; Adafruit Feather M4 Express with samd51j19
import board
import busio
i2c=busio.I2C(board.SCL,board.SDA)
i2c.try_lock()
True
i2c.scan()
[94]
but seesaw is typicaly at 0x49 (73 decimal) not 94 -- 0x5e.
it makes sense taht this would not use the "normal" seesaw address, but without some documentation its a bit confusing!
Reminds me of an undocumented knockoff RTC board, so I ran an I2C scan on it and got back 2 addresses. Then I realized it included a flash chip as well.
progress -- if I change the I2C address for the joy-featherwing demo, I get some button responses .... I'm declaring victory!
This months hackerbox include micropython. https://www.instructables.com/id/HackerBox-0033-Toys-of-Summer
I'm trying to emulate an MCP23008 (I2C I/O Expander) and for that I need pin interrupts.
pulseio.PulseIn almost gives me what I need.
All I need to know is:
- has an interrupt happened since last time I checked
- what's the current pin value.
These are the problems I face with PulseIn:
- I don't get access to the very first edge, so I loo...
Hi, quick question: Does CircuitPython have an inline assembler option?
@tidal kiln It's odd that the MakeCode stuff runs with an empty else block.
@idle owl it's basically like having a pass in the block
Ah, fair enough
that skull fits with the project that I just got from oshpark
@tidal kiln Some of the time the green LEDs on the human don't disappear while receiving the Zombie signal and then the human turns zombie.
Did you run into that at all?
I got it to work once. But twice it did what I described.
@idle owl are you running latest versions?
Yeah, from an hour ago or so?
yah
Now it's working again
Might be a me problem.
Seems to heal a lot faster than the CircuitPython version did. Assuming that was intentional?
@narrow igloo What are you trying to do? Do you mean in a Python Script ? There is no "inline assembler" available via Python
MicroPython has it, I wonder if it was disabled in CircuitPython
@tidal kiln That last update is working consistently.
ยฏ_(ใ)_/ยฏ
hmm
No, it isn't.
I let it sit for a bit, and then it did the same thing.
Roger. Missed that overlap.
@stuck elbow @narrow igloo sorry --I may have misspoke (mis-typed) @stuck elbow can you point to how to use it?
I don't see it ``` >>> dir(micropython)
['name', 'const', 'opt_level', 'mem_info', 'qstr_info', 'stack_use', 'heap_lock', 'heap_unlock', 'kbd_intr']
hmmm - it may be port dependent -- on the atmel build #define MICROPY_EMIT_INLINE_THUMB (0) but the esp8266 #define MICROPY_EMIT_INLINE_XTENSA (1)
no - I don't see ,icropython.asm in the esp8266 either ```Adafruit CircuitPython 4.0.0-alpha-866-gbfbb5cde5 on 2018-07-29; ESP module with ESP8266
import micropython
dir(micropython)
['class', 'name', 'alloc_emergency_exception_buf', 'const', 'heap_lock', 'heap_unlock', 'kbd_intr', 'mem_info', 'opt_level', 'qstr_info', 'schedule', 'stack_use']
Here is the doc for in assembly with micropython -- http://docs.micropython.org/en/v1.9.3/pyboard/pyboard/tutorial/assembler.html#
the same exists for circuitpython http://adafruit-micropython.readthedocs.io/en/latest/docs/pyboard/tutorial/assembler.html so I think I gave you some bad advice @narrow igloo
@opaque patrol @stuck elbow Ive been trying this code on the miniTFT with no luck -- do you see any obvious problems? ```import busio
import board
import digitalio
import adafruit_rgb_display.st7735 as st7735
from adafruit_rgb_display import color565
cs_pin = digitalio.DigitalInOut(board.D5)
dc_pin = digitalio.DigitalInOut(board.D6)
spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO)
Initialize display
display = st7735.ST7735(spi, cs=cs_pin, dc=dc_pin, width=160, height=80)
display.fill(color565(0xff,0,0))
display.pixel(64,64,0)
the screen just powers up all white and does not respond to anything I do -- no erros, just no respone
If that's your whole code, it's probably because it runs it, then falls off the end. Try adding a while True: to keep it from exiting. Guess how I know about this failure mode...
It's not supposed to loop -- Just set the color to red and one pixel to off.
Mine was similar, I set some Neopixels and then exited, but it didn't work. Apparently when the program exits, the objects are freed, and the destructors are called. So the trick is to keep the program from exiting.
hmm - worth a ry
well - it does not exit, but no change on the display ๐ฆ had my fingers crossed
Rats, I was hoping it was that easy.
Thanks for trying!
<@&356864093652516868> meeting in 5 minutes! Notes are here: https://docs.google.com/document/d/1pkvT0XyJWWDyQ05xTqgzW_Pi21hL0P-n-B5VPRS7Xg0/edit?usp=sharing
Adafruit CircuitPython July 30th, 2018 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 change in time and links to past e...
If you like Python and want a once a week, spam free email on all the hot topics, please consider subscribing to Adafruit's Python on Microcontrollers newsletter https://blog.adafruit.com/2018/07/30/python-on-microcontrollers-newsletter-sign-up-now-adafruit-circuitpython/
Catch the weekly news on Python for Microcontrollers withย adafruitdaily.com. This ad-free, spam-free news source is filled with the Python news of the week. Currently our fastest growing newsletterโฆ
Why are all the pictures turning to a certain emoji?
??
(canonical use of 'lurking' from 25+ years online ;)
Group hug to the team. Special thanks to Kattni for her exceptional rotary encoder guide โ found it just in time for a project that was stalled looking for just the right input device. Clear, concise, easy to read!
Oh, and to the HVAC tech who arrived just in time to replace the outside compressor before the worst of the heat wave. He not only dressed every wire with cable ties, he also took the time to teach me how to remove and recharge the refrigerant โ at no extra cost. Free training!
woo woo rotary encoder guide
Very cool guide @tidal kiln .
Put software development on hold (again) this week in order to complete a redesign of the Crunchable Synth PCB platform due to some mechanical issues with TS and TRS jacks. Itโs tough to find vertical PCB-mounted TS and TRS jacks with the same height dimension. Alas. Using the experience to continue to fine-tune my KeyCad (sic) skills.
Led an SMD hot-air soldering/rework workshop at the local makerspace last week. Was surprised to see the interest level. Although all attendees have hand-soldered SMD components in their projects, none had made the next step to hot-air soldering. Lots of oohs and ahhs when the solder paste flashed and components aligned themselves.
This weekโs work will be sponsored by CircuitPython and Ancestry.com. The synth code and associated library should be done by Thursday. Need to put on blinders after that and wrap up the ancestor search so that I can stop paying the subscription fee. I now know where we came from and was able to dispel a couple of fantastic stretched stories that usually make the rounds (and are amplified) during the family reunion.
@errant grail thanks.
here's the CP code for guide:
https://learn.adafruit.com/circuit-playground-treasure-hunt/circuitpython-treasure-hunt
let's talk about that in "in the weeds"
not able to participate (dont have headphones, been searching for them....) in audio chat so I'll listen in later. Hug report to @tulip sleet for help with the MCP3xxx implementation and some python book recs. Worked on: MCP3xxx new implementation this past week (https://github.com/adafruit/Adafruit_CircuitPython_MCP3xxx/pull/4), edited analogin AIO Basics guide to prep for when that pr is reviewed/merged in, other hug report to @gusty kiln for updating DHT
, might get to that and AIO-Blinka later this week
(oh me oh my-oh)
progress:
Silabs CP2104 USB <==> UART gateway works nice with SAMD51 TX/RX UART pair!
See: PiUART or the breakout (both from Adafruit).
issue:
SAMD51 difficulties w/ Atmel Start
https://github.com/wa1tnr/sandboxx/blob/master/AtmelStart.d/cp_meeting_SAMD51_atmel_start.txt
Working on SAMD51 with Atmel Start. GPIO toggle is inoperative - cannot seem to blink D13 (PA23) for the Adafruit Feather M4 Express target board (which runs Arduino IDE code just fine).
Notes per the above 'sandboxx' repository on github.com.
Using ORIGIN 0x4000 (not 0x2000 like on SAMD21). SAMD21 GPIO in Atmel Start working just fine.
Target MCU is SAMD51J19A - Feather M4 Express.
follow-up code:
$ git clone https://github.com/wa1tnr/sandboxx.git
@errant grail if I were building it, I'd probably go with horizontal mount sockets and put them on a daughterboard.
@main meteor Yes, that was an option and may be in a future version. This was intended to be a single board Eurorack front panel when flipped, so choices were limited. However, I have a couple of nice workarounds now.
@main meteor The bottom of the board that faces outwards when in the rack:
that's the servo 50 Hz
Yes, looks like you have a nice neat solution, just had to do some fiddling to make it work. The daughterboard trick makes assembly more complex, but gives wonderful freedom in fine-tuning connector position.

APA102 dotstar is very easy to bitbang. I've done so inside Atmel Start with just GPIO and empty timing loops.
Perfect is the enemy of good. -Voltaire
@solar whale Ah this is great, thank you very much!
Example release notes.
To use in CircuitPython, simply install the [Adafruit CircuitPython bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle).
Read the [docs](http://circuitpython.readthedocs.io/projects/rtttl/en/latest/) for info on how to use it.```
Thanks!
test points
http://adafru.it/3824 rocks.
I'm using them with wire wrap wire. I bolt the Feather M4 Express
to a piece of perfboard, and 'thread' the wire wrap wire up through
the perfboard and thru the plate holes of the Feather, then push in a test point.
Holds really well and secure when stabiliized like this.
they are great -- I've used them for quick - first test of boards before soldering on headers.
I also found the Extra Long Pin Headers work really great for mounting perfboard onto a breadboard.
Just fold over the pins on top, so that the perfboard is permanently mechanically secure to the Extra Long Pin Headers.
Holds really good -- a row of 16 pins (singleton) is enough to keep the Feather M4 Express from wiggling around on the solderless breadboard.
I'm hardware oriented. From 8051 development.
I do SAMD series only (and legacy 8051 work) and am mostly interested in the core (or kernel) development.
Yes. Pick a shape and scale it rather than start with a pixel.
... and support vector and raster forms natively.
Borland with their Turbo Pascal implemented turtle graphics to teach young people drawing on-screen under program control.
turtle_up, turtle_down (pen up/down) turtle_left turtle_right (to rotate where the turtle is aimed and turtle_walk (making these up but I think I'm close).
I LOVED Turbo Pascal ๐
Turbo Pascal was my first language besides BASIC.
Turbo Pascal BBS was in Volcano, California. ;)
It was my favorite next to basic ๐
My father yelled (when he saw the long distance phone bill) Volcano California!
I recently got it running on the Rasp. Pi3 ๐
@idle owl this is what's in my history: sudo gem install travis -v 1.8.8 --no-rdoc --no-ri
I have to go mow the lawn -- Good day all!
have fun
@gusty kiln I'm on MacOS if that matters
yeah, it probably does.
Turtle graphics originally were used with the Logo programming language. They're coming back because these days it's easy enough to build an actual "turtle" robot that carries a pen around.
there is a tattoo place just up the street, but no. ๐
G'day all. Thanks!
487dbdb py/compile: Use alloca instead of qstr_build wh... - dpgeorge
58c7856 docs/esp8266/general: TLS limitations: Mention ... - pfalcon
3a9b15f zephyr/README: "make qemu" was replaced with "m... - pfalcon
0719c93 extmod/modussl_axtls: socket_read: Handle EAGAIN. - pfalcon
1cf6d48 extmod/modussl_axtls: Typo fix in comment. - pfalcon
@idle owl - ^ i started automating this a bit at one point
didn't get that far, but that might save some keystrokes
hmm ok
i was just running that script in each repo (the virtualenv bit's just for testing, may not need that)
If I'm being honest, I'm pretty solidly confused ๐
heh, sorry - that may not actually be super helpful.
Nah, it might be once I understand what's even going on here.
That's what I'm still struggling with. I need to go through it a couple of times.
yeah, i had to run through a couple first before it clicked.
things getting active in Minecraft world... my ability to multitask exceeded... going to have to pull focus elsewhere... thanx for letting me lurk... I'll study up a bit and be back ... have fun all!
I had to include sudo to run the travis encrypt --add deploy.password. Then it returned this: Shell completion not installed. Would you like to install it now? |y|
Is the travis command supposed to run without sudo?
travis should be able to run without sudo
ok
@tannewt and I discussed this. He suggested that we add a .value getter property on PulseIn, so you could just read the current value. We might read the pin directly, keep track of the value in the interrupt handler, or calculate the value based on the count. Does this sound like it would solve your problem?
We would like to implement interrupts, but doing interrupt handlers is a big topic (storage management, etc.). There's the MicroPython model but we'd like something more beginner-fri...
-bash: /usr/local/bin/travis: Permission denied
I got out of the bundle, and cloned the repo locally from my fork to see if that was the issue, no change.
hrm - that seems like maybe /usr/local/bin/travis doesn't have execute permission set
try ls -lah /usr/local/bin/travis?
-rwxr--r-- 1 root admin 610 Jul 30 15:29 travis
I didn't run what you just said, but I did ls -al from inside /usr/local/bin
yeah, hrm. seems like gem installed it with only user execute... you could sudo chmod a+x travis there, though it seems like there's probably something i'm missing about rubygems on macos.
probably a side effect of my sudo gem install ... above.
oi ok so tried to chmod it, and now I get this while running it. Traceback (most recent call last): 1: from /usr/local/bin/travis:23:in `<main>' /usr/local/bin/travis:23:in `load': cannot load such file -- /usr/local/lib/ruby/gems/2.5.0/gems/travis-1.8.8/bin/travis (LoadError)
I'll try to reinstall travis
]'
Ignoring ffi-1.9.25 because its extensions are not built. Try: gem pristine ffi --version 1.9.25
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ dir_s_mkdir - /usr/local/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-17/2.5.0```
]'? Did you mean ืณื?
sorry for being noisy before, being on call has its downsides
@main meteor that was my cat walking on the keyboard. ๐
I honestly don't know if cats speak Hebrew. Then again...
(โฏยฐโกยฐ๏ผโฏ๏ธต โปโโป
going well, i take it...
$ cat /etc/group | egrep admin
$ sudo adduser kattni admin
Linux - not sure looks a bit Mac OSX-y to me what you have there.
yeah, this is macos.
chmod g+rx travis
But if you had to go that far there's probably an error.
I haven't had to change ownership or permissions to these things in many years; they're always correct from the upstream. ;)
Generally I add myself to group dialout and that's it, for this stuff. ;)
language-specific package managers are a special kind of suffering, alas.
@solar whale if it's all white, then probably reset pin is wrong
@uncut coral it would be all randomly colored otherwise
@stuck elbow thanks -- any Idea how I can control the RESET Pin? It is set to None now, but I don't know how it routes through the seesaw. At least it is not clear to me that I do.
right, but I don't know where it is on the board
does it use the same RESET as the processor - I could just try holdig that up. teh board silkscrees shows RESET at teh same place as the MCU RESET
no
No it's not going well at all.
The Crickit CPX is a standalone target board -- its reset button acts like any other target board's does.
Yeah I think a value property could do it. If I haven't seen any pulses since init, I can just check the value to catch that first edge.
I forgot about pull up, can we add a pull property as well or a kw arg to the contructor?
@timber mango true, but not on the feather versions
I reinstalled Ruby. Now I can't even run gem update --system because I don't have permissions, which is what the instructions say to run, without sudo.
the RESETS are tied together -- on a feather crickit, doubletapping the feather also puts the crickit into bootloader! You have to reset it after uploading a new .uf2 to the feather
hehe that's weird @solar whale
well, different - at least ๐
@uncut coral I mean the reset of the display
@stuck elbow understood, but I don't have a pinout or schematic for the featherwing and I' dont know where it is.
@idle owl hrm. it more or less makes sense to me that something like gem update --system would require sudo, but i am quite a ways removed from regular macos usage.
@gusty kiln It makes sense to me too, but the problem is it seems like it's updating things to belong to root.
Or they already did
root ownership should be fine, but it definitely seems odd that the perms are restricting you from executing them.
but it's still pin number 6
ah hmm.
it's possible that you're expected to use something like rbenv at this point: https://github.com/rbenv/rbenv
remember when interpreted dynamic languages were easier to use than just compiling some c?
(sigh)
@stuck elbow thanks -- I'll poke at it more soon.
you might need to unglue the display for this