#circuitpython-dev

1 messages · Page 217 of 1

solar whale
#

who cares about a space?

meager fog
#

lol

solar whale
#

Here is a feather m4 express using an ESP32 for internet access. The esp8266 in the picture too, but disconnected.

gusty topaz
#

@solar whale I had no idea you could daisy chain boards like that. And the m4 express is running CP?

solar whale
#

Yes it is. The ESP32 or ESP8266 is just connected via a UART and has the AT firmware installed.

tidal kiln
#

@obtuse ibex can you provide more specifics on what is happening. do you not see the CIRCUITPY folder?

gusty topaz
#

That's so cool.

#

Would love to see CP on the Huzzah32, though.

#

Saw the announcement of the Alpha Alpha version of CP for Particle Mesh devices. Would CP be compatible with them once it is with the Bluefruit feather (nRF52)?

solar whale
#

CP runs fine on the particle boards but does not support the “mesh” . The argon board has an ESP32 connected via UART so I hope it can work like the above demo eventually. Still a lot of work to do .

gusty topaz
#

Seriously!?... nice... I got my Argon yesterday.

solar whale
#

They are a lot of fun!

raven canopy
#

@idle owl @slender iron didn't get a chance to peek at Travis the past couple days. Bundle update is happy! 🎉

gusty topaz
#

@solar whale Good to know, but I was actually planning to stay away from Arduino/C and work on CP/MP projects in the future.

#

Talking about compatibility, I'm assuming the OLED featherwing and the mini tft featherwing are CP compatible, right?

tidal kiln
#

CP/M?!!?? oh...there's an extra P...micropython...got it....nvm

solar whale
#

@gusty topaz yes, but... all display support on CP is in a major state of flux. framebuf is being deprecated and displayio will replace it. Both the OLED and the miniTFT can work, but it is not trivial. The miniTFT is not well supported yet.

gusty topaz
#

So, displayio is currently available and working with the OLED featherwing?.

solar whale
#

No. So far it only supports the hallowing. For the OLED you can use bitmapfont for text since the python framebuf does not do text. The built in framebuf has been removed from the SAMD builds and I assume it will be taken out of the nrf builds soon.

gusty topaz
#

ok.

#

Thanks @tough sun

slender iron
#

displayio will be my focus in january

solar whale
#

@slender iron I hope I characterized it correctly.

slender iron
#

yup! think so

#

the biggest blocker is supporting external displays besides hallowing

gusty topaz
#

hmm interesting.

#

what libraries are available right now if I wanted to use a a regular 128x128 I2c OLED breakout board with CP and the M0 express?.

solar whale
#

Hmm. I’m only familiar with the 128x32 ssd1306 . It works fine under the stable 3. X CP or with bitmapfont and python framebuf for 4.x . I’ve never used a 128x128

stuck elbow
#

to be honest, those displays are pretty easy to handle even without a library

solar whale
#

@stuck elbow do you have some example or a link to show how?

stuck elbow
#

@solar whale not really, it's pretty much all in the datasheet

solar whale
#

Ok, thanks. Adding to my reading list 😉

stuck elbow
#

but good idea for an article, I will add it to my list

raven canopy
#

@slender iron the update to adabot raising urllib3 to 1.23 is causing me (and Travis in last night's cron?) issues. Seems the http calls are stalling, causing adabot to just hang. I went through this before with updating requests when that CVE came out, but thought I had narrowed it down to Linux+IPv6 issues. will keep you posted as I wade into this once more.

slender iron
#

oops sorry its not working

raven canopy
#

all good. its a good thing to respond to CVEs. 😄

gusty topaz
#

Thanks @solar whale and @stuck elbow !

raven canopy
#

@slender iron false alarm on urllib3. it was actually a self-induced loop. 🤦

candid stump
tulip sleet
#

@candid stump not sure what you mean by a "natural place". Do you mean in that sample code in the guide?

candid stump
#

No, I'm wondering if this could be added to an existing library instead of creating something separate. I need to get the microphone "magnitude" from the example for another project and would like to create a microphone class that just returns that magnitude. But, before creating another dinky library, thought I would ask if there were an existing library this could be added to.

tulip sleet
candid stump
#

@tulip sleet I would gladly file a PR. What are your thoughts of adding a Microphone class that has a magnitude() method and maybe a decibel() method if I can actually map the magnitude to a decibel level?

steady pivot
#

I wrote this for my pyboard and was thinking it should work on circuitpython boards: https://github.com/KipCrossing/Micropython-AD9833 . It might be useful for anyone wanting to generate waves better that what DAC's can.

tulip sleet
#

@fmorton for the CPX library, we would probably just add a "sound_level" method or property. The microphone and the I2S sampling code is probably not good enough to get a real decibel level due to variations based on frequency. There's a very simple realtime filter which is fairly noisy.

#

go ahead and open an issue so we can discuss it; I think that's a good next step. Thanks.

candid stump
tulip sleet
#

great tnx

ruby lake
#

hm, micropython on fpgas

velvet badger
#

I'm using circuitpython on the Gemma M0 and trying to figure out what pin to use for the dotstar. Trying to turn it off completely so it's not glowing green while running my code.

#

Any ideas?

errant grail
#

@velvet badger Here's the dotstar example code from the library bundle. Does this help? ```import time
import random
import board
import adafruit_dotstar as dotstar

On-board DotStar for boards including Gemma, Trinket, and ItsyBitsy

dots = dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1, brightness=0.2)

Using a DotStar Digital LED Strip with 30 LEDs connected to hardware SPI

dots = dotstar.DotStar(board.SCK, board.MOSI, 30, brightness=0.2)

Using a DotStar Digital LED Strip with 30 LEDs connected to digital pins

dots = dotstar.DotStar(board.D6, board.D5, 30, brightness=0.2)

HELPERS

a random color 0 -> 224

def random_color():
return random.randrange(0, 7) * 32

MAIN LOOP

n_dots = len(dots)
while True:
# Fill each dot with a random color
for dot in range(n_dots):
dots[dot] = (random_color(), random_color(), random_color())

time.sleep(.25)
velvet badger
#

I figured it out:

#

import adafruit_dotstar as dotstar
import board

dot = dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1, brightness=0.0, auto_write=False)

while True:
dot.fill(0)
dot.show()

#

Thanks, though!

manic glacierBOT
#

So, I just put 4.0.0 alpha 5 on my Trinket M0 expecting to be able to use time.monotonic_ns() This is what I get in REPL:

Adafruit CircuitPython 4.0.0-alpha.5 on 2018-12-10; Adafruit Trinket M0 with samd21e18
>>> import time
>>> help(time)
object <module 'time'> is of type module
  __name__ -- time
  monotonic -- <function>
  sleep -- <function>
  struct_time -- <class 'struct_time'>
>>> time.monotonic_ns()
Traceback (most recent call last):
  File "<stdin>", line 1, in <mod...
solar whale
#

@velvet badger if you set auto_write=True then you can just issues the dot.fill(0) once outside any loop and the Dotstart will be off.

#
import board

dot = dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1, brightness=0.0, auto_write=True)
dot.fill(0)
 
#

or use dot[0]=0 instead of dot.fill(0)

#

BTW -- the setting for brightness will not matter in this usage.

manic glacierBOT
manic glacierBOT
manic glacierBOT
golden goblet
idle owl
#

Alright

golden goblet
#

There was a good handful of formatting issues etc but I got over that.

#

The part i'm having issues with is here:

#
        length = SAMPLERATE // FREQUENCY  # create length of sample
        sine_wave = array.array("H", [0] * length) 
        for i in range(length):
            sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * 
                                       (2 ** 15) + 2 ** 15)
        sample = audioio.AudioOut(board.SPEAKER, sine_wave)
        sample.frequency = SAMPLERATE
        sample.play(loop=True)  # Play the sample
        time.sleep(pitchLength)  # Play for length of pitchLength
        sample.stop()  # we tell the board to stop```
#

Particularly, sample = audioio.AudioOut(board.SPEAKER, sine_wave)

idle owl
#

If you surround your code with three backticks ` on either side, it will format it as a codeblock

#

You can edit previous messages as well 😃

golden goblet
#

Ah thanks for the info on that

#

"TypeError: extra positional arguments given"

idle owl
#

So what's the issue you're having with that bit of code?

#

Ok

#

We updated the API, so that's probably the issue.

#

Yeah that is the issue

golden goblet
#

Ok I was wondering about that. I'm running the most current API and libraries

idle owl
#

Give me a minute, I'm sorting what it should look like.

#

We changed the audioio API.

#

@golden goblet Try this: ```python
if magnitude > blowThresshold: # any time we get a sound with a magnitude greater than the value of blowThresshold, trigger the current pitch (can be changed at top where it is defined)
length = SAMPLERATE // FREQUENCY # create length of sample
sine_wave = array.array("H", [0] * length) # create an array for a sine wave
for i in range(length):
sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15) + 2 ** 15) # fill the array with values
sample = audioio.AudioOut(board.SPEAKER)
sine_wave = audioio.RawSample(sine_wave)
sample.sample_rate = SAMPLERATE
sample.play(loop=True) # Play the sample
time.sleep(pitchLength) # Play for length of pitchLength
sample.stop() # we tell the board to stop

pixels.show() # show the desired neopixel light up on board

golden goblet
#

you are an angel 😃

#

I'll give it a shot. Thanks much! All the digikey ❤ ❤

idle owl
manic glacierBOT
golden goblet
#

I made the following additional change : sine_wave = audioio.RawSample(sine_wave, sample_rate = SAMPLERATE) # sample.sample_rate = SAMPLERATE sample.play(sine_wave, loop=True) # Play the sample

idle owl
#

Excellent!

golden goblet
#

Getting an additional error now when trying to play a second tone, DAC already in use

#

Working on that now.

idle owl
#

You may need to deinit somewhere. Not sure. The code obviously worked at one point without the deinit, and I'm not sure how what we changed would affect needing to deinit the pin, but that's usually what fixes that.

golden goblet
#

Thank you 😃 added sample.deinit() and seems to be working perfectly!

idle owl
#

Great job!

idle owl
#

So... pca.deinit() doesn't work for PCA9685. Setting throttle = 0 on a continuous servo does not stop it. It goes forever, and the pins are never deinitialised. Presumably they will deinitialise if I hard reset the board, I will have to do that in a minute here, I've tested on all the pins, so they're all now continually moving the cont. rot. servo.

#

Tried pca.reset() as well since that's what deinit() calls and it didn't seem to change anything.

tidal kiln
#

sounds like two things maybe. for throttle = 0 not stopping a continuous, what servo module are you using?

idle owl
#

FS5103R

tidal kiln
#

sry. meant library

idle owl
#

I can unplug it and plug it back in and it keeps going, so it's definitely not deinitialising the pin.

#

Oh.. whatever was current as of ... looking

#

20191126

tidal kiln
#

you've been refactoring that stuff? into servokit / motorkit?

idle owl
#

Not exactly how ServoKit works, but yes, I'm using ServoKit. The behavior is the same using PCA9685 directly with the example in the repo.

idle owl
#

Yes

stuck elbow
#

doesn't throttle=0 just set the pwm to 1500us? the continuous rotation servo has a small trimer on the back to adjust it so that it stops at that signal

idle owl
#

Throttle uses this: ```python
@property
def throttle(self):
"""How much power is being delivered to the motor. Values range from -1.0 (full
throttle reverse) to 1.0 (full throttle forwards.) 0 will stop the motor from
spinning."""
return self.fraction * 2 - 1

@throttle.setter
def throttle(self, value):
    if value > 1.0 or value < -1.0:
        raise ValueError("Throttle must be between -1.0 and 1.0")
    if value is None:
        raise ValueError("Continuous servos cannot spin freely")
    self.fraction = (value + 1) / 2```
#

So I don't know if that's what it's doing.

stuck elbow
#

looks like it sets it to 0.5 which by default should be 1500us

idle owl
#

Ok... I don't really know servos so I don't know what that implies.

#

Does that imply it's doing what the code is telling it to?

stuck elbow
#

ok, so a quick explanation on how a servo works

idle owl
#

And that we need to fix that?

#

Ok

stuck elbow
#

it gets a pwm signal at 50Hz and with changing duty cycle

tidal kiln
#

may not be exactly 1500, depending min/max setting

stuck elbow
#

usually the duty cycle can be from around 500µs to around 2500µs (the exact min and max vary between models and individual servos)

idle owl
#

that's what I thought might be interfering was the min/max defaults.

stuck elbow
#

at 1500µs (in the middle of the range) a regular servo will move to the center, and a continuous rotation servo will stop

idle owl
#

ok

tidal kiln
#

and even 1500 may not be a perfect stop - thus the trim pot

stuck elbow
#

if you move it either way, a regular servo will move to that position, and a continuous rotation servo will move in that direction, the larger the deviation, the faster

idle owl
#

ok

stuck elbow
#

the continuous rotation servos have a screw at the back which you can use to set the "middle" point exactly

idle owl
#

ok I see that

stuck elbow
#

so just set it to 0 and then turn the screw so that it stops

idle owl
#

Magic!

#

Thank you! 😃

tidal kiln
#

were you expecting pca.deinit() to stop the servo?

idle owl
#

I was trying whatever after it didn't work initially. Using deinit from the ContinuousServo class sets throttle = 0 so I tried that too.

tidal kiln
#

ok - so this was all the same thing? you're just wondering why it didn't actually stop?

#

just needed to trim the servo

idle owl
#

Yes evidently.

#

That resolved the issue.

manic glacierBOT
#

@yeyeto2788 Please file separate issues for strings that cannot be translated. That is the best way for us to keep track of them.

The translation files are updated by running make translate at the top level of circuitpython. It uses gettext to find strings wrapped in a translate() function. If I remember right, the version string doesn't work because it uses C preprocessing to create the string rather than printf.

Next year we can take a look at libraries. The bundle can preproces...

slender iron
#

I think for built in servo I have throttle = None let it spin freely

idle owl
#

It can't spin freely if it's continuous.

#

According to the comment in the library.

slender iron
#

ah ok

idle owl
#

So None throws an error in that case.

slender iron
#

kk

tidal kiln
#

there are a couple of issues in the repo related to the spin freely thing

tulip sleet
#

and 17 and 18

idle owl
#

Wow. I thought maybe I hadn't saved some code I worked on ages ago, there's no file locally of it. Turns out I actually committed all my changes to a branch in git like I should always be doing. 😄

#

And GitHub doesn't support uploading .py files. Unexpected.

lime trellis
#

any reason why a custom samd51 CP build would work fine on windows but cause USB issues on OSX?

#

usb issues = CIRCUITPY presents but isn't accessible then OSX removes the drive

tulip sleet
#

did you try storage.erase_filesystem() to reformat it?

lime trellis
#

yes on the pc, unable to reach the REPL on the mac

#

the mac is able to see the bootloader mode and handle uf2 files

tulip sleet
#

is there a USB port on the Mac or are you using a USB-C -> regular USB adapter?

lime trellis
#

usb type A port no adapters

tulip sleet
#

I'm thinking maybe clock issues but not sure why it would work on Windows. Would want to look at your board definition. Does a regular CPy board work fine on the Mac?

#

what version MacOS?

lime trellis
#

The mac has no trouble talking to feather m0 and itsybitsy boards. MacOS is Mojave I think?

#

Are there OS-specific calls I would need to make when building CP?

tulip sleet
#

no, not at all, just narrowing the field of what to test (unfortunately my test Mac machine is now too old for Mojave)

lime trellis
#
#define MICROPY_HW_BOARD_NAME "SAM32v1e"
#define MICROPY_HW_MCU_NAME "samd51j20"
#define CIRCUITPY_MCU_FAMILY samd51

#define MICROPY_PORT_A        (PORT_PA24 | PORT_PA25)
#define MICROPY_PORT_B        (0)
#define MICROPY_PORT_C        (0)
#define MICROPY_PORT_D           (0)

#define AUTORESET_DELAY_MS 500

#define CIRCUITPY_INTERNAL_NVM_SIZE 0

#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)

#include "internal_flash.h"

#define BOARD_HAS_CRYSTAL 1

#define DEFAULT_I2C_BUS_SCL  (&pin_PA04)
#define DEFAULT_I2C_BUS_SDA  (&pin_PA07)

// #define DEFAULT_SPI_BUS_SCK  (&pin_PB14)
// #define DEFAULT_SPI_BUS_MOSI (&pin_PB12)
// #define DEFAULT_SPI_BUS_MISO (&pin_PB13)

// #define DEFAULT_UART_BUS_RX  (&pin_PB16)
// #define DEFAULT_UART_BUS_TX  (&pin_PB17)

#define IGNORE_PIN_PA24     1
#define IGNORE_PIN_PA25     1
#

mpconfigboard.h for the board. Still hacked together but seemed to be working fine. no spi flash

tulip sleet
#

is this off of 3.x or master?

lime trellis
#

master

#

a few commits behind by now

tulip sleet
#

we have had a number of USB fixes quite recently, so try to merge from master and make sure to git submodule sync and git submodule update.

lime trellis
#

will do. thank you so much @tulip sleet !

#

PS taught a holiday soldering workshop using samd21 ❄ boards running CP. it was a HIT
Thank you all so much for your hard work standing up this unique approach to microcontrollers!

idle owl
#

@lime trellis Those are really neat!

tulip sleet
#

also we haven't tested internal_flash in a while because we don't have any m4 boards that use it now.

#

@lime trellis woot!

idle owl
#

@lime trellis Do you have a post about it anywhere?

tulip sleet
#

your BOARD_FLASH_SIZE does not include a decrement for the size of the filesystem. See how it's defined for gemma and trinket, for example

#

both mpconfigboard.h and .mk

lime trellis
#

@tulip sleet I will take a look. I think I modeled it after the feather m4 board definition

idle owl
#

@lime trellis Would you be ok with us maybe doing a post about this using some of these images or adding it to our Python on Micrcontrollers newsletter?

tulip sleet
#

yeah, that still has an SPI flash chip. I looked at the m4 definitions pre-SPI-flash (when we were using internal flash), but I think they may be wrong because they don't subtract 0x10000

#

or whatever the internal size is

lime trellis
#

@tulip sleet how do I gauge what to take off for the internal size?

tulip sleet
#

you can make the size larger for the m4 because it has a lot more flash. The build will complain if you overflow, if that constant is right

lime trellis
#

@idle owl of course! it was for the Stanford EE dept's makerspace, Lab64. let me digup my github link for the snowflakes as well

#

excellent, I'll play with it and see what I come up with.

idle owl
#

@lime trellis Thank you!

tulip sleet
#

make sure mpconfigboard.mk points to the right .ld file (not the "external-flash" one)as well. Is this all checked in somewhere?

lime trellis
#

no I'm only working with it locally. The .mk does point to just the plain .ld file for the J20 variant of the M4

tulip sleet
#

ok, that's good, this may not have anything to do with the usb problems, just checking for internal flash port issues

lime trellis
tulip sleet
lime trellis
#

@tulip sleet I think you're on to something, though. I just noticed that saving main.py without having the board in REPL corrupts main.py (on PC) for this board as well

tidal kiln
#

@lime trellis double wow on that second link - awesome soldering images!

lime trellis
#

@tidal kiln thanks! I hope to have my rework & repair write-up out shortly that has even more soldering epiphanies 😃

tidal kiln
#

they did SMT and reflow oven work also? nice!

lime trellis
#

yep! we managed to churn out 40+ boards

manic glacierBOT
slender iron
#

@lime trellis please make a PR with the board definition too!

tidal kiln
#

@solar whale you just responded almost verbatim to what i was typing to that blinka thread. i thought i had double posted or something! 😅

solar whale
#

Great minds think alike 😉 I hope you did not mind my jumping in.

tidal kiln
#

nah. all good.

#

@solar whale i think it's dashes, not underscores -> adafruit_circuitpython_si7021

solar whale
#

actually -- both seem to work

tidal kiln
#

huh....

solar whale
#

pip3 is mysterious

tidal kiln
#

indeed

solar whale
#

not sure if you can mix/match, bit it seems to forgive using underscores instead of dashes.

#

but you are correct -- dashes are probably better since that is how it gets installed and you can mix them !!

#

I edited the post -- no need to add more confusion for this user...

tidal kiln
#

cool. thanks.

lime trellis
#

@slender iron do you mean a PR for ports/atmel-samd/boards? It's not polished, I wouldn't want folks to accidentally use it as a reference

slender iron
#

@lime trellis once you have it working ok then ya

#

more boards the merrier

lime trellis
#

I'd be honored! haha it's just a samd51 with an esp32 & sd card:

tidal kiln
#

"just"

idle owl
#

Is a 5V 2A power supply enough to run a micro servo and a continuous rotation micro servo? By "run" I mean test them for a second to make sure the code works.

manic glacierBOT
tulip sleet
#

@idle owl that should be absolutely fine\

raven canopy
#

@tidal kiln @solar whale I can add anecdotal evidence: using underscores with pypi.org, the server automatically changes them to hyphens and updates the uri.

tidal kiln
#

@idle owl yep. plenty.

tulip sleet
#

@solar whale PR 1402 above fixes from @gentle bronze fixes .in_waiting. Note that you should still use a slower baud rate, because when BLE is in use it will lock out UART reception often for short periods (it runs at a higher prio)

solar whale
#

@tulip sleet just updated -- will try it soon

#

@tulip sleet @gentle bronze great improvement with the UART in terms of the loss of data but I'm not convinced .in_waiting is working properly -- still need to do more testing. @gentle bronze did you specifically test the ,.in_waiting call?

tulip sleet
#

i specifically tested it, using an FTDI cable and typing at it, checking .in_waiting. typed nothing, .in_waiting was 0. typed 7 chars, went up to 7, etc.

#

set the baud rate way down and see what happens

solar whale
#

OK thanks @tulip sleet must be something I am doing wrong -- great

tulip sleet
#

the hardware fifo is only a few chars, so things could get lost if interrupts are blocked fora while

solar whale
#

OK -- lots of places for me to check -- this is a big improvement!!

tulip sleet
#

great! thanks @gentle bronze !

idle owl
#

@tidal kiln @tulip sleet thanks

solar whale
#

@tulip sleet must have been something in the way I am testing .in_waiting -- I just went ahead and ran a test program to use the UART on the particle board and it is working (even at 1152K -- I'm not usinb BLE right now) still lots to do, but this is great -- much appreciated @gentle bronze

idle owl
#

I just earned my first Sparky! 😄

stuck elbow
#

what died?

idle owl
#

PWM/Servo FeatherWing. Not sure what popped, but it's definitely something on the Wing. Pro tip: unplug the power before removing the barrel jack.

stuck elbow
#

hmm, there isn't much there, just the pca9685 and a couple of passives

tidal kiln
#

yah. weird. what else was happening? were you just removing power?

idle owl
#

I was unscrewing the barrel jack wiring from the screw terminal. But I failed to remove power before doing it.

#

Loud pop, smell of smoke. Feather seems fine.

#

According to my order history, I do have another one somewhere. Whether I can find it is another thing altogether.

#

I may have gifted it.

tidal kiln
#

i see...the feather has screw terminals for power input...you were using one of those barrel adapters...

idle owl
#

Yes

tidal kiln
#

sounds like you shorted power with the screwdriver or something

tulip sleet
#

is the 9685 no longer functional? Or maybe it's the power supply that got shorted

idle owl
#

I think the wires got loose and shorted.

#

I could smell something on the Wing

#

I'll reattach it and try it though

tidal kiln
#

and you were using a 2A supply...ouch

idle owl
#

oh no... I was using a 10A

#

It still works.

tidal kiln
#

ok then...OUCH

timber mango
#

Bonjour parler vous français ?

tulip sleet
#

un petit

tidal kiln
#

there's reverse polarity protection on the board, maybe you sparked that?

tulip sleet
#

il y a longtemps

timber mango
#

Ok

manic glacierBOT
timber mango
#

Je suis bloquer je reussi pas à configurer mon the launc deck si quelle qu’un peux m’aider

tulip sleet
#

quelle guide?

idle owl
#

@tidal kiln No idea! That was rather anticlimactic then. I immediately removed the board thinking I had smoked it.

tulip sleet
#

je l'ai trouve

timber mango
#

Je l’es u dans la Adabox

tulip sleet
#

oui continuez ; est-ce qu'il marche un peu?

meager fog
#

@lime trellis that'll work nicely with our ESP wifi co-processor work, how do you ahve the ESP wired?

timber mango
#

Oui tous marche mes je c’est pas configuré les touche

timber mango
#

Vous inquiéter pas je vais chercher es trouver

lime trellis
#

@meager fog the ESP speaks to the M4 via uart. The M4 acts as a uart bridge and enables the user to interact with both via USB

tidal kiln
idle owl
#

I have no idea,. I could only smell it.

lime trellis
#

The M4 also has control of the ESP JTAG and DTR/RST pins

tulip sleet
#

on doit changer le keymap dictionnaire: les valeurs pour chaque clef

meager fog
#

its only been tested w/ESP8266 but ESP32 is similar - @median aurora is also working on similar stuff, but with nrf5840+ESP32

lime trellis
#

Ahhh!!! that's what I've been looking for!!! thank you @meager fog that saves me time

meager fog
#

😃 😃 😃

#

good timing!

#

i just commited that last weekend

lime trellis
#

currently can still program ESP by just pointing esptool.py to the port and putting the M4 into "bridge mode"

meager fog
#

if you can try it with ESP32, and any PR's would be super appreciated

#

yah this is easier, drag n drop the .bin file to the file sys

#

then run the command - its not fast but its ok

lime trellis
#

yes absolutely

meager fog
#

awesome - again - hvaen't tried it with ESP32

lime trellis
#

will let you know how it goes!

meager fog
#

i ran esptool --no-stub --trace to get the data trace and then implemented

#

see the readme for links

#

awesome - the current demo is a simple webpage grabber, but i'd like to properly mimic 'socket' so its portable

#

may not get to that soon

lime trellis
#

I'll see what I can do 😃

meager fog
#

awesome

manic glacierBOT
manic glacierBOT
idle owl
#

(╯°□°)╯︵ ┻━┻

#

There's something up with that servo.

#

I thought the shield was wonky but I tried a different continuous rotation servo and it's fine.

#

¯_(ツ)_/¯

tidal kiln
#

wonky even before the spark event?

idle owl
#

Wasn't connected when the spark event happened

#

I had already moved it to the other board. And was confused why nothing happened. And then remembered I needed to transfer the power jack.

#

etc.

tidal kiln
#

what's the wonkyness?

idle owl
#

Now if I connect it to the shield, and run the same code (forward, backward, 0), it goes one direction and doesn't stop or change direction or change speed. I tried rotating the pot a bunch both directions and nothing changed.

tidal kiln
#

does seem odd

#

could be the signal, but if it's working with another servo, then probably not

#

using same channel on the bonnet?

idle owl
#

I tried multiple channels, and it was FeatherWing vs Shield.

#

and this one works on one of the channels that had the weird behavior on the other servo.

solar whale
#

@meager fog very encouraging -- talking to the onboard ERC32 on a particle Argon ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.5-26-g5e4b3a8fb on 2018-12-13; Particle Argon with nRF52840

import uart_comm
b'ets Jun 8 2016 00:22:57\r\n'
b'\r\n'
b'rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)\r\n'
b'configsip: 0, SPIWP:0xee\r\n'
b'clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00\r\n'
b'mode:DIO, clock div:2\r\n'
b'load:0x3fff0018,len:4\r\n'
b'load:0x3fff001c,len:756\r\n'
b'load:0x40078000,len:4892\r\n'
b'load:0x40080000,len:6476\r\n'
b'entry 0x400802ec\r\n'
b''
AT
b'AT\r\n'
b'\r\n'
b'OK\r\n'
b''
AT+GMR
b'AT+GMR\r\n'
b'AT version:1.3.0.0-dev(89b98b0 - Sep 29 2018 05:17:42)\r\n'
b'SDK version:v3.2-dev-1176-g6818c21b0\r\n'
b'0.0.5\r\n'
b'OK\r\n'

meager fog
#

woo

#

that is very good!

#

nice work

#

what do you think about doing a socket() interface?

#

im torn, keep it simple as is, or implement a known interface

#

pros: umqtt may just work

#

cons: may not, extra work

solar whale
#

I'm open to all approaches -- simple first! That would be very nice.

meager fog
#

lets hammer it a bit more with current API

#

maybe fix the 50% failure rate

timber mango
#

Omg, it's ladyada

meager fog
#

and try more stuff like SSL, POST

solar whale
#

yes -- small steps -- gotta run -- I'll update you tomorrow.

meager fog
#

go go go!

#

i gotta go too

#

🌮 time

marble hornet
#

@meager fog I hope the tacos were tasty 😋

gentle bronze
#

@tulip sleet @solar whale np, I am glad that help 😄

pastel panther
#

@slender iron I pinged you on the 34x PR in case you didn't see it. No rush.

manic glacierBOT
manic glacierBOT
manic glacierBOT
solar whale
#

@meager fog brief update on espatcommands testing -- using and external ESP8266 or ESP32 the current code "bitcoinprice test" is working well on the M4 and nrf (pca10056, particle argon and xenon) For some reason the basic espatcommad_simpletest.py is not working properly on the nrf boards (something in the reset sequence) but since the bitcoin test works fine, I expect it is a something simple -- just haven't found it yet. The onboard ESP32 on the argon is proving to be more challenging. I can talk to it with a simple uart comm program but it turns out the firmware installed does not support all the AT commands expected 😦 . I think it will be worthwhile to explore uploading a new standard AT firmware it and I'll look into that this weekend. Overall - the espatcommand are working great on the SAMD51 and the NRF52840 woohoo!!

#

@tulip sleet FYI -- I tried enabling a BLE advertisement while using the NRF UART at 115200 baud.. It ran OK for awhile then I received a really garbled tranmission on the UART -- as you predicted. Will have to think about how to handle it - hopefully just with try/except ...

manic glacierBOT
solar whale
#

@tulip sleet after our discussion about the in_waiting yesterday, I went back to an older version on the nrf and I found that I actually could see in_waiting = 1 sometimes, but never > 1. Now it works as expected.

idle owl
#

@slender iron Do you have time to do a voice chat about the BoardTest repo/PR?

craggy harbor
#

Can we do interrupts in CP?

ruby lake
#

if only

slender iron
#

@idle owl in a bit. eating breakfast now

idle owl
#

Ok thank you

slender iron
#

@craggy harbor no, circuitpython isn't realtime

#

you can use interrupts if you add a c module to circuitpython

tulip sleet
#

@solar whale yes, in the previous implementation, .in_waiting was always 0 (no unread chars) or 1 (at least 1 unread char). The way it was implemented, it only did one char of buffering in software. The new implementation reads all the waiting characters from the hardware FIFO buffer and stores them in a software buffer

meager fog
#

@solar whale sounds good, yeah i would just update it with esp's firmware, then you can adjust baudrate if ya like

slender iron
#

@idle owl ready when you are

idle owl
#

@slender iron Ok let's do it

#

adafruit_boardtest

#
F:  1, 0: No module named adafruit_boardtest.py (fatal)
The command "pylint adafruit_boardtest.py" exited with 1.```
#
  - pylint adafruit_boardtest/*.py```
#

autodoc_mock_imports = ["supervisor", "storage", "analogio", "boardtest_gpio"]

#

.. image:: https://github.com/adafruit/Adafruit_CircuitPython_HCSR04/blob/master/docs/hcsr04.jpg

#

.. image:: https://github.com/adafruit/Adafruit_CircuitPython_BoardTest/blob/master/docs/test_jig.png
    :alt: Test jig Fritzing diagram```
#

Line 20 in README.rst: Alternatively, tests can be imported as modules. Copy the desired test file to CIRCUITPYTHON device drive and import the test in your own code. Each test can be run with the ``run_test(pins)`` function.

#

Line 62 in README.rst:```To use each test, import the library, find the pins available on your board, and call boardtest_<test name>.run_test(pins). To run the GPIO test, for example:

#

.. automodule:: adafruit_boardtest.boardtest_gpio
   :members:

.. automodule:: adafruit_boardtest.boardtest_i2c
   :members:

.. automodule:: adafruit_boardtest.boardtest_led
   :members:

.. automodule:: adafruit_boardtest.boardtest_sd
   :members:

.. automodule:: adafruit_boardtest.boardtest_sd_cd
   :members:

.. automodule:: adafruit_boardtest.boardtest_spi
   :members:

.. automodule:: adafruit_boardtest.boardtest_uart
   :members:

.. automodule:: adafruit_boardtest.boardtest_voltage_monitor
   :members:
#

adafruit_boardtest.boardtest_i2c

#
                        "boardtest_led", "boardtest_sd", "boardtest_sd_cd", "boardtest_spi",
                        "boardtest_uart", "boardtest_voltage_monitor"]```
fathom lava
#

import adafruit_boardtest.boardtest_led

idle owl
#

from adafruit_featherwing import joy_featherwing

#

from adafruit_motor import motor

#

result = boardtest_i2c.run_test(pins, sda_pin=I2C_SDA_PIN_NAME, scl_pin=I2C_SCL_PIN_NAME)

#
.idea
__pycache__
_build
*.pyc
.env
build*
bundles
*.DS_Store
.eggs
dist
**/*.egg-info```
solar whale
#

@tulip sleet is there some difference in the uart implementation on the nrf52840 vs the samdd51 taht would impace cahnging the baudrate "on the fly"? on the nrf I can simply set uart.baudrate =newbaudrate and it seems to work fine. I'm not having the same success with the SAMD51 -- just curious if there is a know ndifference in how the baudrate has to be changed. If it is not obvious to you, I'm happy to dig into it. Don't spent any time on it.

tulip sleet
#

it's basically completely different at the chip-specific level, so I can easily believe there might be an issue on the atmel chips. Feel free to file an issue. If you can test on SAMD21 as well I'd be grateful.

solar whale
#

ok - the samd51 appears to silently ignore the uart.baudrate command . I'll do some more checking then file an issue. Thanks -- not a big problem. I was just trying to be clever 😉

idle owl
solar whale
#

@tulip sleet ignore what I said for now --- likely user error

solar whale
#

@tulip sleet I was not giving the uart enough time to send is previous command through the uart before changing the baudrate underneath it! May be a subtle timing difference between SAMD51 and NRF when doing this.. all good now

tulip sleet
#

sounds good

manic glacierBOT
solar whale
#

@umbral dagger the "memory game" is very nice -- Thanks!

fathom lava
#

@idle owl Weird pylint question for you! I have a for loop (for i in range(NUM_TESTS):) where I perform some action NUM_TESTS number of times, but I don't actually use the i variable. Pylint is giving me: Unused variable 'i' (unused-variable). Any idea how to get rid of the i?

idle owl
#

Yep! That's exactly the one I was waiting for you to get to.

#

for _ in range(NUM_TESTS): when i isn't used again later.

fathom lava
#

lol 😛

#

I saw that as a possibility on the Googles, but doesn't _ refer to something in the interactive session, which could be a conflict in REPL?

#

(well, it won't be code-breaking in this case_)

idle owl
#

Not that I'm aware of? But that's stretching my knowledge. I believe it also refers to a recent item in the REPL, but maybe in the for loop it interprets it correctly? Sounds like something that needs to be tested.

fathom lava
#

but pylint seems to accept it, and even if it refers to something from REPL, it's unused, so I don't think it'll break anythin

#

*g

idle owl
#

I've used it a bunch and I've never run into issues

#

But I can see where the issue may arise

raven canopy
#

from what i remember, _ is just treated as a "throw-away" variable in the scope.

fathom lava
#

That's what it seems like, but it seems odd to use a throwaway variable that has another meaning somewhere else. I dont' think there's any conflict here, though.

idle owl
#

I don't think so either.

raven canopy
#

wrt to the REPL craziness, in the for _ in...:pass example from that SO page, i imagine that the explicit assignment in a REPL session causes it remain until the REPL session dies. /speculation

tidal kiln
#

looks like it has local scope, so probably ok:

>>> 2 + 2
4
>>> print(_)
4
>>> for _ in range(10):
...     pass
... 
>>> _
9
>>> def foo():
...     for _ in range(42):
...         pass
... 
>>> foo()
>>> _
9
>>>
fathom lava
#

Aaaah....good test, @tidal kiln that helps 😃

#

So as long as we use it within a function, we should be clear of not overwriting it?

tidal kiln
#

or class, module, etc.

#

(i think)

fathom lava
#

got it

#

thanks 😃

manic glacierBOT
#

I can support this, since it moves driver/helper aggregation closer to the "source". My overall thoughts are best laid out in pro/con fashion:

Positives

  • Updates to the RTD driver page can be more seamless. When new libraries are added to the bundle, updating drivers.rst is [hopefully] included with the PR.
  • For those only working with libraries, it doesn't require downloading the large[r] circuitpython repo locally.

Negatives

  • Additional RTD instance to maintain (ki...
raven canopy
#

@fathom lava i'll be interested to see if pylint complains afterwards about the use of range vs enumerate. 😆

tidal kiln
#

foo.py

for _ in range(42):
    pass

class Foo:
    def __init__(self):
        for _ in range(23):
            pass

then in REPL....

>>> 2 + 2
4
>>> _
4
>>> import foo
>>> _
4
>>> f = foo.Foo()
>>> _
4
>>> 
#

seems like

idle owl
#

@fathom lava There is a point at which you make your case for something Pylint complains about and we disable it in-line. So if you reach that point, let me know and we can discuss it.

gusty kiln
#

i personally have just reached that point and unilaterally told pylint to go pound sand about 15 times today.

#

it's a useful tool, but if you're making your code observably more complex / harder to understand in order to make it happy, it's probably ok to go the other direction.

fathom lava
#

Hahahaha...sounds good 😄

#

@idle owl Next one for you! boardtest_suite.py:67:0: E0401: Unable to import 'board' (import-error) for the test suite in the examples folder

idle owl
#

@fathom lava I'll be back in a few minutes to help!

fathom lava
#

cool, thanks ^_^

timber mango
#

Hi

#

I have a neotrellis M4 and 2 neotrellis Seesaw and I want to make one big keypad

#

So I looked at the code of the library for both type of card

#

It look's quite different...

#

ie : on the seesaw board, pressed/released key are managed thru interrupt and on M4 board the user only have a list of pressed keys

#

any plan about a common approach ?

idle owl
#

@fathom lava Where are you getting that one? I don't see it on Travis and I'm not getting it locally.

fathom lava
#

oh, locally

#

If I run pylint locally on examples/boardtest_suite.py

idle owl
#

Ok, then I'm guessing it's a local issue. The way CircuitPython works, it has issues importing because you're not running CircuitPython from your machine.

fathom lava
#

That's what I figured...so just try to push it?

idle owl
#

Locally I have ```pylint --disable=invalid-name examples/boardtest_suite.py


Your code has been rated at 10.00/10 (previous run: 9.14/10, +0.86)```

#

Yep!

fathom lava
#

That's kinda odd, because I definitely had some non-capitalized global variables that mine didn't like

#

well, lemme test it on my board (since variables got renamed) and see if things still run OK, then I'll commit

idle owl
#

We have a .pylintrc that treats examples a little more lenient.

#

Ok sounds good!

fathom lava
#

aaah

#

got it

idle owl
#

See the pylint command I ran? with --disable=invalid-name ... that's not everything that it ignores with examples, but it's usually the one that is most prevalent for me. So if I want to see what it'll look like on Travis, I'll run it with that. But only for examples 😃

#

Otherwise I got this: ```7558 kattni@robocrepe:Adafruit_CircuitPython_BoardTest (venvpypi) [60m master %= 7dfc911]$ pylint examples/boardtest_suite.py
************* Module boardtest_suite
examples/boardtest_suite.py:87:0: C0103: Constant name "test_results" doesn't conform to '(([A-Z_][A-Z0-9_]
)|(.*))$' pattern (invalid-name)
examples/boardtest_suite.py:90:0: C0103: Constant name "pins_tested" doesn't conform to '(([A-Z_][A-Z0-9_])|(__.))$' pattern (invalid-name)
examples/boardtest_suite.py:138:0: C0103: Constant name "pins" doesn't conform to '(([A-Z_][A-Z0-9_]*)|(
.__))$' pattern (invalid-name)
examples/boardtest_suite.py:149:0: C0103: Constant name "result" doesn't conform to '(([A-Z_][A-Z0-9_]
)|(.*))$' pattern (invalid-name)
examples/boardtest_suite.py:159:0: C0103: Constant name "result" doesn't conform to '(([A-Z_][A-Z0-9_])|(__.))$' pattern (invalid-name)
examples/boardtest_suite.py:169:0: C0103: Constant name "result" doesn't conform to '(([A-Z_][A-Z0-9_]*)|(
.__))$' pattern (invalid-name)
examples/boardtest_suite.py:179:0: C0103: Constant name "result" doesn't conform to '(([A-Z_][A-Z0-9_]
)|(.*))$' pattern (invalid-name)
examples/boardtest_suite.py:189:0: C0103: Constant name "result" doesn't conform to '(([A-Z_][A-Z0-9_])|(__.))$' pattern (invalid-name)
examples/boardtest_suite.py:203:0: C0103: Constant name "result" doesn't conform to '(([A-Z_][A-Z0-9_]*)|(
.__))$' pattern (invalid-name)
examples/boardtest_suite.py:215:0: C0103: Constant name "num_spaces" doesn't conform to '(([A-Z_][A-Z0-9_]
)|(.*))$' pattern (invalid-name)
examples/boardtest_suite.py:229:0: C0103: Constant name "tested" doesn't conform to '(([A-Z_][A-Z0-9_])|(__.))$' pattern (invalid-name)
examples/boardtest_suite.py:233:0: C0103: Constant name "not_tested" doesn't conform to '(([A-Z_][A-Z0-9_]*)|(
.*__))$' pattern (invalid-name)


Your code has been rated at 9.14/10```

#

Which is probably what you're seeing.

fathom lava
#

ooh, got it. So that will ignore some of the naming things because we're using boardtest_suite as a script

idle owl
#

Example, but yes

#

@fathom lava Ok, down to 1 issue!

#

I think that one is going to be a disable situation.

#

As long as UART does have that in it, it's simply that Pylint can't connect the two.

#

We've had to deal with this one before.

fathom lava
#

Cool...what do I need to do?

idle owl
#

Alright, on that line, I think on the same line, but sometimes it's finicky put # pylint: disable=no-member so it should read uart.reset_input_buffer() # pylint: disable=no-member

#

If that doesn't work, we put it above the line. But I ideally it will be happy on the same line.

#

Worked on the same line for me.

#

@fathom lava Hooray!

fathom lava
#

@idle owl Great success@

#

*!

idle owl
#

I'll merge it here in a bit. Then we can get it released and added to the Bundle. 😃

fathom lava
#

woot woot...thank you!

idle owl
#

I'll get it merged tonight but the rest might have to wait, I'm heading to Chicago tomorrow and I'm trying to get everything set for that.

fathom lava
#

No worries. Thank you for all your help!

idle owl
#

And it looks like there may be an issue with authenticating to PyPI from repos that began their builds on travis-ci.com vs those that started on .org and went to .com. That's the only common thread between these two libraries that are failing with the same error. Bleh.

#

@fathom lava Ah bugger. Can you submit one more PR? It's a super simple one. Change the travis-ci.org build badge in the README to travis-ci.com. @raven canopy We need to update cookiecutter.

#

Alright the docs are setup, I did an initial release.

fathom lava
#

@idle owl No worries...done 😃

#

oh...full PR...one sec

idle owl
#

Yah sometimes it seems silly but inevitably the one time we don't do a PR, and we commit directly, something breaks and the whole repo fails Travis. It's better to catch it and be sure even with simple stuff.

fathom lava
#

Alright, PR opened

idle owl
#

@slender iron ServoKit failed to deploy to PyPI. So I now suspect some issue with travis-ci.com though I don't know how it would be related. I looked into it when MotorKit failed to deploy and couldn't find anything that made sense. Either way, we have to figure it out eventually. Brennen and I will be looking into it presumably, but I wanted you to know so when you get back if we haven't fixed it, you can help.

#

@fathom lava Thank you!

charred blaze
#

So im playing with my adabox 10. Is there a keycode in the HID library for left and right clicks? Im trying to set up a button as a right click for use in Fusion when on my surface pro and using my pen

slender iron
#

@idle owl do these repos use the secure password in the travis yaml?

#

is the deploy error authentication related?

idle owl
#

Yes

slender iron
#

I bet we need to redo the encrypt part of it

idle owl
#

I tried redoing the auth about 10 different ways on ServoKit to no avail.

#

Including with a different endpoint set locally in travis

slender iron
#

did you give travis a flag for the com version?

idle owl
#

Yeah. It failed with setting the flag, but I changed the default to .com and reencrypted it

#

It didn't run with the flag

slender iron
#

travis --com encrypt SOMEVAR="secretvalue" is what I'm thinking of

idle owl
#

Ok

slender iron
#

the --com bit

idle owl
#

yeah

#

I am pretty sure I tried that. But I can try again

slender iron
idle owl
#

Sommersoft is the one who suggested the flag.

slender iron
#

thats my only guess we should email if that isn't working

idle owl
#

Ok, thank you 😃

tidal kiln
charred blaze
#

Ohhhhhhhhh!! Thank you @tidal kiln !!!!!

#

I think i was trying to google the wrong things

tidal kiln
#

keep in mind there are two messages - a press and release. click does both. but depending on what you are trying to do, you may want to use press and release separately

charred blaze
#

Hmmmmm ok. I was trying to use @split ocean 's launch deck code and assign right click to one of the buttons on the trellis

tidal kiln
#

you probably want click

idle owl
#

Wow the docs failed pretty spectacularly on BoardTest. Issues with the .png file. I'll deal with that later.

#

The docs work if you click the link, but the build is failing.

#

So it's ok for now because there are docs.

charred blaze
#

So like, "FIERY EXPLOSION" kinda of spectacular fail? or melty goopy puddle kind of spectacular fail?

idle owl
#

It seemed more like fiery explosion because it was big. But really it was small, failed on one little thing. Failed big on something little.

charred blaze
#

ooooof

#

I believe the answer you are looking for is "Por Que No Los Dos?"

raven canopy
#

@idle owl pypi still not happy? 😦 ⚔

charred blaze
#

Hey @split ocean So i added a line like this to the launch deck program you made for the trellis:

(1,1): (0x110000, KEY, (mouse.RIGHT_BUTTON)),

The program actually runs just fine until I press that specific button. Would you have any advice for making that work?

#

Ok ive made a couple of adjustments to the keymap i was trying to make. this is now the command I have: (1,1): (0x110000, MOUSE, mouse.click(Mouse.RIGHT_BUTTON)),

I did add MOUSE as a third command type. When i save code.py the code runs just fine until I press the specific button on the trellis to run the command then it crashes upon press

idle owl
#

@raven canopy Correct.

raven canopy
#

Why I oughta! 😄

#

yummy steak time! @idle owl i plan on starting the travis-ci.com for cookiecutter and patching steps later tonight.

charred blaze
#

Woooooo hoooo!!! I got the mouse clicks workings

idle owl
#

@raven canopy Thank you.

cunning crypt
#

While I'm super happy to see another CP Helper, I have to say I'm a little disappointed that @charred blaze's name isn't, well, azure anymore.

charred blaze
#

Lol you mean cuz my name isn't blue??

#

Oh geez. I just realized I got changed to a CP helper. I don't know what I'm doing lol

cunning crypt
#

Don't worry, I have that tag too, and I'm just as clueless

charred blaze
#

I just sit here and make jokes and ask random questions. I mean, all I did was add mouse clicks to John's launch deck code for the trellis m4. Oh, and I sit in boxes all cute and stuff

idle owl
#

@charred blaze We added you so you'll get tagged reminders when we do the weekly meetings which you are absolutely welcome to join. That's mostly what the tag is for. It doesn't obligate you to know anything in particular or do anything specific. Sometimes you'll get CircuitPython related info as well.

charred blaze
#

Ahhh ok!!!

tidal verge
#

I have a question related to the SPI Flash chip drivers on Circuit Python. I came across this Circuit Python board and I am trying to build my own: https://blog.adafruit.com/2018/12/06/mini-sam-development-board-by-bwshockley-oshpark-microchipmakes-runs-circuitpython/

Adafruit Industries - Makers, hackers, artists, designers and engineers!

Mini SAM – Development Board running CircuitPython! Mini SAM is a project to design and build a LEGO® minifigure sized development board based on the Atmel® | SAM D21E ARM® Cor…

charred blaze
#

Ok adafruit needs to carry those please!!! I don't have the hands to make one myself!

cunning crypt
#

@charred blaze But do you have the paws?

tidal verge
#

I couldn't find an SPI flash chip mentioned in the BoM (W25Q16JVUXIM). So, I found a flash chip that could be considered a drop-in replacement.

charred blaze
#

No, no I don't @cunning crypt

#

My paws are too shaky for SMD work

tidal verge
#

My question: Can I expect the CIrcuit Python drivers for the SPI flash chip to work with the drop in replacement?

gray narwhal
#

"my paws" oh hecc somebody else says that? xD

charred blaze
#

Well Andon asked if I had the paws for it lol

gray narwhal
#

very good point.

cunning crypt
#

@tidal verge Depends on the chip.

#

Some of them will work just fine using the same programming, others not so much

charred blaze
#

sings "Blue" by Eiffel 65

cunning crypt
#

I can't really poke further than that, I'm not super familiar with it

tidal verge
#

ok

#

The flash chip I found is this one: SST25PF040C

charred blaze
#

Well, I'm off to bed. Gotta be up at 4 am for work. Night everyone.

gray narwhal
#

Nini!

tulip sleet
#

@tidal verge we have a general scheme for supporting various flash chips, so take a look at the settings file for them. There are provisions for slightly different commands, timings, etc.

#

we look at the flash id and then look it up in a table of settings

tidal verge
#

Flash ID refers to the vendor id?

tulip sleet
#

yes

tidal verge
#

Got it. Thanks.

tulip sleet
#

circuitpython/supervisor/shared/external_flash/devices.h

tidal verge
#

thanks.. it answered my question!

#

I now have to verify whether my choice of flash chip is supported or just use one of those chips

tulip sleet
#

worth comparing the datasheets in detail

tidal verge
#

yup

manic glacierBOT
#

I spent some time on this because I wanted to shrink the nrf52832 build.

The key fix is to change https://github.com/adafruit/circuitpython/blob/master/ports/nrf/device/nrf52/startup_nrf52840.c#L119

const func __Vectors[] __attribute__ ((section(".isr_vector"))) = {

to

const func __Vectors[] __attribute__ ((used, section(".isr_vector"))) = {

This forces the SD-compatible isr_vector section to be marked as used, and then that pulls in everything else. There may be...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

This forces the SD-compatible .isr_vector section to be marked as used, and then that pulls in everything else. There may be a few other things that then crop up that need to get changed to get it to compile, I think. I was also revising the Makefile a bit to add some compiler warnings that weren't there before, so I'm not sure what was provoked by my changes.

Ah, that makes sense, good find.

I'll try it, see if I get the same problem of suspiciously large code with gcc 8.2.0.

meager fog
#

@solar whale absolutely no pressure on my part but im around today

#

i was planning on doing graphics rather than wifi stuff, but can noodle at wifi as well 😃

#

for example, we could get esp32 uploading working if ya like

solar whale
#

I'v been trying to get get started -- 2 issues -- I can't get a particle board ( likely nrf issue) to even upload to an esp8266.. I suppose we can get it working on an M4 first then worry about nrf

#

also , the conbined .bin for esp32 is 4Mbytes (as built by them -- factory.bin)

meager fog
#

rilly?

#

yeep

#

is it cause of spaces? we could upload separate pieces

solar whale
#

I think so -- may need to do it in pieces. still ugly

#

I have a few questions about miniesptool

meager fog
#

ok lets do it piece by piece

#

wanna start with ESP32 upload via M4?

#

OR i could try to find a particle and then make a board definition for it in arduino

#

then you could turn the particle into a usb-serial converter

#

lemme see if i have a particle board

#

ok i dont actually

#

so... i cant help ya ther :/

solar whale
#

np -- lets start wil m4

meager fog
#

okok

charred blaze
#

Good day Lady Ada!

solar whale
#

I'm hooking up ERC32 to M4 now

meager fog
#

k me too

solar whale
#

o k connected -- I can run the bitcoin test through it

meager fog
#

ok you uploaded separately?

#

do you recall where the AT firmware is

solar whale
#

yeah -- just used esptool

#

just a sec

meager fog
#

wait i think i found here

#

you're using ESP32-WROOM-32 AT Bin V1.1.2?

solar whale
#

yes, but I rebuilt it

meager fog
#

did ya build it?

#

oh ok

#

oh to match the pins?

solar whale
#

no changes -- it was just easier to manage

meager fog
#

ok can you tos sme your combined file?

solar whale
#

easier to just type make flash

meager fog
#

we can strip 0xff's

solar whale
#

I loaded it in pieces -- but I build the combined -- I should test it amd make sure it works

meager fog
#

i could also just upload the release

solar whale
#

yup

meager fog
#

lemme start with a blink sketch

#

smaller, easier to manage

solar whale
#

ok - FYI here is the way they load the pieces ```--flash_mode dio --flash_freq 40m --flash_size detect 0x10000 ota_data_initial.bin 0x1000 bootloader/bootloader.bin 0x20000 at_customize.bin 0xf000 phy_init_data.bin 0x100000 esp-at.bin 0x8000 partitions_at.bin

meager fog
#

yah

#

you can read it back with

#

/esptool.exe --chip esp32 --port COM98 --baud 921600 --before default_reset --after hard_reset read_flash 0x0 0x3FFFF esp32out.bin

#

(i think)

#

hold on thats not complete

solar whale
#

ooh -- good idea

meager fog
#

esptool.exe --chip esp32 --port COM98 --baud 921600 --before default_reset --after hard_reset read_flash 0x0 0x3FFFFF Desktop/esp32out.bin

#

needed more F's - now its 4MB

#

what board are you using to wire the esp32?

solar whale
#

feather m4 express

#

downloading from my esp32 now -- nice

meager fog
#

i mean, the esp 😃

solar whale
#

feather huzzah

meager fog
#

ok cool me too

#

try this

#

it worries me that just blink is 1.3mb

#

hopefully AT wont add too much more

#

i guess the particle has 4mb flash

solar whale
#

o k -- waht command do you use to upload this?

idle owl
#

Giant blink.

meager fog
#

esptool.exe --chip esp32 --port COM98 --baud 921600 --before default_reset --after hard_reset write_flash 0x0 Desktop/pin13blink.bin

#

next ill try with esptool.py (TOTALLY DIFFERENT THAN esptool.exe OF COURSE)

solar whale
meager fog
#

yeah welcome to esplife

solar whale
#

laoding

#

blinking!!

meager fog
#

ok good now we will do that within python

#

the only thing is i dont think i brought out hte programming pins on the esp32 feather

#

i have a different breakout with gpio 0

solar whale
#

I think A11 is GPIO0 -- no?

#

if not -- may be why I had so much trouble

meager fog
#

nope its not exposed

#

you could solder a lil wire

solar whale
#

what is this 12 - This is GPIO #12 and also an analog input A11 on ADC #2. This pin has a pull-down resistor built into it, we recommend using it as an output only, or making sure that the pull-down is not affected during boot.

meager fog
#

different boot thing

#

gpio 0 is what is toggled to start the bootloader

#

ok this worked, just took like a minute esptool.py --no-stub -t --chip auto --port /dev/ttyS6 write_flash 0 ../pin13blink.bin

#

i will test w/my breakout. if you have some other esp32 dev board it may have gpio0

solar whale
#

the only ones if have are 2 huzzahs and a few particle argons

meager fog
#

:/ how is your solderin?

solar whale
#

ok -- I have a huzzah w/o headers on it yet -- should be able to tack a wire on it -- hard with the headers on

meager fog
#

id go for the spot on the transistor

#

i think theres more suface area

#

but yah not easy - wasnt designed for this

#

ill do it too so i can mimic what you're doing

solar whale
#

not sure I follow where you are going to solder

meager fog
#

oh wait yknow this is totally not going to work at all

#

the RX/TX pins are also not exposed

#

so theres a lot of soldering to do

solar whale
#

?? not just Tx/RX on the headers?

meager fog
#

nope thats the hardware serial, not the rom seiral

#

you could do it but you'd have to solder to those pads too!

solar whale
#

are they available on the breakouts?

meager fog
#

(i think)

#

did you get nrf52->esp8266 uploading going?

solar whale
#

not yet -- keep failing to sync

#

I don't see them on that board

meager fog
#

k im not sure what a good next step is for ya

#

if you want you can try soldering lil wires

#

it might work

#

i can get esp32 working on m4 and then get a feather nrf52 and see whats up there

solar whale
#

I can try putting wires on those pads -- just need 3 -- gpio0 , tx, rx.. I think I'll just try going to the pads on the module

#

hmm -- not sure what I said --- setting up my soldering station -- need to switch to a smaller tip

meager fog
#

ok im gonig to try and get my breakout to sync..ping if u need somethin

solar whale
#

thanks -- good luck!

solar whale
#

I "think" I have wires in place -- the baord still functions ....

#

flashed blinky ok

meager fog
#

ok im still hacking on the breakout

#

its responding but not syncing

main meteor
#

GPIO0, I'd be tempted to solder some wire-wrap wire into the via.

meager fog
#

slow goin' 😃

solar whale
#

this is M4 to esp32? so I'll use these 3 wires and I can try it as well. are you jsut rying the miniesptoo to sync?

meager fog
#

yah i have m4 to esp32 - im using an espressif devboard with all the pins broken out

#

im just working on syncing now

#
ESP mini prog
Resetting
['0xc0', '0x0', '0x8', '0x24', '0x0', '0x0', '0x0', '0x0', '0x0', '0x7', '0x7',                                                            '0x12', '0x20', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55',                                                            '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55',                                                            '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55',                                                            '0x55', '0x55', '0x55', '0x55', '0xc0']
Writing: bytearray(b'\xc0\x00\x08$\x00\x00\x00\x00\x00\x07\x07\x12 UUUUUUUUUUUUU                                                           UUUUUUUUUUUUUUUUUUU\xc0')
['0xc0', '0x0', '0x8', '0x24', '0x0', '0x0', '0x0', '0x0', '0x0', '0x7', '0x7',                                                            '0x12', '0x20', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55',                                                            '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55',                                                            '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55',                                                            '0x55', '0x55', '0x55', '0x55', '0xc0']
Writing: bytearray(b'\xc0\x00\x08$\x00\x00\x00\x00\x00\x07\x07\x12 UUUUUUUUUUUUU                                                           UUUUUUUUUUUUUUUUUUU\xc0')
Packet: ['0xc0', '0x1', '0x8', '0x4', '0x0', '0x7', '0x12', '0x20', '0x55', '0x0                                                           ', '0x0', '0xc0', '0x12', '0xc0']
Reading: bytearray(b'\xc0\x01\x08\x04\x00\x07\x12 U\x00\x00\xc0\x12\xc0')
Response: ['0x0', '0x0', '0xc0', '0x12'] Register: ['0x7', '0x12', '0x20', '0x55                                                           ']
#

getting a response but my code is probably confused 😃

solar whale
#

I think I'm wired up. let me know if you want me to try your code

meager fog
#

getting close, im getting packets

solar whale
#

cool!

#

do i need a separate RESET to the erc32 module wire or is the header RST OK?

meager fog
#

header reset is right

solar whale
#

good -- don't want to push my luck adding wires!

meager fog
#

ok got it

#

wel at least reading mac

solar whale
#

wow

#

are you just connecting power,gnd,rst,gpio0, rx,tx from module

meager fog
#

yeah

#

sorry back, ok i got it to detect its an ESP32 too

#

yeah RX/TX, GPIO0 to D2, RESET to D3

solar whale
#

ok -- i have D5/D6 but should eb OK -- want me to try your code?

meager fog
#

sure

#

im so not sure it will work 😃

solar whale
#

np

#

I was able to see som stuff after a reset using my comm program - so it does communicat -- at least RX

meager fog
#

ok i pushed out miniesptool

solar whale
#

ok

meager fog
#

make sure debug is on, use 115200 baud

solar whale
#

😦 ```>>> import esp32
ESP mini prog
Resetting
['0xc0', '0x0', '0x8', '0x24', '0x0', '0x0', '0x0', '0x0', '0x0', '0x7', '0x7', '0x12', '0x20', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0xc0']
Writing: bytearray(b'\xc0\x00\x08$\x00\x00\x00\x00\x00\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xc0')
['0xc0', '0x0', '0x8', '0x24', '0x0', '0x0', '0x0', '0x0', '0x0', '0x7', '0x7', '0x12', '0x20', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0xc0']
Writing: bytearray(b'\xc0\x00\x08$\x00\x00\x00\x00\x00\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xc0')
['0xc0', '0x0', '0x8', '0x24', '0x0', '0x0', '0x0', '0x0', '0x0', '0x7', '0x7', '0x12', '0x20', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0x55', '0xc0']
Writing: bytearray(b'\xc0\x00\x08$\x00\x00\x00\x00\x00\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xc0')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "esp32.py", line 18, in <module>
File "adafruit_miniesptool.py", line 257, in sync
RuntimeError: Couldn't sync to ESP

#

just ran the simpletest

#

what M4 are you using?

meager fog
#

metro m4

#

try a few times

#

may takea few ?

solar whale
#

OK -- BTW -- I am confused by how GPIO0 is set -- should it be high or low -- I jsut see it getting toggled in the code.

#

trying in the REPL now -- still no sync -- no responses getting reported

#

reset works -- esp.reset() -- I see my blinky

meager fog
#

oof

#

sorry im neck deep in some refactoring

#

not sure - could be the trasistor is interfering

#

wanna try it on nrf52?

#

with the built in chip?

solar whale
#

np -- I went right to GPIO0 -- sure I'll try that on particle argon

#

WOW!! it workd!!!!! ```ESP32
Reading register 0x3ff00050
['0xc0', '0x0', '0xa', '0x4', '0x0', '0x0', '0x0', '0x0', '0x0', '0x50', '0x0', '0xf0', '0x3f', '0xc0']
Writing: bytearray(b'\xc0\x00\n\x04\x00\x00\x00\x00\x00P\x00\xf0?\xc0')
Packet: ['0xc0', '0x1', '0xa', '0x4', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0xc0']
Reading: bytearray(b'\xc0\x01\n\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0')
Response: ['0x0', '0x0', '0x0', '0x0'] Register: ['0x0', '0x0', '0x0', '0x0']
Reading register 0x3ff00054
['0xc0', '0x0', '0xa', '0x4', '0x0', '0x0', '0x0', '0x0', '0x0', '0x54', '0x0', '0xf0', '0x3f', '0xc0']
Writing: bytearray(b'\xc0\x00\n\x04\x00\x00\x00\x00\x00T\x00\xf0?\xc0')
Packet: ['0xc0', '0x1', '0xa', '0x4', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0xc0']
Reading: bytearray(b'\xc0\x01\n\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0')
Response: ['0x0', '0x0', '0x0', '0x0'] Register: ['0x0', '0x0', '0x0', '0x0']
Reading register 0x3ff00058
['0xc0', '0x0', '0xa', '0x4', '0x0', '0x0', '0x0', '0x0', '0x0', '0x58', '0x0', '0xf0', '0x3f', '0xc0']
Writing: bytearray(b'\xc0\x00\n\x04\x00\x00\x00\x00\x00X\x00\xf0?\xc0')
Packet: ['0xc0', '0x1', '0xa', '0x4', '0x0', '0x30', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0xc0']
Reading: bytearray(b'\xc0\x01\n\x04\x000\x00\x00\x00\x00\x00\x00\x00\xc0')
Response: ['0x0', '0x0', '0x0', '0x0'] Register: ['0x30', '0x0', '0x0', '0x0']
Reading register 0x3ff0005c
['0xc0', '0x0', '0xa', '0x4', '0x0', '0x0', '0x0', '0x0', '0x0', '0x5c', '0x0', '0xf0', '0x3f', '0xc0']
Writing: bytearray(b'\xc0\x00\n\x04\x00\x00\x00\x00\x00\\x00\xf0?\xc0')
Packet: ['0xc0', '0x1', '0xa', '0x4', '0x0', '0xff', '0x8', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0xc0']
Reading: bytearray(b'\xc0\x01\n\x04\x00\xff\x08\x00\x00\x00\x00\x00\x00\xc0')
Response: ['0x0', '0x0', '0x0', '0x0'] Register: ['0xff', '0x8', '0x0', '0x0']
MAC ADDR: ['0x0', '0x8', '0xff', '0x0', '0x0', '0x0']
Resetting

#

not sure I believe the MAC address

meager fog
#

wow

#

no thats wrong

#

gtrab the altest

#

the base addr varies

#

i just fixed mac

solar whale
#

ok

meager fog
#

im h0ngry tho. gotta takea break

#

writing doesnt work quite yet

#

thers a few steps missing i think i have to 'setup the SPI flash'

#

not hard stuff, just isnt used in esp8266

solar whale
#

At least it talks to it!! Thanks for getting it going -- I'll try the other test

#

I don;t see alt test -- where is it?

#

ohh -- pulled latest -- ```Reading register 0x6001a000
['0xc0', '0x0', '0xa', '0x4', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0xa0', '0x1', '0x60', '0xc0']
Writing: bytearray(b'\xc0\x00\n\x04\x00\x00\x00\x00\x00\x00\xa0\x01\xc0') Packet: ['0xc0', '0x1', '0xa', '0x4', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0xc0'] Reading: bytearray(b'\xc0\x01\n\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0') Response: ['0x0', '0x0', '0x0', '0x0'] Register: ['0x0', '0x0', '0x0', '0x0'] Reading register 0x6001a004 ['0xc0', '0x0', '0xa', '0x4', '0x0', '0x0', '0x0', '0x0', '0x0', '0x4', '0xa0', '0x1', '0x60', '0xc0'] Writing: bytearray(b'\xc0\x00\n\x04\x00\x00\x00\x00\x00\x04\xa0\x01\xc0')
Packet: ['0xc0', '0x1', '0xa', '0x4', '0x0', '0x6c', '0x69', '0xd1', '0xa4', '0x0', '0x0', '0x0', '0x0', '0xc0']
Reading: bytearray(b'\xc0\x01\n\x04\x00li\xd1\xa4\x00\x00\x00\x00\xc0')
Response: ['0x0', '0x0', '0x0', '0x0'] Register: ['0x6c', '0x69', '0xd1', '0xa4']
Reading register 0x6001a008
['0xc0', '0x0', '0xa', '0x4', '0x0', '0x0', '0x0', '0x0', '0x0', '0x8', '0xa0', '0x1', '0x60', '0xc0']
Writing: bytearray(b'\xc0\x00\n\x04\x00\x00\x00\x00\x00\x08\xa0\x01\xc0') Packet: ['0xc0', '0x1', '0xa', '0x4', '0x0', '0xae', '0x30', '0x47', '0x0', '0x0', '0x0', '0x0', '0x0', '0xc0'] Reading: bytearray(b'\xc0\x01\n\x04\x00\xae0G\x00\x00\x00\x00\x00\xc0') Response: ['0x0', '0x0', '0x0', '0x0'] Register: ['0xae', '0x30', '0x47', '0x0'] Reading register 0x6001a00c ['0xc0', '0x0', '0xa', '0x4', '0x0', '0x0', '0x0', '0x0', '0x0', '0xc', '0xa0', '0x1', '0x60', '0xc0'] Writing: bytearray(b'\xc0\x00\n\x04\x00\x00\x00\x00\x00\x0c\xa0\x01\xc0')
Packet: ['0xc0', '0x1', '0xa', '0x4', '0x0', '0x0', '0xa2', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0xc0']
Reading: bytearray(b'\xc0\x01\n\x04\x00\x00\xa2\x00\x00\x00\x00\x00\x00\xc0')
Response: ['0x0', '0x0', '0x0', '0x0'] Register: ['0x0', '0xa2', '0x0', '0x0']
0x4730ae
MAC ADDR: ['0x30', '0xae', '0xa4', '0xd1', '0x69', '0x6c']
Resetting

meager fog
#

tats seems mor right?

#

hard to tell, you can compare against your esptool output

solar whale
#

not sure how to use ESPTOOL with the argon esp32 chip?

meager fog
#

oh right yeah

#

maybe argon software has soe way to know the mac

#

or look on the labelling

solar whale
#

Oh yes -- there is an AT command -- Just asec

#
b'AT+GETMAC=0\r\n'
b'+GETMAC: "30:ae:a4:d1:69:6c"\r\n'
b'OK\r\n'
b''
#

looks good!

meager fog
#

kool

solar whale
#

very encouraging -- great work!

meager fog
#

ok i can write but its so deathly slow at 115200

#

i need to bump it up

#

got some 🌮

solar whale
#

enjoy!!!

meager fog
#
code.py output:
ESP mini prog
Resetting
Synced
ESP32
MAC ADDR:  ['0x24', '0xa', '0xc4', '0x0', '0x3d', '0xd0']
Writing pin13blink.bin w/filesize: 1351440
Took 0.82s to erase 1320 flash blocks
Writing at 0x00005000... (1 %)
#

it is ridiculously slow

#

but it is going at 912600

solar whale
#

It's ok to be slow...

meager fog
#

ok in a minute or two it should be done

#

🤷

#

Writing at 0x00069400... (31 %)

solar whale
#

great -- I have to go for awhile anyway -- I'll pull your updates and try it later -- I'll try loading the AT firmware in pieces . Not sure blinky will do much on the argon esp32 chip 😉

meager fog
#

yah this is just an ez test

#

i can try the AT afterwards

solar whale
#

Great -- good luck -- wish I could have been more help... I'm happy to try it when you are ready.

meager fog
#

well its good to hear you can comm on the nrf52

#

thats a new success

solar whale
#

yes -- not sure why my tacked wires are not workin on the Huzzah, but the argon is the goal anyway

#

I can flash the huzzah the "old" wasy

#

it was a good soldering challenge

meager fog
#

kk the esp32 is blinking pin 13

#

so i guess next ill try the at firm

solar whale
#

woohoo!

#

may take awhile 😉

#

I'll check back later this evening. Good luck and thanks!

stark hare
#

I was wondering if you could use circuitpython on a metro 328.

solar whale
#

@stark hare no - sorry -- It needs the metro M0 or M4

stark hare
#

Aww. Thanks.

meager fog
#

@solar whale will get back to it tonite...

solar whale
#

np, I’ll be back at it later as well.

meager fog
#

one thing we gotta do is build an AT firmware that has the RX/TX pins on the same as the bootload pins

#

cause the default AT firmwar released by esp has the AT commands on different pins than the bootload pins

solar whale
#

Ah. Ok . I can look at that.

#

I guess particle did that in theirs.

meager fog
#

just to check. you got M4 + ESP8266 AT working, did you get nrf52 +ESP8266 AT working?

solar whale
#

Yes

meager fog
#

like with an external ESP8266 module

#

ok and you could sorta chat with the ESP32 but the baudrate was too high?

solar whale
#

Yes. New nrf uart is much better but can’t handle 921600 and can’t change baudrate in the particle ESP32

meager fog
#

kk

#

if you can build an at firmware for esp32 that then ovre the USB-uart it can comm

#

right now i get debug details over USB

#

so that has to be tweeked

solar whale
#

External are both good. And you can lower the baudrate

meager fog
#

ok pop a zip in here with the AT firm

#

separate bin files is good

solar whale
#

On the external ESP32 if I flash via USB I can do AT via RX/TX on the m4

#

Just have to get proper EOL. Screen does not work

#

espatcommands works

solar whale
#

It’ll be late tonight before I can do anything else.

solar whale
#

@meager fog looking at AT firmware but I want to make sure I understand what you need - Is the change for the external ESP32 or the one on hte argon. for the external, it works now if loaded through USB, the AT communication is via teh RX/TX pins and it works with the M4 and nrf boards. I can see that a change may be needed for the argon since we want the AT to be on the proframming UART. Is that what you meant?

meager fog
#

hihi

#

i got md5 verification gonig

#

right!

#

the AT firmware i downloaded from espressif site has 2 UARTs - one for uploading/debug and one for at commanding

#

the argon has 1 UART for both

#

so if you can build it, then when you upload it w/esptool to yuour ESP32 you should be able to send AT command over the USB port

#

USB port = one UART for both

solar whale
#

OK -- but now you can program AT firmware to ERC32 via M4? and it works via stnadard UART? are there new changes to miniesptool for that?

meager fog
#

yeah

#

yes lots

#

well im still chasing a bug

#

but i wanted to add verification in the meantime so i did that

#

so you can md5 sum

#

but im gettin' there

solar whale
#

OK good -- I'll look at AT build -- no rush -- just wanted to clarify that the new AT build was need for argoon and not external ERC32 -- so does teh USB to ESP32 talk to the programming UART

#

sorry keep typing ERC32 -- that is a processor I have used for the past 15 years --

meager fog
#

yah im able to write eveything but erasing is failing in some sections

#

not sure whatsup yet

solar whale
meager fog
#

ok found the thng im missing

#

i need a fe wmore mins to implement

solar whale
#

me too!

meager fog
#

nice thing about esp32 is its got md5s

#

i probably broke esp8266 in the meantime but i can go back n fix

scarlet fjord
#

not sure who to ask about this, but... any chance of N-Key rollover for CircuitPython??

meager fog
#

can't thats built into HID spec

#

you can only send 6 codes in a report :/

#

@solar whale ok ready for some code?

solar whale
#

@meager fog sure -- I'll be playing catch-up , pu I'll try to keep up

scarlet fjord
#

oh 🤔 how do n-key rollover keyboards work, then? do they just send multiple reports?

meager fog
#

yahh

#

i think so?

#

not sure what that is to be honest 😦

#

but you can press a key then press another one

#

like nearly instany

#

you just cant send it in the same report

#

@solar whale pull n check latest multifile

scarlet fjord
#

alright 👍 thanks

meager fog
#

thats the 'esp32' folder bundle

#

as generated by esp idf

#

its ... slow but seems to work

#

then its just a matter of generating the right firmware

solar whale
#

great -- looks good -- I'm getting close to firmware for argon

meager fog
#

yah its some setting in the AT firmware makefiles or whatnot

#

if you load it into the huzzah and can AT thru the USB port, its correct 😃

solar whale
#

and thaose are md5 checksums for each file

meager fog
#

yeah

#

use md5sum in the command line on each file

#

if you pass in None it will skip test

solar whale
#

ok -- back to firrmare -- too bad my huzzah erc32 won't let me run a simple test.

#

oh -- I see your comment -- nice way to test it via the huzzah USB -- great

meager fog
#

why not?

#

kk

#

alright you should get this output when you've run it

#

on the argon

#
Writing esp32/esp-at.bin w/filesize: 1119072
***erase size 1119072, num_blocks 1093, size 1024, offset 0x100000
Took 1.34s to erase 1093 flash blocks
Writing at 0x00211000... (100 %)Took 250.01s to write 1119072 bytes
Verifying MD5sum  02e9c4af9480387644c7e45f7f8b9c0a

Writing esp32/partitions_at.bin w/filesize: 3072
***erase size 3072, num_blocks 3, size 1024, offset 0x8000
Took 0.05s to erase 3 flash blocks
Writing at 0x00008800... (100 %)Took 0.68s to write 3072 bytes
Verifying MD5sum  76bc3722dae4b1f2e66c9f5649b31e02
Resetting
#

well, thers a bunch of those chunks, but basically that

solar whale
#

ok -- thanks -- will keep you posted on progress

meager fog
#

all but one are a few seconds, the chonker is 4 minutes

#

this way you dont have to do the file merge thing

solar whale
#

luckily the argon has a4Mbyte flash

meager fog
#

yah you only need 1mb for this, because its sparse

#

thats why i did multifile

#

ok im going to move to gfx stuff now

#

@solar whale are you all good?

solar whale
#

@meager fog yup -- thanks!

meager fog
#

epic, ping if u are stuck - im gonna logoff - l8r!

solar whale
#

@meager fog still fighting with firmware build -- getting close -- I get command echo on USB but cant actually execute commands. Getting late -- I'll try a few more things then keep at it tomorrow.

solar whale
#

woohoo!! -- now I can get AT commands via USB -- just had to use miniterm,py to talk to it -- Issue was with EOL characters.

solar whale
#

@meager fog OK -- I do have a build that works on the Huzzah ESP32 via USB ```jerryneedell@Ubuntu-Macmini:~/projects/esp32-at$ miniterm.py /dev/ttyUSB0 115200
--- Miniterm on /dev/ttyUSB0 115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
AT

OK
AT+GMR
AT version:1.3.0.0-dev(6aafec8 - Dec 7 2018 02:23:19)
SDK version:v3.3-dev-343-g7fa98593b
compile time:Dec 15 2018 23:55:32

OK

tough flax
#

Hi folks - doing some fun stuff w/ the Christmas SoundBoard... why do I get occasional "busy signals"?

#

And an occasional "shooting star" sound?

#

PFFT - Nevermind! It was the soundbar's battery dying 😃

#

Ok, I'm still getting the shooting star sound through the headphones...

meager fog
karmic notch
#

Working with circuit python and CPX I am trying to find a project that will be fun and engaging for about 3-4 boards/students. One board has a cricket, one is attached to a 24 nonpixel ring. What are some interesting projects I can do with this setup (I also have the eeducator pack that comes in adabot lunch pale.)

#

recommendations would be great. 😃

meager fog
#

@karmic notch zombie game is fun )

karmic notch
#

Ooh, that does sound fun.

meager fog
karmic notch
#

oh yeah,, that' looks great.

meager fog
karmic notch
#

Are you related to Ada Lovelace? I took a comp science test that mentioned her, I thought of you immediately. 😃

tough flax
#

Thanks for the heads up on the caps, @meager fog

meager fog
#

tru, nope

tough flax
#

Tactile larger buttons for low vision kiddos

#

And one that holds an icon 😃

meager fog
#

nice

tough flax
#

Finally found a use for the clear TPU

manic glacierBOT
#

OK, thanks to Mouser for fast shipping :-)

The same code works on the NRF 52840 DK (PCA10056) with only minor modifications to pin numbers and thresholds. The tracks on this board from NRF to pins are really long, but it still picks up a good touch signal.

import board
import touchio
t0 = touchio.TouchIn(board.P0_04)
t1 = touchio.TouchIn(board.P0_29)

t0.threshold = 61700
t1.threshold = 61400

while True:
    print("%4d %d %4d %d" % (t0.raw_value, t0.value, t1.raw_value, ...
tough flax
#

The big ones kinda hard to press in the center. But I think it’s solvable

karmic notch
#

Awesome.

manic glacierBOT
solar whale
#

@meager fog It works!! I flashed the modified AT Firmeare to the Argon Esp32 and I can execute AT Commands on it !! ```
AT
b'\r\n'
b'OK\r\n'
b''
AT+GMR
b'AT version:1.3.0.0-dev(6aafec8 - Dec 7 2018 02:23:19)\r\n'
b'SDK version:v3.3-dev-343-g7fa98593b\r\n'
b'compile time:Dec 16 2018 05:38:30\r\n'
b'\r\n'
b'OK\r\n'
b''

solar whale
#

I'm still experimenting with the AT build but let me know if you want a set of the .bin's to try.

marble hornet
#

i'm thinking about this:

raven canopy
#

@solar whale woohoo! excellent work! are you using espressif's AT firmware, or particle's argon-ncp?

solar whale
#

@raven canopy it's a custom compile of Espressif AT firmware -- have to move the AT UART. On big annoynace in the particle_ncp code was that they disabled the UART_CUR command so it was not possible to change the baudrate. Something I htink we will need some flexibility with.

#

Now taht we can flash the argon ESP32 at will (thanks to Ladyada!) there are many options

raven canopy
#

agree that changing baudrate is a crucial ability. there is another option, but i'm not sure of the work involved/possibility: add flow control to blinka. 😄

solar whale
#

yup -- something to look into -- the lists keep growing.

raven canopy
#

the real upside to that is that users won't have to flash new firmware. assuming that we can get circuitpython to talk at the baudrate.

solar whale
#

maybe, but there were other issue with the NCP sw taht are not compatible with the AT Firware in the exterenal boards.

solar whale
#

@raven canopy it is far from perfect, but I can now use eitehr the external ESP8266 or ESP32 with an M4 or particle xenon and the particle argon -- al with the same code to run Ladyadas espatcommnad example to check bitcoin prices ! Still a lot of cleanup to do.

solar whale
#

This is worse than Dunkin Donuts -- too many options 😉

raven canopy
#

😆

solar whale
#

Particle.argon checking bitcoin price via internet with CircuitPython

timber mango
#

I'm finding the Huzzah a little slow to develop on with CP. It there another Feather that provides drive emulation that I can add wifi to?

raven canopy
timber mango
#

Thank you- I was hoping to hear about Wifi support for the SAMD boards, but I don't see any Feather Wings that support that

meager fog
#

@solar whale oh goodness you're up early

#

lol - congrats. we did it!!!

solar whale
#

Dog woke me up 😉

#

yes -- lots of tweaks to do, but it works!

meager fog
#

ok sweet

#

should i merge in your changes

#

and release the two libs?

solar whale
#

I'm ok with that if you are -- as lonk as you don't mind some commented out code in the espatcommands lib.

manic glacierBOT
meager fog
#

@solar whale yah since you're doing ESP32 why dont ya commit whatever you can

#

and then ill check against my bitcoinner

#

and we'll go back n forth if we have to till we have stabilized for both

#

want me to merge the PR?

solar whale
#

Yes -- go ahead and merge it - thanks

meager fog
solar whale
#

I need to do some checking on that -- I'll check it and eitehr update or close it. It does not seem to bother the argon but need to check other boards again.

#

do you want a copy of my .bin for the argon and the load script? I'll probably have a new version later today or tomorrow,

meager fog
#

sure toss it here in a zip when ready

#

ok git updated and its still working on my esp8266

#

its slow at times. i sorta wish i knew why sometimes w dont get a response

#

i think i could cookie it now?

#

@solar whale i could rename it at the same time, is 'espATcontrol' better?

solar whale
#

it can be slow and ofter erros but it recovers -- seems mor stable with erc32

#

sounds good to me.

meager fog
#

ugh travis changed how to activate

solar whale
#

note -- i did not enable the AT BLE -- had issues building it and don't need it. I wonder if we should take oth OTA stuff as well?

#

the miniesptool worked great -- for the ARGON I had to pull CTS low in order to sync.

#

the md5 checksums are really nice!

#

with the name change -- do I have to refork or does git keep it straight?

solar whale
#

ok -- got github and fork straightened out -- all good.

meager fog
#

@solar whale hiya back, im docs'ing

#

almost done

#

may want to wait a few mins since im about to push a lot of changes

solar whale
#

np -- all synched -- ready for changes

#

@meager fog just confimed the AT+RST issue still occurs with an nrf52840 and an external ESP9266 but it does not occure on the particle argon using the onboard ERC32 .... still investigating.

meager fog
#

k

#

still pylinting

solar whale
#

😬

meager fog
#

well i cant seem to turn on travis for some reason

solar whale
#

OK -- I'll pull and test.

meager fog
#

unclear - will activate it now

#

travis'n

#

jerry - ok linted and ready to go, please fork/use the new lib

solar whale
#

ok - got it -- updating my test cases and will run them

meager fog
#

k next ill do miniesptool

idle owl
#

@meager fog Travis seems to take a little time but activates eventually on .com. I'll look into to when I librarify it.

meager fog
#

np

idle owl
#

Have to try one more thing with PyPI before emailing them anyway so I'll ask so we know for sure.

solar whale
#

@meager fog forgot to mention -- default nrf53840 builds fo not have "ure" I added it in order to run miniesptool -- I'll put in a PR to CP to add it to the builds

meager fog
#

oh kk

#

yeah

#

did we use it?

#

i thought i got rid of most of em

#

yeah its notused?

solar whale
#

It was imported -- I did not check if it was used

#

OK -- if you can take it out -- that is simpler

meager fog
#

than

#

pylintin....

solar whale
#

cool! new ESP_ATcontrol code runs on the particle xenon w/ESP8266 and particle.argon with onboard ESP32

#

just have to avoid the AT+RST on the xenon

#

yay! ESP_ATcontrol also runs on featherm4 with external ESP32

#

I've run simpletest and bitcoinprice on all of them

meager fog
#

man linting...

manic glacierBOT
solar whale
#

I have to go do some errands -- back later.

meager fog
#

k

meager fog
#

@solar whale ok 'final' code uploaded

#

i could do a writeup

#

if you can give me screenshots of the argon programming that would be 👍

charred blaze
#

I haven't followed this too closely. But what exactly are you guys working on?

meager fog
#

adding wifi to circuitpython by wiring up an ESP module

#

@solar whale writing guide - bbl, try the new esp32 demo, it should match up with your code now

charred blaze
#

Oooh that's cool!!!

charred blaze
#

One day ill look into fully porting my lightsaber code into Circuitpython

solar whale
#

@meager fog OK -- I'll pull the latest and give it a run -- I'll capture a log and make some screen shots .. thanks

meager fog
#

ok i put what you sent me here

#

but feel free to send whatever, or i can also add u as an author there

solar whale
#

Wow -- looks official!

#

Either way is fine -- your are welcome to make me an author if that is easier.

#

I'll try to get thsi done this evening, but may not be until tomorrow afternoon before I get a block of time.

meager fog
#

np

solar whale
#

found one error in esp32multifile -- I'll fix and do a PR -- have to define TX/RX - cant use board.tx/RX

#

neverminnd -- I misunderstood the Comments -- trying again

#

it works fine -- loading big chunk now.

buoyant wigeon
#

@meager fog @solar whale Nice work with ESP_ATcontrol 👏 ....Will it also be possible to use ESP-01 with 1MB flash and ItsyBitsy M0?

meager fog
#

yes

#

you need 1MB flash tho

#

the very old 512kb ones wont work - AT firmware wont fit

#

@solar whale if you can give me a screenshot

solar whale
#

ok juat a sec

buoyant wigeon
#

Thanks... I have mostly new ones with 1MB 🙂

meager fog
#

@buoyant wigeon try it out! let us know if it does/doesn't work

solar whale
meager fog
#

perfect

solar whale
#

shows beginning and end

#

worked great!

meager fog
#

yay that page is done

#

ill do up the 'usage' page now