Saturday, 2019-11-30

*** tpb has joined #tomu00:00
*** nrossi has joined #tomu00:13
xobsCarlFK: it loads then? Hooray!00:17
CarlFKxobs: yep - I can poke around now - hooray indeed!00:23
xobsUSB hid ought to work, but I'm not sure how.00:24
xobsAt any rate, I'll make a twitter post about it.00:24
xobsHmm... though I do still see a lot of USB disk corruption.  I'll track that down.01:14
*** CarlFK has quit IRC01:36
*** CarlFK has joined #tomu01:57
xobsCarlFK: I fixed the SPI stuff, so https://learn.adafruit.com/circuitpython-essentials/circuitpython-hid-keyboard-and-mouse should now work.02:13
tpbTitle: CircuitPython HID Keyboard and Mouse | CircuitPython Essentials | Adafruit Learning System (at learn.adafruit.com)02:13
xobsAnd to answer your question from /weeks/ ago: It's now very easy to make a USB HID device :)02:13
CarlFKwoo!02:50
CarlFKxobs: you catch that I can't load code.py?02:51
xobsCarlFK: Try https://github.com/xobs/circuitpython/releases/tag/v0.1.1-fomu ?02:51
tpbTitle: Release v0.1.1-fomu: Beta Release 2 · xobs/circuitpython · GitHub (at github.com)02:51
CarlFKxobs: not seeing tty or storage with either 0.1.1 or 1.0.102:59
CarlFKsec.. let me reboot driver crashes, maybe my kernel is mad at me02:59
*** CarlFK has quit IRC02:59
*** CarlFK has joined #tomu03:03
CarlFKxobs: dfu-util -D circuitpython-v0.1.1-fomu.dfu ...  dfu-util -l dosn't see it and dmesg not happy: http://paste.ubuntu.com/p/MQc7x9CkQw/03:06
tpbTitle: Ubuntu Pastebin (at paste.ubuntu.com)03:06
xobsCarlFK: update to foboot 2.0.303:07
CarlFKxobs: making progress: Adafruit CircuitPython v0.1.1-fomu on 2019-11-30; Fomu with VexRiscv03:09
CarlFKwhen ubuntu mounted it, dmesg shows [  397.746578] FAT-fs (sdc1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.03:10
CarlFKthere is a 4 byte code.py:03:10
CarlFK hexdump -c code.py  ... 0000000   A   d   a   f03:11
xobsThat's probably the previous version of the file.  The SPI storage used to be really broken.03:12
xobsThe last 512 bytes of each 4096-byte page would get ignored.  It's better now!03:12
CarlFKwoot: code.py loads and runs!03:12
xobsYay!  You should be able to get the `adafruit_hid` library from https://circuitpython.org/libraries, drop it in the `lib` directory, and do hid examples.03:13
CarlFKum... which version ?03:15
xobsI just picked the latest.03:16
CarlFKcp -a /home/carl/src/tv/fomu/adafruit/adafruit-circuitpython-bundle-5.x-mpy-20191128/lib/* .03:18
CarlFKcp: error writing './adafruit_rgb_display/hx8357.mpy': No space left on device03:18
CarlFKah, I should get jsut adafruit_hid03:18
xobsYeah, there's a lot of libraries there and only 1MB free.  You should just get `adafruit_hid`03:18
CarlFKkbd.send(Keycode.SHIFT, Keycode.A)  I see A!03:23
xobsA!03:24
CarlFKhow do I detect a touchpad?03:30
xobsCarlFK: Asking the hard questions.03:31
CarlFKlol03:31
xobsI don't know.  That hasn't been written yet, but the digitalio library should work.  You could try doing something there with floating inputs.03:31
CarlFKhttps://workshop.fomu.im/#hello-world---blink-an-led-1  fix-me :p03:32
tpbTitle: fomu-workshop | Support files for participating in a Fomu workshop (at workshop.fomu.im)03:32
xobsHuh, I hadn't seen that.03:33
xobsAlso, the `micropython` thing should probably be fixed.  And the `riscv-usb-cdcacm` note up above doesn't work with v2.0+03:34
CarlFKthis makes it mad: https://dpaste.de/i7XX03:39
tpbTitle: dpaste/i7XX (Python) (at dpaste.de)03:39
CarlFKheh.. don't run that and then switch apps to like irc03:42
xobsHow does it make it mad?03:42
CarlFKlots of sending ^c in 3 2 1 and the kepress goes to whatever has focus03:42
CarlFKbut let me try to do it as expected - to stop itself .. again03:43
xobsYes, that's what the code says to do.03:43
CarlFKwhen I did it 'right' I got one sending ^c in 3 2 1, and then a bunch of >>>'s03:43
xobsI'm not sure if it ever sends the keyup command.03:44
CarlFKah03:44
CarlFKyeah, it looks the same as if I hold ^c down and it starts reapeating03:46
CarlFKneat. now I can go eat dinner.03:46
CarlFKwell done!!!03:46
CarlFKxobs: kbd.send(Keycode.CONTROL, Keycode.C) should only send one.  to hold down and release: kbd.press(Keycode.CONTROL, Keycode.X) ; kbd.release_all()05:09
CarlFKmaybe the while spins faster than the keyboard driver can deliver the first ^c?05:10
CarlFKkeyboard driver, term program, serial over usb, which is flooded with HID ^Cs coming at it.  maybe the flood in one direction blocks the serial stuff05:14
xobsCarlFK: This sorta works.  The input is just floating, though, and it isn't a real captouch input. https://gist.github.com/xobs/3ec70ce15cf1d071719d78f7d0adba6f08:11
tpbTitle: Fomu keyboard test · GitHub (at gist.github.com)08:11
CarlFKxobs: neat - thanks08:44
xobsCarlFK: I do see a potential problem where, if you have a `code.py` on the disk, it doesn't boot anymore.  Fortunately it's easy to reproduce.08:54
*** matt_c has quit IRC10:18
*** samueldr has quit IRC10:18
*** matt_c has joined #tomu10:24
*** samueldr has joined #tomu10:24
xobsI've built the world's worst profiler.  In gdb, I'm printing a backtrace and continuing.  In bash, I'm sending gdb a SIGINT every 5 seconds.  But at least I know which functions to stick in RAM.10:34
*** rohitksingh has quit IRC11:31
*** xkapastel has joined #tomu13:15
*** andi- has quit IRC14:51
*** andi- has joined #tomu14:55
*** xkapastel has quit IRC18:16
TomKeddiexobs: Sounds ingenious. I've used a scope to profile once or twice, setting a pin is a fast op and you get to use familiar tools.18:18
*** pollo has quit IRC20:00
*** pollo has joined #tomu20:09
*** nrossi has quit IRC20:25
*** pollo has quit IRC20:26
*** pollo has joined #tomu20:27

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!