#circuitpython-dev
1 messages Β· Page 102 of 1
Assuming @tulip sleet's Ampy fix will be in there, so I'll be able to test out adding libraries to the ESP8266. Specifically the ureqests library or module, however you want to call it lol.
@formal plover ampy is already fixed independently. If you update adafruit-ampy, you'll get the fixed version of ampy
Hmm I'll try it again when I get home. I did that yesterday or two days ago and I still couldn't do ls to see file paths
pip install adafruit-ampy --upgrade
Either which way I did it, it said it was the most recent version. But I'll try later and let you know @tulip sleet.
Obviously it works because you tested it, so I probably wasn't paying attention when I was updating it.
It was early evening yesterday. The new version is version 1.0.2 (was 1.0.1)
Oh yeah, I definitely tried it earlier than that, so that's what's up. Anyhoo... Super excited you guys are already talking about possibly releasing r2 tonight
I'll try to test something labeled "beginner friendly" by @slender iron .
I'm not all that familiar with GitHub, so I might struggle a little bit with some of the terminology
It's a process. We have a bunch of fixes and a few newly reported but not fatal problems.
I'm sure it is @tulip sleet. You guys are doing great work though.
tnx - we're enjoying it!
Awesome! I'm glad you're enjoying your work. That's the dream right there.
@formal plover I'm learning Git and Github right now, heh
@idle owl Yay! Haha how's that for wordplay
@formal plover I mean not this actual second, but I'm in the process of learning it and writing a presentation for a local user group.
@idle owl I figured as much. Oh, awesome.
@tulip sleet at my desk now
on AE voice channel
We have some local user groups for maker and techy stuff, but they've always appeared flakey in the "meetup" app. We have a local maker space, but it's like $60/m
I don't know how much our local maker spaces are, but there's two really nice ones. Our user group meets every second tuesday and has for the last 25 years or something?
Are there significant differences between "latest commit image" and the planned rc2? In other words, are there a lot of potential commits in work? @slender iron ?
// Check to see if we've been CTRL-Ced by autoreload or the user.
if(MP_STATE_VM(mp_pending_exception) == MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception))) {
break;
}
@slender iron When you're done with your chat: I have a strip of 12 Dotstars hooked up to my CPX. I don't think my code is right anyway. But like I said I'm getting the error Pin PA20 in use, which is the MOSI pin according to the pinout list you sent me.
@idle owl free now
@slender iron Ok
sorry for being slow, my brain is still waking up
I'm having a really fuzzy morning too, so it's totally ok
and SCL for the clock
are you doing from board import * at the top?
It's under import dotstar but yes
right, then it'd be SCL and SDA without the board.
Ok now we're back to the first error I Got which is in dotstar.py , line 47, in setitem typeError: "int" object is not subscriptable
I'm not sure what your current code or library is. would you mind screen sharing with me? I can video chat with you on discord
We'll have to add an new API for this. Its not well covered in CPython. More background is here: https://stackoverflow.com/questions/2408560/python-nonblocking-console-input
@slender iron We'll have to sort screensharing - I've never done it. Otherwise, let's do it!
ok, look in your direct messages. I made a friend request
Ok accepted
This bug came back as of 2.0.0-rc1 or earlier. Also see the same thing with
while True: pass
then type ctrl-C. Board will soft-reset.
found it @idle owl. trying it now
so I do get it to light up
That's good at least, lol
the first pixel isn't the right color though
they're backwards sometimes
bgr or whatever. In fact the library I use has them all listed at the top as every possible order to cover all the bases
Mine are all white so I wouldn't have noticed that
ah! they are white dot stars?
Mine are yes
that could be an issue
but the same code works, because it's three white LEDs
ah
I was able to run a series of animations from a strand test on them that was made for RGB when I first got started on the project
kk
import time
import adafruit_dotstar
pixels = adafruit_dotstar.DotStar(board.SCL, board.SDA, 30)
pixels[0] = (0, 0, 10)
pixels[1] = (10, 0, 0)
pixels[2] = (0, 10, 0)
print(pixels)
time.sleep(2)
pixels.deinit()
thats my test code
omg.
hold on.
lol
The other end of the plug wasn't plugged in either.
They're lighting up
π
sigh
My original code works too.
rofl.
So, hey, @slender iron your dotstar library works.
why is my first pixel too white though?
I have it set to 100000 and it's entirelly too bright for that on mine.
The second and third one in your code were correct. The first one is on max.
kk
This: pixels[0] = 0x000000 also puts it on max brightness regardless of whether there are other pixels after it.
kk
Will circuitpython work on the ESP32 as well?
eventually
nice
I can't replicate to the too bright pixel anymore. I fixed the deinit code I think.
Nice!
kattni are you @idle owl on github too?
I am!
@idle owl added you as a collaborator on the dotstar library
that way you can review code π
@idle owl you're official/legit now
(you need to accept it)
@formal plover Evidently!
lol, @slender iron that could be taken two ways... one click a button, the other is like you're giving life advice about accepting new things or something like that. I read it that way first after @formal plover comment, and laughed out loud.
lol
Heheπ 
Accepted!
I think this problem is plaguing Rosie CI as well. I added something that should monitor the flush through the kernel block device stat but its still having issues.
@jerryneedell do you feel that is new post-1.0?
I just crashed Atom so hard it won't reopen. rolls eyes Reboot time evidently!
Wow. That was a pretty solid crash. Had to remove all the perpherals from my computer before it would even start up again.
@tannewt I had not experienced this under 1.0.0 but that is not conclusive, since it also depends on whether I used genitalia or nano and I can't be sure I exercised it on 1.0.0. I'll try reverting to 1.0.0 and see if it is reproducible there. Hopefully later today.
Managed to corrupt the CPX. The one time I don't have code backed up. At least it's tiny. I think I can remember it.
Can you explain how to get to the updated adafruit_dotstar file though? I'm having trouble finding it
its under files changed here: https://github.com/adafruit/Adafruit_CircuitPython_DotStar/pull/1
This isn't good. It wasn't working right so I did the doubletap reset to try to reload the uf2 file on it. It turns green then mounts as cplayboot, when I copy the uf2, it looks like it works, lights go off, it mounts circuitpy. But I go to the drive and there's nothing on it. And it's not even letting me copy the lib folder over.
I redownloaded the uf2 file as well.
And I disconnected everything from the CPX.
sounds like the file system got hosed
How do I fix it? I've not had it go quite this far before
Thank you
@tulip sleet figured it out. π
yw
Worked beautifully
I couldn't remember my own code. So I copied and pasted your test code. It works, the first pixel is the correct brightness!
yay!
I tried to write up what I had before but it was failing in my code, so I figured use yours.
FYI - when using jumper wires, it will sometimes send phantom signals to the dotstar strips and turn on the lights in random ways. Took me a day to figure that out, lol
yup yup, the noise will
I think that check_lock was being optimized away during LTO.
Ok, so, as I've never done this before, do I click "Add your review" first?
if you have individual comments you can add them in the code and hit "start a review"
otherwise you can just do an overview by clicking "add your review"
Ok
There's a few nitpicky issues that the linter I'm running in Atom caught. Should I fix them or is that not a huge deal. It's one line too long, or expected 2 lines where there is one sort of things. Doesn't affect the function of the code, just the linter whinging about details.
I'm usually not super strict about linting
variable naming is worth changing though
which variables? (And what even counts as a variable in Python, I'm realising I don't know that to begin with.)
just naming in general π
ahh hehe
Ok so I don't know that I have any specific comments. So I click add my review, and just put in there that I tested it successfully on a CPX with white dotstars or something like that? I don't know what makes a good review.
Yup!
Am I just commenting, or approving?
approve please π
@slender iron wow - what do you think made the check_lock be optimized away? ! Or maybe common_hal_busio_i2c_has_lock was always returning false?
Did you add the asm("") in 1.0.0 and it fixed it there? Since 2.0 was already OK
yeah
oh weird. ok ... I am pushed down a level, trying to fix ctrl-C working in input(). Also fixed ctrl-C causing soft-reset when it should just be an exception. Then I have to get back to the original issue about the fake ctrl-D.
I'm not sure if LTO recognizes that mp_raise has any side effects
so its not a question of has_lcok but rather if it matters
@tannewt I just reverted to 1.0.0 and I am not able to reduce the problem. I can cause it to occur reliably under 2.0.0 - looks like it is post-1.0.0.
@solar whale you rock
@solar whale @slender iron I have been seeing some delayed writes on Linux as well, not quite same kind as on Windows, but nevertheless delayed.
it might be something internally
internally Linux or vfs in CPy?
in cpy I'm thinking
As noted before - it only occurs for me if I use g-edit, not with nano so it also depends o the editor and how it behaves.
maybe delayed responses to MSC USB queries or something
@solar whale some editors truncate or erase file before rewriting, some just rewrite. That seems to make a difference.
Rosie sees it when copying files over
There's more metadata to change on truncation/rewrite
The data blocks get written quickly. The metadata (directory info and which blocks used) get delayed.
k, off for lunch and then a quick errand
@tulip sleet FYI - just triggerd a soft reboot by using control-c in a program that has just runs in a while loop but no try/except -- another program with try/except exits fine with contol-c
this is with lastest master
@solar whale thanks, that's a bug I'm fixing that seems to have been introduced in 2.0.0. Interrupting while True: pass with ctrl-c will cause a soft reboot, for instance
Do you have a skeletal example of the try/except code that does NOT do a soft reboot?
I'll make one - just a minute.
try:
while True:
pass
except:
pass
finally:
pass
@tulip sleet that example works for me - just: while true: pass causes reboot
@solar whale Thanks, that's very helpul to check my fix in another situation.
I forgot - how do you post code here?
@solar whale I see why that's different: the finally: catches the KeyboardInterrupt exception that is the ctrl-c, so you don't see the KeyboardInterrupt. I see the same behavior in /usr/bin/python3, so it's expected. The other thing you found is definitely a bug. Found while trying to get input() to handle ctrl-c properly
To post code, start with three backticks and then a newline. End with three more.
example code
shift tilde
i mean unshift tilde.
very nice! same as in stackoverflow
or I think you can indent. let's try that
some indented code
nope
don't push your luck π
:lol:
off for a bit - good luck with the bugs!
tnx!
Oh sweet, I was wondering how people were posting code
Thanks for that pro tip @tulip sleet
@formal plover I was wondering the same thing! Thank you @tulip sleet
also you can drag a file or click the + sign to upload a file. Let's see.
not just pictures
bold something italic
that was double asterisks, single asterisks, underscores,
- a numbered list
- something
- something
- something
nope no list support
back now
wb
thanks @idle owl !
@tulip sleet how is your bug hunting going?
@idle owl can you review this for me as well? https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel/pull/10
@slender iron I just fixed ctrl-c not causing soft-reset. Also you can now ctrl-C when doing an input(). Previously the interrupt did not happen until you pressed enter (return). Was going to go back to Limor's bug and wrap those into it, but maybe I should break them out.
@slender iron Yes!
I asked about whether deinit() should darken all the neopixels/dotstars or not. Thought maybe you might not want to do that (preserve what's turned on). Did you see that?
and yeah, I'd like it to turn them off. I think we should try to return the board to default state after a script is run
that way you know what the state is when starting again
I was thinking about a big installation where you might want to set up a bunch of static neopixels. But that's probably the exception.
why not just sleep for a long time then?
it'd be fine after we make sleep actually sleep
@slender iron Are the built-in neopixels on the CPX enough or should I rig up an external strip/ring?
was thinking you might have many strips that you need to switch between, say more than the available memory.
I have both options
@idle owl on board should be enough
@tulip sleet ah, they can skip calling deinit then π
@slender iron I'm glad I asked.
should I wrap up the ctrl-C fixes in one pull request for now and work on the main.py input() bug separately?
Are you releasing r2 tonight?
tryin
Gotcha. Well if you do, I'll hit the ground running on testing on rc2. Unless there's something you would like me to test on the ESP8266 that can be done in time to work into rc2
nah, theres nothing on our radar for esp8266. testing after rc.2 would be awesome
Gotcha @slender iron. I also have the Feather M0 Express if you need any help with that down the road.
I flashed 1.0 on it and tested blinky on it then swapped it out with the ESP8266 and have been obsessing over that, haha.
π both are good to obsess over
True that.
I definitely use the M0 more
@slender iron Your example in neopixel.py works!
How can you not with that π₯ bootloader
@tulip sleet mind if I submit https://github.com/adafruit/Adafruit_CircuitPython_DotStar/pull/1 ?
yay!
go ahead
@slender iron I'd be happy to test rc2 after you release (or if you need anything tonight after ask an engineer). I'll flash my M0 Adalogger and a couple of Metro M0 Express boards I'm working with. The Adalogger will be interesting since it's the flight computer for a high power rocket. π
(tryin to do a bundle release to go along with rc.2)
@drowsy geyser have you tried any SD card stuff with 2.0 yet?
Also allow an immediate ctrl-c in input().
Removed special-case handling of KeyboardInterrupt in pyexec.c: that was causing a soft reset.
I'm off to make dinner. will check back as time permits
@slender iron Not yet. I'm actually going to be putting an SD card in tonight and test it.
I'm running "latest" as of about 0500 this morning.
test every sd card you can please π
Will do.
someone had a class 2 card fail
I ordered some off of amazon and got them and they were class 4
Ouch. All I have are Class 10 for the RPi arrays....
I'll order some lower quality ones from Amazon for testing.
Is capacity an issue or just the card write speeds?
don't worry about it then
I have the class 4s to test with π
trying a variety is still useful
Ok. Happy to help out where needed!
Code looks good but I'll wait for the tests to come back before approving.
@formal plover if you have time a simple task would be adding a link to https://circuitpython.readthedocs.io/projects/dotstar/en/latest/
@slender iron yup, I have time!
@slender iron I'll have to fork it and edit unless you want to add me as a contributor.
@slender iron rosie broke again
@tulip sleet yeah, I had to poke it
fork please @formal plover
contributor is only really needed for reviews I think
That's a 10-4, will do.
@slender iron Hunh - it appears those fixes might have fixed Limor's #232 bug as well. My previous test case that hung now works. If you have a chance could you try that as well?
6467e3d shared-bindings: Prevent check_lock from being ... - tannewt
e0ddd52 Add Processor to microcontroller documentation ... - dhalbert
@slender iron Done! Haha first time I've used my GitHub for anything other than copying code for projects.
yay!
highfives @formal plover
@formal plover did you create a pull request?
Haha well there ya go.
@tulip sleet I wouldn't be surprised that it fixes it. I can look later. I want to get all of the releases going
@slender iron Sure. I think it's because I handle pending exceptions during stdin input now.
yup yup, and then the ctrl-d is handled elsewhere
thanks @formal plover !
@slender iron You're welcome!
k, gonna wait for travis to catch up and then I'll tag rc.2
The doc just says not to delay for too long. Probably this should explain further that it basically shuts off everything while the delay is happening, and let the user decide whether that's OK or not. It depends on whether delaying some I/O is going to be a problem or not, such a NeoPixel timing or USB input.
@tulip sleet appear in time?
ok, RC2 is out to test
Addresses #215
This is still a WIP but it restructures the doc build for Circuitpython to minimize warnings and allow local builds to follow a more standard workflow.
Current rendering: http://test-circuitpython.readthedocs.io/en/streamline-docbuild/
- Local build is now down to 9 warnings.
- make linkcheck now only warns on 1 link
- split doc source into CircuitPython and MP
This is currently only the HTML doc version, will add epub and LateX back.
Please review the current...
Congrats @formal plover on the pull request. Hopefully, the start of many more π
@nocturne wren Thank you! I hope so! Very excited to be involved, even if it's just a little here and there.
A little here and there is a perfect way to start. Feel free to ping with questions on git or python too @formal plover
Thank you @slender iron and everyone. Just downloaded rc2 to begin testing.
Adafruit CircuitPython 2.0.0-rc.1 on 2017-09-01; Adafruit Feather M0 Adalogger with samd21g18
>>> import os
>>> import adafruit_sdcard
>>> import busio
>>> import digitalio
>>> import board
>>> import storage
>>> os.listdir()
['boot_out.txt', 'adafruit_sdcard.mpy', 'adafruit_bus_device', 'spi_device.mpy', 'i2c_device.mpy']
>>> spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
>>> cs = digitalio.DigitalInOut(board.SD_CS)
>>> sdcard = adafruit_sdcard.SDCard(spi, cs)
>>> vfs = ...
@slender iron RC2 has been successfully flashed to my ESP8266, let's do this!
Make sure you use sudo if you are trying to update Ampy slaps forehead.
@formal plover If you do pip install blahblah --user it puts it in ~/.local, so you don't have to put stuff in system directories. (I learned that yesterday.)
interesting @tulip sleet. haha thanks again
NOT replicated on Feather M0 Adalogger! The above code works without error (Class 10 Sandisk card).
@tulip sleet just downladed built/loaded rc2 and bundle - seems ok - control-c works! Well done! And congrats to @slender iron !
@solar whale Great! Thanks for checking. You check a lot more stuff on the ESP8266 than we have tests for right now.
I am checkin on Metero M0 Express now - I can try esp8266 next
@solar whale debugs ESP8266 vicariously through me
I'm like halllp, then @solar whale jumps in if @tulip sleet or @slender iron doesn't beat him to it
haha
you all rock!
Just lurking about....
lol always lurking
I'm working on the Feather M0 Adalogger - SD card support is working great!
hmm - esp8266 bui;d failed at final step:
Create build/firmware-combined.bin
python2: can't open file 'elf2image': [Errno 2] No such file or directory
Makefile:243: recipe for target 'build/firmware-combined.bin' failed
make: *** [build/firmware-combined.bin] Error 2
@solar whale in Makefile, line 244
$(Q)python2 $(shell which esptool.py) elf2image $^
elf2image is something that esptool.py does, so I think your esptool.py is missing (which is returning nothing)
Mine is in my PATH at /home/halbert/bin/esp-open-sdk/xtensa-lx106-elf/bin/esptool.py
hmm- yyou are coored - it went away - I just did sudo apt-get install esptool and got version 0.4.6 - should I get it somewhere else - not sure what happened to it?
Do you have an esp8266 toolchain that you downloaded and set up? This is on your RPi, right?
on Ubuntu - its been working but obviouslt something got confused.
@tulip sleet I'm the one using it on the Pi
@solar whale I set up the toolchain within the last couple of weeks with directions from here: https://github.com/pfalcon/esp-open-sdk
Maybe time to refresh if it was a while ago.
@formal plover I think Jerry did dev on RPi for a while. Requires patience...
Fingers crossed, no problems so far
@solar whale my esptool.py is version 1.2, so the Ubuntu repo one is way old.
just did pip install esptool - trying again - esptool v 2.1 - worked fine! loading
whew! after some struggle - loaded rc2 to esp8266 - WEBREPL works - tested control-c - works ok - ampy works - all is well. not sure what happend re:esptool,. butI'll wrok on that....
@formal plover I use both Ubuntu and RPi for dev/testing. Most on Ubuntu now.
@tulip sleet I think I see what happened to esptool - whwn I was plyaing with ampy, I iinatalled it from @slender iron fork, but in the process, I deleted .local (oops) taht is where esptool .py lived as well. I think I'm OK now.
@solar whale Makes sense. I have had to clean up .local several times while trying to get the ampy distributable built and tested. I had about three versions on my PATH at one point.
oops - I forgot abot live shows tonight - sorry If I was distracting from them...
Well I'm having a heck of a time
I can't get anything to work, I might try flashing the board again
@formal plover do an erase too
I'm getting a syntax error attempting to import from adafruit_circuitplayground.express but I have no idea how to figure out what I'm assuming it's been changed to
@idle owl I can help tomorrow. I gotta go make dinner now
Oki, @slender iron have a good evening
others can probably help though π
Or I can evidently help myself π Figured it out
The wipe fixed it @slender iron
@formal plover usually does π
where is it failing?
thy closing webrepl browser screen and reopening - if you have not.
@solar whale done that countless times
I'll do webrepl setup.... then do webrepl.start() and it will say webrepl isn't configured
are you using the defuelt access point of conecting to a local netwrok?
still port :8266
sure is
///
import webrepl
webrepl.start()
WebREPL daemon started on ws://192.168.1.211:8266
Started webrepl in normal mode
///
but you can't conect - don't do a control-d
Will circuitpython work on the Feather M0 Bluetooth LE?
Screen flashes and it returns to the ws://192.168.4.1:8266/
@idle owl sure - but without the SPI fpash chip it wont have a lot of room.
and no support tof the BLE part π¦
I'm so miffed...
Just tried it on my phone and it works
Why would it be cached even if I'm using a incognito tab
@solar whale ah thank you. Would I use the feather_m0_basic .bin file to load it? And is lack of BLE support just that it's not included in CP?
@idle owl yes - that should work.
@solar whale thank you!
# This file is executed on every boot (including wake-boot from deepsleep)
def do_connect():
import network
sta_if = network.WLAN(network.STA_IF)
if not sta_if.isconnected():
print('connecting to network...')
sta_if.active(True)
sta_if.connect('SSID', 'password')
while not sta_if.isconnected():
pass
print('network config:', sta_if.ifconfig())
import esp
esp.osdebug(None)
import gc
import webrepl
webrepl.start()
gc.collect()
do_connect()
@formal plover that is my boot.py
After flashing - I use ampy to load it - the run webrepl_setup - then it works fina after a reset or power cycle - not control-d
after control-d it repors webrepl not configured, but it works again after a reset or power cycle
I can't use Ampy
On older M0 boards like FRDM-KL25Z "Freedom" how do I expand the usable Flash for micro Python execution space?
I need
\
import esp
esp.osdebug(None)
\\
in boot.py..... but I can't use Ampy while connected to serial
@formal plover - it works for me π - not sure if it is needed anymore or not.
@hollow tartan Our M0 implementation is for Microchip/Atmel M0 chips; that's an NXP board.
I need to be disconnected from serial to use Ampy... but need to connect via serial to get
\
import esp
esp.osdebug(None)
\\
disconnect serial - use ampy - then reconnect serial and run webrepl_setup.
\
pi@raspberrypi:~ $ ampy --port /dev/ttyUSB0 ls
Traceback (most recent call last):
File "/usr/local/bin/ampy", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ampy/cli.py", line 142, in ls
for f in board_files.ls(directory):
File "/usr/local/lib/python2.7/dist-packages/ampy/files.py", line 100, in ls
raise ex
ampy.pyboard.PyboardError: ('exception', '', 'Traceback (most recent call last):\r\n File "<stdin>", line 2, in <module>\r\nImportError: no module named 'uos'\r\n')
pi@raspberrypi:~ $
\\
you are usig the old ampy
how, I updated it earlier
what doe sampy --version report
pi@raspberrypi:~ $ sudo pip3 install adafruit-ampy --upgrade
Requirement already up-to-date: adafruit-ampy in /usr/local/lib/python3.4/dist-packages
Cleaning up...
@tulip sleet you are correct, but in general terms what is can be added to a memory bound developement board? SD card or daughter board with external flash chip?
pi@raspberrypi:~ $ ampy --version report
ampy, version 1.0.1
pi@raspberrypi:~ $
try sudo pip install adafruit-ampy --- your errors are from python2
@kurt
@formal plover do which -a ampy to see if you have several copies stashed in different places
pi@raspberrypi:~ $ which -a ampy
/usr/local/bin/ampy
@tulip sleet is ampy only python3?
@haughty harness We use an SPI flash chip, but there's special code written to access it. We also will have SD card support. Again, special code. It's formatted as a tiny FAT filesystem.
@solar whale It's supposed to be universal. I built a universal installer.
@formal plover do ls ~/.local/bin - see if it ia also there
pi@raspberrypi:~ $ ls ~/.local/bin
ls: cannot access /home/pi/.local/bin: No such file or directory
@formal plover pip install adafruit-ampy --upgrade --user to install to ~/.local, or sudo without --user to instsall to system dirs
I think
ok - forgot it was sud o - tye the pip not pip 3 then you should be OK
pi@raspberrypi:~ $ sudo pip install adafruit-ampy --upgrade --user
Downloading/unpacking adafruit-ampy from https://pypi.python.org/packages/c6/24/d113da4e61051a958d3e33151a657549a69deaf77e4ce530b850b05b7738/adafruit_ampy-1.0.2-py2.py3-none-any.whl#md5=d651b87bbf015d234e6e8d3838348491
Downloading adafruit_ampy-1.0.2-py2.py3-none-any.whl
Downloading/unpacking pyserial from https://pypi.python.org/packages/0d/e4/2a744dd9e3be04a0c0907414e2a01a7c88bb3915cbe3c8cc06e209f59c30/pyserial-3.4-py2.py3-none-any.whl#md5=0e555d61700e0b95a15d8162092c5299 (from adafruit-ampy)
Downloading pyserial-3.4-py2.py3-none-any.whl (193kB): 193kB downloaded
Requirement already up-to-date: click in /usr/local/lib/python2.7/dist-packages (from adafruit-ampy)
Installing collected packages: adafruit-ampy, pyserial
Successfully installed adafruit-ampy pyserial
Cleaning up...
pi@raspberrypi:~ $ ampy --port /dev/ttyUSB0 ls
Traceback (most recent call last):
File "/usr/local/bin/ampy", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ampy/cli.py", line 142, in ls
for f in board_files.ls(directory):
File "/usr/local/lib/python2.7/dist-packages/ampy/files.py", line 100, in ls
raise ex
ampy.pyboard.PyboardError: ('exception', '', 'Traceback (most recent call last):\r\n File "<stdin>", line 2, in <module>\r\nImportError: no module named 'uos'\r\n')
@formal plover you did --user so now there's a version in ~/.local AND in /usr/local/bin. Do pip uninstall adafruit-ampy --user to get rid of the new version, and then repeat the above without --user. You may have to clean up the .local manually. I did sometimes.
pi@raspberrypi:~ $ pip uninstall adafruit-ampy --user
Usage:
pip uninstall [options] <package> ...
pip uninstall [options] -r <requirements file> ...
no such option: --user
ok, just try uninstal. Then look for .local as Jerry mentioned.
Now do sudo pip install adafruit-ampy --upgrade
ahhhhhhhh
Finally, do ampy --version to make sure you have 1.0.2
@tulip sleet and @solar whale !!!!!!
pi@raspberrypi:~ $ ampy --port /dev/ttyUSB0 ls
boot.py
webrepl_cfg.py
pi@raspberrypi:~ $
It's a miracle
woohoo! - that was easy...
lol yeah, something like that
It reminds of when I had to maintain my Windows 3.1 system, install new drivers, etc. Everything took two hours. Everything.
experience is learnig to recognize your mistakes when you make them again π
I used to be really into android rooting
Had to setup the phone every time I flashed a new ROM
Earlier I spent an hour trying to get dotstars to work... I remembered to plug the power into them about 15 minutes in. 45 minutes later I realised the other end of the power wasn't plugged into an outlet.
@formal plover It's gotten SO easy now.... OTA updates of nightlies for the ROM I'm using. It's crazy to me. I remember having to wipe everything every time.
@idle owl next time it'll ony take 30 minute π
@solar whale It's true!
Okay, so I need to send boot.py back to the board
Or do I just edit boot.py in Ampy?
edit it locallyon your RPI then do a put boot.py to upload it.
@formal plover BTW - the esp.debug(None) will do no harm - If I recall correctly iis is disabled on a realeseed build, but enabled on a manual build- In ay case it should be set to None for normal use.
@solar whale thanks for that pro tip
that may be a micropython holdover - not even sure if it matters in CP.
@formal plover any progress?
Meh. Modded boot.py with Ampy, but web repl still isn't working
keeps saying it's not setup
hmm - after running webrepl_setup try pressing reset button - then see if you can connect vai webrepl.
also open serial connection then reset and verify thai it gets the correct IP address.
No dice
if you open serail connection ad reset - doe it look OK - nay erro messages?
correct
WebREPL daemon started on ws://192.168.4.1:8266
WebREPL daemon started on ws://0.0.0.0:8266
Started webrepl in normal mode
connecting to network...
network config: ('10.0.1.22', '255.255.255.0', '10.0.1.1', '10.0.1.1')
Press any key to enter the REPL. Use CTRL-D to soft reset.
Adafruit CircuitPython 2.0.0-rc.2 on 2017-09-06; ESP module with ESP8266
>>>
that is what I see after some gibberish.
Well soft reset does nothing. Reset button does nothing
import machine
machine.reset()
is the only thing that works
or yanking the power
It prints out like it's cool
reset button does nothing??? that is odd.
this is aesp8266 feather?
HAmmered it and held it longer
it worked, but still same result as lοΏ½οΏ½|οΏ½οΏ½rrnbοΏ½οΏ½lοΏ½bοΏ½lbμοΏ½οΏ½οΏ½llbοΏ½lrlllοΏ½οΏ½|οΏ½οΏ½rrnbοΏ½οΏ½llοΏ½οΏ½bοΏ½bμοΏ½οΏ½bbοΏ½οΏ½lrlοΏ½lοΏ½οΏ½|οΏ½οΏ½rrnbοΏ½οΏ½lοΏ½οΏ½bοΏ½bμοΏ½οΏ½lbοΏ½lblοΏ½οΏ½οΏ½οΏ½nοΏ½rοΏ½οΏ½n|οΏ½llllοΏ½οΏ½rοΏ½lοΏ½lοΏ½lοΏ½οΏ½rοΏ½lοΏ½lοΏ½lοΏ½οΏ½rοΏ½lοΏ½οΏ½οΏ½llrlοΏ½οΏ½rlοΏ½οΏ½οΏ½bοΏ½οΏ½bοΏ½bbrοΏ½rbοΏ½οΏ½nοΏ½nnοΏ½lοΏ½οΏ½lοΏ½lοΏ½οΏ½llοΏ½οΏ½οΏ½οΏ½οΏ½οΏ½#4 ets_task(40100164, 3, 3fff8390, 4)
boot.py output:
WebREPL daemon started on ws://0.0.0.0:8266
Started webrepl in normal mode
connecting to network...
network config: ('192.168.1.211', '255.255.255.0', '192.168.1.1', '192.168.1.17')
same result as machine rest
reset*
brb. software update for my laptop
@formal plover can you post your boot.py
@formal plover sorry - I need to get to bed... - no idea what the problem is. I recommend - startig over - restore orginal boot.py - or just erase and reflash if you dont have it then go back to what has worked in the past. Wish I had better advice. I'm stumped.
@solar whale What a cluster that was... Well updated my Google password... then my chromebook updated. Fun fact.. You have to use the previous password to log back into the chromebook...
After allllll that. Once I got back in... Webrepl works... and I didn't touch the ESP8266. So something was cached in the browser doing something shifty with webrepl
@tawny creek Will do.
'code'
code
@formal plover great news! Lost a few hairs on that!
@solar whale Sure did.
I have to do the machine reboot for it to work right. Soft reboot still says webrepl isn't setup
Yes, for me as well.
okay, I'm not crazy
I think that is a "feature " not a bug!
Haha, must be
Good luck and good night! Enough fun for tonight!
Here's Damien giving a "state of the [MicroPython] union" talk at PyCon Australia last month: https://www.youtube.com/watch?v=WI-nTf5iM84
Damien George http://2017.pycon-au.org/schedule/presentation/68/ #pyconau This talk was given at PyCon Australia 2017 which was held from 3-8 August, 2017 in...
Well I created a /lib directory on my ESP8266 and threw the micropython ureqests module in there as it sits, no modifications. Works right out of the gate.
I'm having the same problem figuring out how handling the json data as I did using http_get, but there's more info on ureqests so I'll figure it out soon.
http_get is a function that the learn guide walks you through creating, not a module/library. Ureqests and the function both use GET, ureqests has some handy functions versus just the GET from the http_get function.
If you ujson.loads(response) I think you get a dict in Python you can access
@formal plover depending on the version of urequests, I believe you can just get the JSON payload as a Python data structure with, say: response.json()
Thank you @opal elk and @plucky flint. I'll try both methods and let you know. It won't be till tonight though.
Have fun! π
@plucky flint thanks!
Found two bugs so far. The CCS811 driver throws an exception with "operation requires lock." The bundled SSD1306 driver throws an exception trying to load the framebuf module (it can't find framebuf). The first is not a CircuitPython problem (probably). The second is more a bundled library problem. I opened issues in the respective library repositories....
@drowsy geyser Framebuf can be compiled into CP but I think it is only compiled in by default for the Express boards to asve spece. There is partial library that can be laoded, but it does not suppor text. so is of limited use. Text can be written using bitmapfonts - see : https://forums.adafruit.com/viewtopic.php?f=60&t=117162
In any case, using the OLED will use a lot of your avaialble memory!
Thanks, @solar whale ! We should probably at least update the dependencies list in the code/documents for the framebuf issue. And yes, memory will be a problem. I will probably use the OLED for testing only; I can really use about three NeoPixels and cover all the status information I need for the actual flight computer. In fact, I should just go design that status PCB today....
@drowsy geyser the LED's sound like a great way to go. It's been awhile since I played with the OLED on the M0 but it was prettyr frustrating since one I got it working, there was not room for the sensor librray as well so switched to an ht16k33 14segment display which worked better for me.
@solar whale That is incredibly useful information for my design! Thank you! I'm going to go design and build a status LED panel using a few NeoPixels. That will be completely sufficient, particularly since the actual flight data will be logged to the SD card. Oh! And it will give me the opportunity to learn to make boards on the OtherMill....
Heh, or I can just get a small strip of them from Adafruit. That would be faster.
the jewel is a cute little array with 7 LEDs. https://www.adafruit.com/product/2226
Hmmm, I'll have to give that some thought. I wanted to make them visible from outside the fuselage. I could probably do that with light pipes. Or maybe just a small window to peer through. I'll ponder the best way to do that. It would definitely be good to at least show the explosives arming status from outside the rocket. π
Big red lights are always good!
yeah, maybe I should have a LED panel. I just bought some cheap 16x2 displays yesterday but I don't really need that on my HAB payload. just a "altimeter okay, GPS okay, etc"
I have a CircuitPython neopixel_write question. What is the meaning of the bytearray argument? I was assuming it was RGB but I don't think so. Is it an address and a hex color value?
its lower level than that
its just bytes at that point and the format depends on the actual strip which the higher level driver manages
Ahhh ok. Thanks, @slender iron. I think I'll have to go to a Metro M0 Express. I don't have enough memory on the Feather M0 Adalogger for the NeoPixel library....
Yes
@drowsy geyser You are probably fine with just neopixel_write for your purposes.
it's literally just looking for a byte stream, so if you are only controlling a handful of pixels, it's pretty simple.
you send it pixel data, bytes for first pixel, bytes for second, bytes for 3rd, etc.
so MetroM0 Express have more memory for rocket use
So warning/good to go lights should be easy to build that stream up. In fact, it's a triple byte of RGB, so you could literally have Red be warning, Green be good (and thus Yellow (half red/green) appears if both, etc. Use Blue byte as needed.
or add more ram, it's just a flash chip, right?
oh maybe not on that one?
yeah, never mind, was thinking of the boards with external flash, not the M0
I'm actually not sure. I know I can load the NeoPixel library on my Metro M0 Express boards, but not the Feather M0 Adalogger....
according to website, all 3 have 256KB of FLASH + 32KB of RAM
Feather M0, Adalogger and Metro Express M0
right, they vary in file system size and the binary "core" size
2 MB SPI Flash is on Metro M0 Express
Hello all i have 2 Feather m0 Bluefruit le modules. they both had micropython installed. I was able to install ciruitpython on 1. the other wont go in to dfu when double clicking reset button. any ideas for me to try. thank you
weird... bad button?
If they have 2 of them, that would strange, unless they lucked out one time.
I'd say confirm one works (flash it again?)... then you've narrowed down to that one board for sure, not cables/etc.
I'd guess bad button, you could try bypassing button (use wire and short it twice?)
yes i can flash 1. but the other wont flash.
Does connecting it to Arduino actually erase the micropython? Or can you use MP and Arduino sketches in tandem
does pressing reset work normally on it?
yes
Odd. Because in the instructions for the feathers, it says at the bottom to use it with Arduino after instaling MP or CP, you connect it to the IDE and just use it.
So I was thinking maybe connecting it back to the Arduino stuff would erase it. This was all guessing based on glancing at the instructions last night.
So I have no idea if that would be helpful at all - it's just the only troubleshooting type thing I could think of
but single of reset works, but not double clicking...
yes
I'd contact adafruit support... also post in forum.
I'd say keep trying, but you did it with one so you know the rhythm. Because that's one I ran into, couldn't get the speed of the double-tap right.
Not really a CP problem, if it won't work with Arduino IDE either.
it still running micropython. i can still access through mac as a drive. can also change code in main.py and works.
yeah, it's a hardware problem, I think.
Ok thanks for the help all
@vast badger Do you get the same "pulsing" LED on both when you double-click? (We have had reports of similar issues recently on some other Feather boards.)
That's weird. OK, I suggest posting in https://forums.adafruit.com, and mention that you can't get pulsing on one.
Ok thanks
I'm installing a ceiling fan in the master bedroom... Then I'll continue rc2 testing. My old man is quoting me 1 hour.. Bet Ya'll anything I'll pop back into the channel around in about
4 or 5 hours saying it's done. π
lol
This adds 3 functions to the samd module for the user to control the behavior of the neopixel:
- enable_dim_neopixel()
- disable_dim_neopixel()
- set_dim_level()
enable_dim_neopixel and disable_dim_neopixel turn on and off dim neopixel mode. set_dim_level takes in an integer from 0-255 and sets the brightness level of dim neopixel mode. The default brightness level for dim neopixel mode is 40. set_dim_level(0) will turn off the neopixel.
Thanks for taking this on Carol! ESP8266 is also a supported port but we haven't put much polish on its APIs (and therefore the docs) yet. I can also get you a blinka without a background for the logo. Let me know when I should take a closer look.
Also, sorry for Rosie CI disliking you. I'll keep poking it.
This error can occur if the card isn't formatted. fabitencourt, does it work when connecting to a computer or in Arduino?
The answer to what is going on here is that MicroPython stores single-precision floats in 30 bits, not 32. The lowest two bits are used to flag the bits as a float value. When a 32-bit float is converted to 30 bits, it is truncated, not rounded. So 0.1 in 30-bits is a little bit less than the normal 32-bit 0.1. I tried extending the print precision to more decimal digits, but it still prints as "0.1", because that's the closest represe...
I've just installed 2.0.0 RC 2 on my Huzzah. Jumped all the way ahead from 0.9.0! After making GPIO2 blue LED flash, I try to use the pin again with a different script and get "ValueError: Pin GPIO2 in use". Any way to "release" the pin other than rebooting the Huzzah?
@timber mango it should have reset the pin on reload, if not, a had reset should work
OK. Prob not appropriate question for here anyway. I'm just digging into the new release and if find anything to contribute will post here or on the GitHub page. Thanks. Also, great job!
totally appropriate for here! Keep the questions coming. (I'm headed climbing now though it'll be a bit before I get back to you.)
Fixed by #241. That fixes handling of interrupts during stdin input, and this issue got fixed as a side-effect.
It does not fix main.py getting truncated, etc. That's the old delayed-write problem and is separate.
To verify: for the slide switch on the CPX, left is "True" and right is "False". So if, in my code, left mutes it, "True"="Off" correct?
β¦e adafruit cirtcuitpython area instead of the micropython area.
This was the only place i could find to update. I think this will do it.
@idle owl correct in terms of left/right = true/false
Ok. I know I coded it right, but I'm trying to explain it in plaintext and confused myself in the explanation.
but also, i just happened by. not sure what the context is for what you are trying to program.
@idle owl by left do you mean closer to the A button - for mine - that is True.
@idle owl still working on the ceiling fan lol
@formal plover try erasing and reflashimg it - always helps π
@slender iron @tulip sleet when building latest master on CPX I get the following warning - is it worth an issue?
build-circuitplayground_express/frozen_mpy.c:53:26: warning: size of 'mp_qstr_const_pool' differ from the size of original declaration [-Wlto-type-mismatch]
extern const qstr_pool_t mp_qstr_const_pool;
^
../py/qstr.c:98:19: note: 'mp_qstr_const_pool' was previously declared here
const qstr_pool_t mp_qstr_const_pool = {
^
../py/qstr.c:113:26: warning: size of 'mp_qstr_frozen_const_pool' differ from the size of original declaration [-Wlto-type-mismatch]
extern const qstr_pool_t MICROPY_QSTR_EXTRA_POOL;
^
build-circuitplayground_express/frozen_mpy.c:54:19: note: 'mp_qstr_frozen_const_pool' was previously declared here
const qstr_pool_t mp_qstr_frozen_const_pool = {
^
29856 bytes free in flash out of 253440 bytes ( 247.5 kb ).
4812 bytes free in ram for stack out of 32768 bytes ( 32.0 kb ).
Create build-circuitplayground_express/firmware.bin
Create build-circuitplayground_express/firmware.uf2
seems to work OK.
only see it on CPX - gemma_m0,trinket_m0,feather_m0_express,metro_m0_express do not show it.
I've been seeing it too
probably worth a "long term" issue
in other news: ```
1 + 1
2
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Adafruit CircuitPython v1.9.2-442-g538a6be3e-dirty on 2017-09-07; Metro M4 Express with samd51j20
print("hello world")
hello world
woohoo!
Compiling for CPX yields some warnings. Does not happen on other boards.
jerryneedell@Ubuntu-Macmini:~/circuitpython/atmel-samd$ make BOARD=circuitplayground_express clean
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
rm -rf build-circuitplayground_express
jerryneedell@Ubuntu-Macmini:~/circuitpython/atmel-samd$ make BOARD=circuitplayground_express
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to i...
Those warnings are due to compiling the NeoPixel module as a frozen module for CPX. Frozen modules are not added to any other board build at the current time. There's an apparent bug in gcc when using LTO (link time optimization) that generates spurious warnings for a struct with a flexible array. Bug reported here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81440
Normally we treat all warnings as errors, and we've tried to fix anything that causes a warning. In this case we can't. We al...
@tulip sleet Thanks for clarifying and closing.
@tidal kiln That's what I needed to know, so thank you π
@solar whale I do mean closer to A button yes. Thank you!
@formal plover Of course, lol
@formal plover Nice! lol
Thanks @idle owl!
I was laughing at your saga, not at your installation job.
@formal plover So what boards are you testing with? I know you've been talking about this for days, but I've never asked.
@idle owl Feather HUZZAH ESP8266 and the Feather M0 Express
@formal plover Oh nice!
@idle owl Yup, how about you?
@formal plover Circuit Playground Express. And whenever the Trinket M0 comes back into stock, a friend is getting one for me.
But right now it's just the CPX.
@formal plover The CPX is an amazing little board.
@opal elk
`>>> ujson.loads(r)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't convert 'Response' object to str implicitly
`
@idle owl It sure is, I have the OG Circuit Playground
@formal plover Oh nice!
@idle owl yup, bummer I can't use Circuit Python on it
Getting somewhere with my open weather API integration
@formal plover I think r.json() is what you need to load
@opal elk I have it all figured out now. Was too tired to post my findings last night. The data needs to be parsed. r.json was used though.
Awesome!
@opal elk awesome indeed! I'll post later. Still have a thing or two to figure out.
?membercount
1381
201
1380
1
They are formatted fat32. Just saw the properties on my Windows 10 computer.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 2.0.0-rc.1 on 2017-09-01; Adafruit Feather M0 Adalogger with samd21g18
import os
os.listdir()
['boot_out.txt', 'adafruit_sdcard.mpy', 'adafruit_bus_device', '.Trash-1000']
import adafruit_sdcard
import busio
import digitalio
import board
import storage
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
cs = digitalio.DigitalInOut(board.SD_CS)
sdcard = adafruit_sd...
So @slender iron and or @tulip sleet, ureqests module/library from micropython works with CircuitPython without any problems that I can find. What do we with that? Add it to the stock libraries or just indicate its compatible?
Adafruit CircuitPython 2.0.0-rc.1 on 2017-09-01; Adafruit Feather M0 Adalogger with samd21g18
import os
os.listdir()
['boot_out.txt', 'adafruit_sdcard.mpy', 'adafruit_bus_device', '.Trash-1000']
import adafruit_sdcard
import busio
import digitalio
import board
import storage
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)
...
Just saw the blue 16G on gparted and it had a 4 M not allowed. I've formatted on fat 32. I'll try with that too.
Hi @willingc Thanks as well! I will make a copy-editing pass at some point, after the structure as stabilized.
How do (and @tannewt , you too) you envision our doc tree meshing with MicroPython's? Or will we not. If you go to http://docs.micropython.org/en/latest/pyboard/index.html, which is the standard top of the tree, there's a bunch of pyboard-specific stuff which we'd obviously omit, and then there are these sections:
- MicroPython libraries
- The MicroPython language
- MicroPython...
You guys are reading my mind. I was just going to ask about this.
Individual comments:
http://test-circuitpython.readthedocs.io/en/streamline-docbuild/shared_bindings_index.html
Support Matrix should have links in the module names and the ports could link to some entry for each port as well.
http://test-circuitpython.readthedocs.io/en/streamline-docbuild/README_cp_doc.html
"Adafruitβs CircuitPython Documentation" is meta-documentation. I first clicked here and thought I might see, say, library. So I think the top-level title should be clearer about what...
@formal plover We might keep a list somewhere of compatible or near-compatible libraries. Or we could fork the library and label it. Needs some thought.
@tulip sleet Gotcha. Thanks!
@tulip sleet @formal plover I'd prefer to see a list over a fork. Maybe a github wiki-ish page?
ie: Works with CP 2.0: modulename v1.3
that way if I discover a module change OR a CP change broke something, we know what did work and when.
ideally I still want to use "upip urequests" and just have it work.
@timber mango I like the idea of a module/library matrix. I've been running into a number of things that don't work right (and opening issues), but having the table for others would be good.
No way. Neither of Lexar cards are working. The black 4G and the blue 16 G too. Both Lexar cards don't seems to work for now.
I like the idea of something like a wiki, though my experience is that they get stale unless heavily maintained. There's also this, which you may have seen already: https://github.com/micropython/micropython-lib
I notice there's a urequests (with an s) in there.
A github wiki page on circuitpython repo would be awesome. And likely easier than trying doc code
yes, it's urequests, not urequest, and that's the core and current module
I agree, they can go stale, which is why it's CP version, module version. That combo WORKS. Future combos might not.
if I know CP2.0 works with urequests 1.4, but urequests 1.5 is out, I might have to test it, and discover a problem... but at least I know 1.4 worked.
The reason for forking would be to make near-compatible libraries compatible. I expect that there will a number of those due to our renaming choice of dropping the u (e.g., uos). Then someone needs to maintain that.
if a module requires actual forking due to MP->CP changes, then yes, fork it into CP-lib (ala micropython lib)
or there could be a shim compatibility thing (import os as uos, etc.)
Does GitHub have a way to search content of files for things we know changed? That way we can create an "in work" list for people to go "port" to new versions....
You guys are renaming (and altering) things to match CPython standards ?
Yes, github does...
Git have that
Either way, a wiki approach as part of CircuitPython github repo is easy, and clean. Make a Shim page.
"Works with CP2.0, shimmed: modulename v1.x"
Then support requests are just "see this link"
And folks like Kurt can easily add modules as he tests them.
Works with CP 2.0.0rc2, etc.
I think time module is majorly different. @tulip sleet what else?
@slender iron ?
There are additions and deletions to several modules. @slender iron 's philosophy is to use the CPython module names and make the functionality and names be the same or a subset. The idea is to make it easy to port existing CPython code.
If we need new functionality we would make a new module, not add new stuff to an existing CPython module.
Yeah, makes sense. Positive is making CPython code easier to port, negative is Micropython code is harder
given that most micropython modules are tiny by design, and Cpython modules aren't, that can cause some space problems.
but it's a design choice, and I'm not negative on it, just saying there is good and bad in it.
I was happy to see urequest(s) 'just work'... if only cause it's a good tiny module wrapping code youd have write otherwise in most cases.
@tulip sleet Is there a doc page detailing which 'several' modules?
That sounds like an important "Diffferences between CircuitPython and Micropython" topic.
ie module os vs module uos
more way to make Circuitpython code smaller in device by design
@tulip sleet that's a start. Question: so utime is not aliased as time, because time module is Cpythonish. Is utime still present? Or only time?
hi hi all
I'd suggest a doc to keep track of what modules are compatible. Having a wiki is another thing to maintain and another place for docs. If we put it in docs then it can show on ReadTheDocs as well
@timber mango it is a deliberate decision of mine to choose CPython compatibility over MicroPython compatibility
CPython has a way larger audience, many more resources and is more beneficial for beginners to move to.
I'd love to see urequests become requests on CircuitPython but that would involve making it compatible with CPython's requests. Compatibilty in my mind is the the ability to take CircuitPython code and use it in CPython without adapting code that uses modules available in both.
@slender iron hear hear!
I've seen a lot of Micropython examples where it has a condition to import urequests as requests and to use urequests if requests fails to import.
So maybe requests is mostly compatible
A lot of the u modules are really subsets, but a few add new things (the only that comes to mind is utime)
uos also
@tulip sleet interesting
@slender iron also arduino makers are able to do Circuitpython with less learning
My best friend just ordered me a Metro Express card!
@idle owl Nice friend you got there!
@formal plover I had a bit of a morning. Happened to get the in-stock email, mentioned it to him as a side note, and he messaged me back with a screenshot of the order, saying he "accidentally ordered something." We've been friends for a long time.
@idle owl Haha nice. Well that's awesome. Out of all my friends and family I'm the only technical one. So my gifts are usually either nothing or clothes. My in-laws caught on awhile ago and get me Adafruit gift certificates for birthdays and or holidays.
Did you get it working with a different card? I ended up with a Kodak card instead of Lexar but I'll give it a try today.
@formal plover Yeah this was going to be on my xmas list. My parents like to buy actual stuff, even if they don't understand the stuff.
if it have use then they buy it? @idle owl
@sick creek No, as in they're not into gift certificates or checks. They like to have stuff for gifts for holidays and birthdays.
Looks like the test is failing because the code is too large for the Arduino Zero, Gemma M0 and Trinket M0. How about adding a single set_rgb_status_brightness to rgb_led_status.c and removing the enable/disable calls? 0 can disable and !=0 can enable implicitly.
would they buy soldering iron?
lol. If I asked for one, probably. That one isn't so far fetched though. My mum used to do stained glass, and my dad built their house and still has a full woodshop in the basement, so tools are already a comfort zone for him.
The funny part of this is that I had been waiting on the Trinket M0. I really don't know much about the Metro board. Have to redirect my potential project plans now!
As in I kind of know nothing about it except what chip it has and that it's designed for CP.
The 2.0.0-rc2 builds have only 56 bytes free on non-Express boards. You can get back some more space by lowering -finline-limit in the Makefile. -finline-limit=57 right now. Lower it only a few at a time (like 2-5), since it will cost a little performance somewhere.
@idle owl it'll be a good board to learn Cpython on because it has a ton of GPIO pins, good storage, and that π₯ π₯ π₯ UF2 Bootloader
@formal plover The CPX is pretty solid for that too, but no GPIO - it has alligator pads. So this will open new things up for sure!
I'm not sure who designed that Bootloader, but I can't get over how easy it makes things. @slender iron @tulip sleet ,where did that come from? Did either of you develop that?
Agreed! I talk about it for 3 minutes every time I use it. I'm certain people are bored with me by now.
"Did you see how easy that was?" "YES." lol
@tulip sleet wow.
I'll check it out tonight. I think I'll go the set_rgb_status_brightness route and not mess with the -finline-limit.
I agree with @tannewt about the API, though with only 56 bytes left, you may still need to make room by fiddling with -finline-limit.
After an SD card is mounted, os.listdir returns different results depending on if the path name is given or implicit through the current working directory.
print(os.listdir(os.getcwd()))
print(os.listdir())
Produces:
[b'sd', 'boot_out.txt', '.fseventsd', 'adafruit_sdcard.mpy', 'code.py', '._code.py', 'adafruit_bus_device']
['boot_out.txt', '.fseventsd', 'adafruit_sdcard.mpy', 'code.py', '._code.py', 'adafruit_bus_device']
I believe I'm seeing the same thing with a Samsung EVO Select card. It works with my Mac via card reader but produces an OSError 19 in CircuitPython. Looking at it now.
I've downloaded the new version, candidate 2. I'll try it as soon as I can. I've noticed the DS3231 library is already there. Perfect. I'll give a try.
@tulip sleet's explanation of the rounding issue is really interesting
Agreed, @opal elk . Excellent analysis.
Good questions @dhalbert. I will leave it to you, Scott, and the rest of the Adafruit team to determine the strategy re: Micropython docs.
My two cents:
- I think @tdicola is on the right track with the programming guide. It's self contained yet can be served with the existing docs.
- I would create separation between the CP docs and the MP docs. The current MP build process is far from standard for Sphinx and will be difficult to maintain over time. For docs, you really want the build ...
@formal plover I didn't realise I hadn't done that. I had the bundle starred but not the main repo. Oops.
"Adafruitβs CircuitPython Documentation" is meta-documentation. I first clicked here and thought I might see, say, library. So I think the top-level title should be clearer about what's inside.
Good point @dhalbert. I will change the title to reflect that its how to build the docs themselves.
@idle owl No worries!
@formal plover How's your project going?
@idle owl Not bad, have it about 75% done/figured out. Just need to figure out how to call out single pieces of the json data, like temp and then automate the process with a function.
@formal plover Nice!
@idle owl Thanks! you have any projects or are you just testing?
Hi,
Ive been experimenting with circuit python and one of yours feather m0 and as far as I can understand the networking stack is all made for wifi usage. Is it possible to write a interface to use it with an GSM module, like fona?
Then most of the already written code for the networking stack like mqtt and sockets can be used.
@formal plover I have one that's complete, and I'm doing a writeup of how I did it (tone piano with fruit using the CPX). I'm also trying to finish up a tabletop lightbox photo studio - there's no code left to do on that one, it's the physical bits left. It's running Dotstars on a RPi 0 W.
@formal plover Otherwise, for now, just testing. Still have no idea what to do with my Metro Express though.
@idle owl Nice! Haha I have like 7 Adafruit boards that are projectless. So I know the feeling.
@formal plover I have some Pis sitting around, and a few Adafruit sensors but no other full boards without a project. I really only started in on this, in it's entirety, a few months ago.
@formal plover Actually I hadn't considered that until just now. That seems crazy to me.
@formal plover As in I got my first Pi less than 5 months ago I think. And my first ever Adafruit order was more recent than that.
@idle owl how exciting that you are hitting the ground running though!!!
@formal plover A huge part of that can be attributed to how amazing this community is. I didn't even touch the CPX for a few weeks and once I did, I basically dropped everything else. lol
@idle owl yeah the community is awesome. So helpful and encouraging.
@formal plover I had started working on the Python tutorial - their official one, and stalled at some point because, while it was nice to be learning it, it was really dry and boring. That's when I coincidentally picked up the CPX to check it out. It's so rewarding! I enter some python code, and it does a thing! Sure printing a list of numbers is a result... but not as great as blinking lights or buttons that do things.
@formal plover Then I ended up here and found out how great everyone was so I had no trouble sticking with it.
@idle owl That's great! Glad to hear it's been such a great/welcoming experience for you. That's the overall goal, to make it easy for anyone to get started and inspire individuals to keep at it and use their knowledge to give back to those who are just starting out.
@formal plover It shows. π
Is a section of code including a sine_wave array and a for i in range considered a function?
Section of CP I mean
a function is a pretty specific thing. "sections of code" can mean many things.
Ok
are you looking at a specific example somewhere?
I figured my question was vague. Yeah, a specific part of my code. I am doing a learn guide and am trying to discuss it in regular terms.
sine_wave = array.array("H", [1] * length)
for i in range(length):
sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15) + 2 ** 15)```
That.
as shown, that's just some lines of code
@idle owl array.array() is the function
Thank you @tidal kiln You're quite good at fielding my vague questions π
@formal plover ah
That's why I'm asking. So I don't call it something it isn't
def foo():
length = 8000 // 440
sine_wave = array.array("H", [1] * length)
for i in range(length):
sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15) + 2 ** 15)
I'm not vague intentionally, I don't know how to ask my questions.
now those lines of code are in a function
but also what @formal plover said
Well yeah what @tidal kiln said as well lol
lol
what @formal plover showed was calling a function
@tidal kiln exactly :)
range() and math.sin() are also function calls
I copied that section of code directly from an example, I didn't figure that one out on my own. And I never really looked into the details of how it worked.
@idle owl some libraries/modules have functions baked into them that you can call.
anybody want to review some SD card code? its not too complex
@idle owl if you look up some of the libraries you import, a lot of them have their own GitHub page with all the stuff you can do with it and all the function calls.
@slender iron I don't have a board that has an SD card slot, otherwise I would.
@formal plover I did a lot of that when I was first doing the code. I specifically avoided math, lol.
@slender iron Same here.
@idle owl Haha yeah, I tend to avoid anything that involves math as well.
can you just sanity check it then?
maybe @drowsy geyser can test
I use the same cards too! I use them in Pis though.
@slender iron I'm at work without my boards, but I'll test in a couple hours when I get home....
kk
@fabitencourt can you please try this mpy (after unzipping)? Its for CircuitPython 2.x. What I found was that the Samsung cards I have don't like the chip select deinit and extra clocks between the read command response and the actual data.
The fix is in this pull request.
I use LEVEL 10 cards
Hi @diogoviannaaraujo I have no idea. We've inherited the networking code from Micropython and haven't looked into it ourselves.
Sorry Scott, I can't do it right now. I'll be doing it by tomorrow morning, I'm at work now and I don't have my M0 Adalogger with me.
No rush! Thanks for the quick reply.
How do you guys implement socket on the ESP8266?
Hi @diogoviannaaraujo, I recommend taking a look at the Micropython code. There are some networking examples with sockets in their repo. Hope this helps you.
@diogoviannaaraujo I've used socket exactly how it is in the networking guide for micropython and it works. I'm also researching using urequests. If you have any questions, I may be able to help.
It's actually the from the CircuitPython read the docs, Ignore my GitHub comment above haha. In my defense it's the ported micropython guide in the CircuitPython guide.
Figured out my urequests CPython project!!!
@formal plover Yay!
@idle owl Still having a little bit of trouble though... π¦
@formal plover Figuring it out but still having a bit of trouble sounds like every project I do.
@idle owl Haha yeah, all part of the learning process
some results to look at:
>>> print(parsed['list'][1]['main']) {'pressure': 1000, 'humidity': 87, 'temp_min': 55.4, 'temp_max': 57.2, 'temp': 56.25}
This is where I get stuck, I don't know how to pull one of these out, just all. IE; I can't get just temp, I can only get all of these
That was odd.... I thought there were messages posted that didn't. And I responded to you and it didn't post.
You got warned by the bot lol
Oh. Really?
I saw it pop up. We get false positives sometimes
If you knew what it blocked you can tell @slender iron he'll fix it
lol yay!
@formal plover what do you mean by getting just one? like you want the pressure value?
@tidal kiln Yes any singular value; pressure or temp any one of those
So I can say, what's the main temp or main pressure
not sure how you're building up to what you've got, but what you have is a dictionary
{key:val}
and you can access by using the key
maybe try
d = parsed['list'][1]['main']
d['pressure']
etc
In the end I want to create a function that grabs the weather and then I can use some of that data for triggers,
example: if main temp > 60, then do THIS
Thanks @tidal kiln That will prob work!
I'll try it
print(parsed['list'][1]['main']['pressure'])
would probably also work
that's the general idea though
BINGO!!!!
`>>> print(parsed['list'][1]['main']['pressure'])
1000
print(parsed['list'][1]['main']['temp'])
56.25`
You are the best @tidal kiln!
no prob
this smells kind of jsony. there are json dedicated packages, but i'm not sure what circuitpython has supported.
ha! so you know more than me on that one. guess ujson is the 'micro' version.
I just googled my way through this project
typically it's just a matter of getting it into a python dict, then you're good to go
Yup!
Used this to get the json data https://techtutorialsx.com/2017/06/18/esp32-esp8266-micropython-http-post-requests/
Then this to parse it:
https://techtutorialsx.com/2017/05/23/esp32-micropython-parsing-json/
That lead me to the end where you came through
@tidal kiln FTW
lol
cool. carry on then.
@tidal kiln Yup, thanks again!
okay @tulip sleet and @slender iron Need anything tested on the Feather M0 express or Feather HUZZAH ESP8266 for RC2?
@KurticusMaximus @willingc I was asking how do they implement the networking abstraction on the ESP8266 because it is too a "AT" based network stack. So I could try to implement a similar one to SIM808.
Ive done some more research and discovered that micro python implements the Network module witch implements most of the connection, configuring and socket abstraction in a NIC. But at the moment I couldn't find any Python based examples on creating a NIC Class.
Oh and I looks like they...
@formal plover Way to go!
Thanks! It's really easy to grab the whole current conditions then cherry pick certain things out, like is it cloudy or is it hot etcetera
That's really neat
@idle owl Thanks!
I could probably even find a way to have it text me saying hey, it's nice out, or hey it's snowing now.
Since I live in Michigan, I will be getting the snow notification all the time in a couple months.
Some Python quickstarts to add SMS and MMS messages to your application. Send, receive, and track text communications with Twilio's API and helper library.
I could prob make this work in CPython
Just the sending part
Depending on the size of the library
have you used PyTorch? https://research.fb.com/facebook-and-microsoft-introduce-new-open-ecosystem-for-interchangeable-ai-frameworks/
Facebook and Microsoft are today introducing Open Neural Network Exchange (ONNX) format, a standard for representing deep learning models that enables models to be transferred between frameworks. ONNX is the first step toward an open ecosystem where AI developers can easily move between state-of-the-art tools and choose the combination that is best for them. Whenβ¦
Is there a BME280 driver for circuitpython?
@tannewt FYI - I am able to access a SanDisk 8GByte Class 10 card from my M0-Express via an Adalogger Featherwing. Using latest 2.0.0 and library bundle
Oops. I'll fix this soon. Defined some variables in the wrong place relative to #ifdefs.
Has anyone tested out MQTT data Adafruit IO on the ESP8266 using circuit python?
Not me yet, @formal plover I think you get the honor.
@timber mango Haha okay, I'll give it a try some time this weekend.
@pulsar bloom not that I know of. it'd likelt be in the bundle if there was
@slender iron I think building libraries/drivers for sensors and other components is going to be a huge undertaking, unless there are a lot already available in micropython that can be ported.
@Kurt H Especially with the memory available. I am having trouble loading more than one sensor library...
@formal plover definitely! That's why I want to get more people helping.
@drowsy geyser the m4 should reduce that issue
@slender iron Yup! Waiting anxiously. π
@slender iron I hear ya! I've been trying to get people involved. Converting people using Arduino on circuit python compatible boards and whatnot, haha.
@formal plover awesome! Try beginners too. Arduino users already know something pretty good
@slender iron good call/point!
raises hand Beginners. That's me.
@formal plover We looked it up. Turns out my first Adafruit order was 30 June. A week before that is when I got started into all off this.
Ok, I think I need some clarification on terminology. What is a driver in python? How does it relate to a library?
@formal plover @drowsy geyser If there's an SD card slot on the board you're using, can you use it to load CircuitPython libararies or does it only use onboard flash memory?
@idle owl there's flash storage on the board, very small amount (4MB). Most libraries are packaged with Circuit Python. Others will have to be created or ported from micropython.
@formal plover Right, but say you had the Feather Adalogger with an SD card on it. Could you use the SD card as CircuitPython space or does CP only work with on-board flash storage?
I'm thinking no. Because of how it's loaded onto the boards?
Resetting it and getting the .uf2 or .bin file installers...
@idle owl as far as the drivers, they are for the PC so it can communicate with a board.
Oh
So that is a huge undertaking. Like you said.
@formal plover I was thinking they were .py files that get used in CP code.
The libraries and core code will be the biggest undertaking
@@idle owl I would explain it, but I'd probably murder the explanation. Libraries simplify things to make it easier to code. Instead of typing a bunch of code, you can call a function from the library. Take NeoPixels for example:
`>>> np[0] = (255, 0, 0) # set to red, full brightness
np[1] = (0, 128, 0) # set to green, half brightness
np[2] = (0, 0, 64) # set to blue, quarter brightness`
np.write()
The interpreter would have no idea what np or np.write() were without importing the NeoPixel library.
So instead of having to define those yourself, the library has stored code that does it for you.
@idle owl but yes they are .py files, they don't have their own special file extension like .lib, and any python file will typical end in .py
Like in the NeoPixel lib, there's most likely a line of code defining the variable NP for you; NP = NeoPixel
is there a circuitpython library for the TFT Featherwing?
@timber mango apparently there is uMQTT for micropython, however there is waning it uses micropython specific shortcuts and not to use it with CPython, So I'll try using the norma/full MQTT lib
@tawny creek The ILI library works, there's not currently anything for the STMPE610. It's on my list
er ILI is the GFX thing
the screen itself vs. the touch
yeah
had issues using both a TCS34725 sensor and a generic SSD1351 with the ESP8266 so maybe ill have better luck using the TFT featherwing + huzzah
I haven't tried my Huzzah + tft wing with CP..... but drawing works from my M0
You'll have to reroute a pin, IIRC
for the m0 or ESP?
for the ESP
The MicroPython MQTT library doesn't port over 100% error free (didn't expect it to) @slender iron . I'll try to figure out what's preventing it from working , Right now I get :
Traceback (most recent call last): File "<stdin>", line 11, in <module> File "/lib/mqtt.py", line 86, in connect MQTTException: 5
@formal plover Thank you! That makes a lot of sense.
@idle owl You're welcome!
@formal plover I meant to tell you, I live in the same state. Never can tell when it'll decide to start snowing, or whether you'll just get sleet notifications for a few months first.
@idle owl Haha that's too funny, I look up people's discord user names on Twitter to see if they use the same handle. I found your tweets yelling at home depot or something like that lolol.
side note, it feels weird to not hit the ; button like a period whilst circuitpythoning xD
Haha I'm sure it does @tawny creek
@formal plover That was such an awful experience. And yes I have the same handle pretty much everywhere. It's my name π
@idle owl π
@idle owl @formal plover sleet notifications sound awful π«
@tawny creek The worst
I'm nailing it with false positives over here.
@tawny creek Yes they're awful. And happen often.
Well once we get to that time of year anyway.
@formal plover probably still easier to check/port uMQTT
I think a "beginners how to help" Circuit Python doc might be a good building block.... I'm picturing a half guide to CP, half porting document for libraries/modules. Assume a newbie on all of it, but showing new users what to do when something is missing... ie what Kurt did with urequests, or the various asks for specific drivers (ie how to find a working module/driver elsewhere in MP or Cpython and help add to the "works in CP" knowledgebase.
Ultimately, adafruit boards, libraries, and drivers for things adafruit sells will get the most attention/support from CP... but really any person with an itch to scratch can help by making sure whatever itch they have, they can do in CP sooner than later.
@timber mango That's a brilliant idea. I think @slender iron started that with his learning system guides, but (sorry to say) I haven't really read them end to end yet. Your list should include "how to build the CircuitPython build toolchain on <platform>" - I've been thinking about doing that on Windows 10 but am pretty intimidated by it (I'm a UNIX guy but I need to learn Windows and the Windows software environment). I should start a OneNote and just dive in, then transcribe the OneNote into a learning system article. I think I'd be pretty comfortable hunting bugs in C++ code (CircuitPython is written in C++, yes?) but it's the environment and build process that has me intimidated. And we should include a link to the Amazon Web Services (AWS) S3 storage with the build-on-commit CircuitPython images; I have it bookmarked but, IIRC, it took a few hops to find it. I think we should ask Scott for his opinion on where the guides/documentation should be, and the structure of the information therein. It would be extra confusing for beginners if we have too many locations for "ground truth" about the project.
Oh, and a "how to use the GitHub repos" for beginners article, too.
@timber mango starting in order from your first comment regarding umqtt. I'll check that out. It says it uses micropython specific shortcuts, so I'll just find them and replace them with the CPython equivalent. The normal MQTT library takes up a ton of space anyways.
@formal plover as @tulip sleet mentioned above, it might all be fixable with a "shim", such as 'import os as uos' which is much better than lots of search replacement. I worry about missing functionality more, and maybe the question is what micropython functionality is missing from CP, and maybe having a module that adds back that is best approach...
I agree, there is a good space reason for micro libraries...
@timber mango right right. And I agree with you on the beginners how to help guide. @slender iron added beginner friendly tag to the GitHub, so that's a start.
@timber mango I think the guide is especially handy for the boards that can run CPython, but don't come with it already loaded.
Yes, given the large number of esp8266 variations, I think that's the prime target.
I have nodemcu boards, and wiolinks, both of which runs it great. And those are really common boards, and with Wi-Fi support, the question of all of those network libraries becomes way more important, and so more libraries to verify work, port if not, etc...
@timber mango Will the networking libraries fit on the current boards?
Some do... that's the nice thing about the micro ports... it allows more to fit, at a potentially reduced to basics functionality.
Hmmm. I'll have to go look at those libraries....
Ideally, upip means that you can easily add libraries from stock locations with one command. So having a u-library that doesn't work for CP will mean either making another library or coming up with a shim to fix.
I'd really hate to see a whole mess of parallel libraries happen, that's a bad thing in the long run, and slows down potential bugfixes/support compared to just making the original work.
I totally understand the direction toward Cpython that adafruit is taking with CP... the vast majority of code out there is Cpython, and as boards get bigger, that's the right direction. But short term, micropython libraries are space conscious, and nothing is more frustrating than discover you can't build project X due to size constraints.
Now compare that list to this one
https://pypi.python.org/pypi?%3Aaction=search&term=micropython&submit=search
Really the first needs to include all of the second.
As I browse thru that list, I constantly discover new cool things to play. For instance, cloudmanager. It's meant to mass control/manage multiple esp8266 boards, offloading things like package management into some central server more powerful and allowing boards to remain lighter and responsive.
@timber mango I'm excited for CircuitPython to grow. Right now it's in its infancy and you might not be able to use every library, sensor, or add on board out there. However the main CircuitPython supported boards will be great for newbies, they can plug in the board, drag a .py file to it and be on their way.
What's great about the Adafruit express line boards is: oh you want to use Arduino? Cool. You want to use make code? Cool. You want to use CircuitPython? Cool. That's awesome
Might cause some fragmentation issues, but that's where the community comes into play and helps build things up.
Agree entirely.
There's a IFFFT "Webhooks Channel" (Formerly the maker channel). All you have to do is a GET or POST requests to get it to trigger... I can get the response from IFTTT saying it's been triggered (using urequests in CPython), but it doesn't trigger. Do the same thing with using CURL in normal Python and it works instantly.
I'm not particularly wedded to the MicroPython docs. Most of them seem very board specific or advanced. So, for docs I say we remove most of them. However, we can use intersphinx to link out to pages that we do want to point people to.
@willingc could you elaborate on the standard sphinx build process? I'm wondering if I've set it up correctly in our cookiecutter repo for libraries.
Ok! Thanks for the report @fabitencourt. I will buy some more cards off of Amazon. I expected the newer library to work better. Perhaps they are even pickier about the chip select line. The arduino library is also much faster in talking with the chips.
@timber mango maybe, it's weird. Like it tells me I triggered it in the response. The GET in ureqests is supposed to act similar to a CURL request.
Check things like id#, token, etc... make sure all are correct.
There is an ifttt discord server, they might have specific advice.
@timber mango thanks!
It's really bizarre since it tells me in the http_get response is:
` >>> http_get('https://maker.ifttt.com/trigger/{test}/with/key/Secret key")
HTTP/1.1 200 OK
Server: nginx/1.9.10
Date: Sun, 10 Sep 2017 19:16:11 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 50
Connection: close
X-Powered-By: Sad Unicorns
X-Top-SecreTTT: Secret Key==
ETag: W/"32-ea78498b"
Congratulations! You've fired the %7Btest%7D event`
Yeah, I suspect it's an ifttt bug or misconfig
It's got to be the difference between a curl X POST vs urequests.get
because when I do it in normal python it works.
@timber mango Figured it out!
soooooooo. {test} is the event name... In curl X POST... IT's like cool I'll pass that on... In http_get or urequests, it's like I have no idea what { } is doing in the URL, screw that noise, I'll turn those into %%.
Got rid of the {} and just put my event name in there without "" and it fired right away.
Dunno why that is, but I don't care now since I've figure it out.
Sooooo! if anyone want's to use IFTTT with the HUZZAH ESP8266, sign up for the webhooks connection.
Still, should have given a error on iffttt
You should report the bug, as false saying it was fired.
And congrats, ifttt is awesome.
Right it would say Congratulations! You've fired the %7Btest%7D event> So I knew something was jacked up because of the %7Btest%7D event
It's just supposed to be test it's in there as {test} because that's what the instructions say, which it does work if you use curl X POST.
Where did the brackets come from?
Oh, yeah, I think they didn't meant to type those.
Well it works with the brackets if you use curl X POST
Curl must ignore those chars...
Must be
That's fly though, the fact that it works using a library I was already using.
The idea is that I can have it trigger a IFTTT event from the OpenWeather API response or any other API response since I'm semi-pro dealing with that stuff now lololol
In my opinion the new library adafruit_sdcard.mpy from bundle candidate 2
is the best I've used. But still doesn't work with my Lexar cards. But they
work very well with my sandisk 16G card. That's the one I'll use. Now I
will try the DS3231 library. That's essential to my logger project. It's
all like Christmas gifts all around....π¦πΎππ
2017-09-10 12:54 GMT-04:00 Scott Shawcroft notifications@github.com:
Ok! Thanks for the report @fabitencourt https://github.com/fabitencourt.
I wil...
@formal plover nice. Have you signed up for the IFTTT maker (not the webhook) that lets you call multiple things?
@timber mango maker channel has been replaced by the webhooks channel
No no, they added a new Maker class of user.
@tannewt Sounds good to me.
Here's a link to a repo that has a reasonable doc structure which we can use for a cookiecutter https://github.com/willingc/doc-basics :smile: