]>
hydra-www.ietfng.org Git - acmetensortoys-esp-lua_lamp/log
Nathaniel Wesley Filardo [Thu, 4 Jun 2020 10:31:55 +0000 (11:31 +0100)]
ws2812 vs gpio, take 2
Just use tmr.delay(). It's gross, but it's 350 microseconds. We should
be OK.
init-early: here, too
blackouts: rather than have lamp-touch know what to do, push the logic
over to init2 and use the same "later" mechanism to disconnect the UART
from the LED array.
Nathaniel Wesley Filardo [Sun, 31 May 2020 23:18:47 +0000 (00:18 +0100)]
ws2812 vs gpio: down the AND gate "later"
Right now, the ws2812 driver doesn't wait for the bit stream to return
control to Lua, so rather than immediately kick the AND gate off, set up
a timer to do it "soon". This is not really the right fix, since it
leaves the AND gate high for a long while, but it works well enough I
suppose.
Nathaniel Wesley Filardo [Sun, 31 May 2020 21:53:39 +0000 (22:53 +0100)]
lampulator-love: experimental non-linear response curve
Nathaniel Wesley Filardo [Sun, 31 May 2020 21:51:31 +0000 (22:51 +0100)]
mkspiffs.sh: generalize for multiple configurations
Nathaniel Wesley Filardo [Sun, 31 May 2020 21:51:04 +0000 (22:51 +0100)]
mklfs: create .zip suitable for submission to TerryE's remote LFS compiler
Nathaniel Wesley Filardo [Sun, 31 May 2020 17:30:51 +0000 (18:30 +0100)]
Catch up with mainline ws2812:mix()
This is very overdue
Nathaniel Wesley Filardo [Wed, 1 Apr 2020 20:35:20 +0000 (21:35 +0100)]
lampulator: tidy and add easy way to get last message
Now, left-clicking on the window will push the last received line
(which includes the MQTT topic) to the system clipboard.
Nathaniel Wesley Filardo [Sat, 25 Jan 2020 18:57:06 +0000 (18:57 +0000)]
lamp-touch: fix typo in LFS scan
b239c3d0768c00be44f423609f705dcc96421a5b tried to walk the list of
modules in LFS (as well as those in SPIFFS), but used the integer
key, not string value, of the table of module names. This,
understandably, didn't work out so well.
Nathaniel Wesley Filardo [Fri, 24 Jan 2020 22:55:51 +0000 (22:55 +0000)]
draw-flowers: a re-growing pair of flowers
Nathaniel Wesley Filardo [Fri, 24 Jan 2020 22:55:10 +0000 (22:55 +0000)]
lamp-touch: also scan LFS
And add a note chastising past-me.
Nathaniel Wesley Filardo [Thu, 26 Dec 2019 00:46:46 +0000 (00:46 +0000)]
README: more hardware details
Nathaniel Wesley Filardo [Thu, 26 Dec 2019 00:46:09 +0000 (00:46 +0000)]
Update build scripts and notes
Nathaniel Wesley Filardo [Thu, 26 Dec 2019 00:44:52 +0000 (00:44 +0000)]
init2: rewrite lamp_announce
Nathaniel Wesley Filardo [Thu, 26 Dec 2019 00:44:13 +0000 (00:44 +0000)]
init2: fix remotemsg
Omitting the ()s means that the actual function doesn't get called, just
loaded.
Nathaniel Wesley Filardo [Thu, 26 Dec 2019 00:44:04 +0000 (00:44 +0000)]
init2: misc tidy
Nathaniel Wesley Filardo [Sun, 19 Aug 2018 00:55:58 +0000 (01:55 +0100)]
Minor updates to Love-based renderer
Blockier pixels
Add a conf.lua to turn most of the framework off
Nathaniel Wesley Filardo [Mon, 13 Aug 2018 23:30:48 +0000 (00:30 +0100)]
Add a much better Lampulator
This one (ab)uses the love2d.org lua game framework. Much of the code
is copied (and lightly modified) from the older linux-draw-xpm codebase,
which should probably otherwise be tossed into an incinerator.
Nathaniel Wesley Filardo [Sun, 12 Aug 2018 14:43:35 +0000 (15:43 +0100)]
Rework for LFS changes in core
Most of the changes are to use the OVL mechanism
Nathaniel Wesley Filardo [Sun, 12 Aug 2018 14:41:53 +0000 (15:41 +0100)]
draw-butterfly: add separate color for heart
Nathaniel Wesley Filardo [Sun, 8 Apr 2018 10:00:03 +0000 (11:00 +0100)]
Merge branch 'master' of arda.dyndns.tv:/Users/Shared/Acme Tensor/esp-lua_lamp
Nathaniel Wesley Filardo [Sun, 8 Apr 2018 09:59:17 +0000 (10:59 +0100)]
linux-draw-morse: catch up
Rachael [Sun, 8 Apr 2018 06:22:01 +0000 (23:22 -0700)]
Fixed redrawing when the color changes for heartstream
Nathaniel Wesley Filardo [Wed, 14 Mar 2018 18:04:53 +0000 (14:04 -0400)]
draw-snakeflower: new drawing
Nathaniel Wesley Filardo [Wed, 14 Mar 2018 18:04:27 +0000 (14:04 -0400)]
Small cleanup to draw-snake2
Nathaniel Wesley Filardo [Wed, 14 Mar 2018 18:04:01 +0000 (14:04 -0400)]
linux-draw-xpm: ws2812:shift negative
Rachael [Tue, 20 Feb 2018 07:39:57 +0000 (23:39 -0800)]
cleans up a bunch of prints and allows a 3rd (or nth) color to be sent over the network
Rachael [Tue, 20 Feb 2018 06:51:35 +0000 (22:51 -0800)]
first pass implementation of allowing the lamp to specify multiple colors for animations
Rachael [Tue, 20 Feb 2018 01:08:33 +0000 (17:08 -0800)]
fixes some minor typos in the color redrawing logic in a few drawings
Rachael [Tue, 20 Feb 2018 01:07:32 +0000 (17:07 -0800)]
added a reset button to immediately undim the lamp (using the dimming button to do it is annoying and error-prone)
Rachael [Tue, 20 Feb 2018 00:54:08 +0000 (16:54 -0800)]
fixes shifty2 to not interrupt the animation when changing colors
Rachael [Tue, 20 Feb 2018 00:41:22 +0000 (16:41 -0800)]
fixes shifty to not interrupt the animation when changing colors and make it support two colors
Rachael [Mon, 19 Feb 2018 23:57:24 +0000 (15:57 -0800)]
makes nom able to change color without starting the animation over
Rachael [Mon, 19 Feb 2018 19:54:00 +0000 (11:54 -0800)]
makes the entire heart change color on touch rather than just the beating part
Nathaniel Wesley Filardo [Sat, 6 Jan 2018 19:12:40 +0000 (14:12 -0500)]
touch: initialize color table correctly
Failing this, it was possible to call into a drawing without a primary
color assigned, which could lead to any number of crashes.
Nathaniel Wesley Filardo [Fri, 5 Jan 2018 07:15:04 +0000 (02:15 -0500)]
touch: fix conditional for redraw
Nathaniel Wesley Filardo [Wed, 3 Jan 2018 22:13:46 +0000 (17:13 -0500)]
Catch README.rst up with the world
Nathaniel Wesley Filardo [Wed, 3 Jan 2018 22:13:13 +0000 (17:13 -0500)]
emulators: add touch emulator
And some general refactoring.
Nathaniel Wesley Filardo [Wed, 3 Jan 2018 22:10:57 +0000 (17:10 -0500)]
touch: initial use of info structure
While here, some general tidying
Nathaniel Wesley Filardo [Wed, 3 Jan 2018 22:09:36 +0000 (17:09 -0500)]
drawings: return information structure
Nathaniel Wesley Filardo [Wed, 3 Jan 2018 01:16:48 +0000 (20:16 -0500)]
Add modules required to README
Nathaniel Wesley Filardo [Wed, 3 Jan 2018 01:15:51 +0000 (20:15 -0500)]
Tidy emulation code
Several changes to catch up to past changes for consistency.
Add tmr.interval function for increased coverage of API, will be
used in upcoming commits.
Nathaniel Wesley Filardo [Sat, 23 Dec 2017 03:59:19 +0000 (22:59 -0500)]
init2: hackishly force wifi reconnects
Nathaniel Wesley Filardo [Sat, 23 Dec 2017 03:59:04 +0000 (22:59 -0500)]
Make linux-draw understand -v from mosquitto_sub
Nathaniel Wesley Filardo [Mon, 20 Nov 2017 08:19:39 +0000 (03:19 -0500)]
heartstream: new drawing
Catch linux-draw-xpm.lua's emulation of the framebuffer up to enable
:shift() calls.
Nathaniel Wesley Filardo [Mon, 20 Nov 2017 08:18:58 +0000 (03:18 -0500)]
heartbeat: multi-color support
Rachael [Thu, 16 Nov 2017 08:09:42 +0000 (00:09 -0800)]
removes some copied documentation that is inaccurate
Rachael [Thu, 16 Nov 2017 08:07:49 +0000 (00:07 -0800)]
Adds a drawing of ones' finger sketching a heart
Nathaniel Wesley Filardo [Tue, 7 Nov 2017 23:30:51 +0000 (18:30 -0500)]
Initial support for color palettes
See examples of usage in draw-snake2 and draw-together.
At present, there is no support in the touch module for this,
only via the message parser.
Nathaniel Wesley Filardo [Tue, 7 Nov 2017 22:37:29 +0000 (17:37 -0500)]
Scripting language, of sorts.
Messages now can use timers to switch between animations. For example,
the single message
label h; draw heartbeat f 0 0; in 3000 k; end; label k; draw kiss 0 f 0 ; in 3000 h; end;
will spend three seconds on each animation, looping forever.
The language may be subject to further refinement, of course.
While here, rework handoff between the remote and touch components
as well as the boot and network notification displays.
Nathaniel Wesley Filardo [Tue, 7 Nov 2017 22:37:00 +0000 (17:37 -0500)]
draw-together: heart hands better together <3
Nathaniel Wesley Filardo [Tue, 7 Nov 2017 23:29:32 +0000 (18:29 -0500)]
touch: sort drawings by name for selection
Nathaniel Wesley Filardo [Tue, 7 Nov 2017 22:03:37 +0000 (17:03 -0500)]
kiss: start on correct animation frame
Nathaniel Wesley Filardo [Tue, 7 Nov 2017 08:45:06 +0000 (03:45 -0500)]
linux-draw: add more tmr functions
Nathaniel Wesley Filardo [Sat, 23 Sep 2017 19:58:05 +0000 (15:58 -0400)]
lamp-touch also directly writes to LED array
As part of blackout logic. So it needs to bounce the enabling GPIO.
Nathaniel Wesley Filardo [Thu, 21 Sep 2017 05:53:44 +0000 (01:53 -0400)]
update init2 mqtt logic
Nathaniel Wesley Filardo [Thu, 21 Sep 2017 05:52:58 +0000 (01:52 -0400)]
GPIO block spew to LED array
Nathaniel Wesley Filardo [Sun, 3 Sep 2017 04:52:14 +0000 (00:52 -0400)]
Add note about AND gate to README
Nathaniel Wesley Filardo [Sat, 26 Aug 2017 23:03:37 +0000 (19:03 -0400)]
lamp-remote: tonumber after checking regex result
Otherwise, r/g/b might be nil and tonumber(nil) doesn't work out well
Nathaniel Wesley Filardo [Wed, 23 Aug 2017 02:58:26 +0000 (22:58 -0400)]
Tweak emulator
Nathaniel Wesley Filardo [Tue, 1 Aug 2017 00:24:26 +0000 (20:24 -0400)]
Move to independent repository
Symlink or checkout core into ./core
Nathaniel Wesley Filardo [Sun, 30 Jul 2017 01:34:55 +0000 (21:34 -0400)]
push* scripts: use luasrcdiet if directed
If ${LUADIET} is empty, send files as they are; otherwise, stream them
through luasrcdiet. To use the default options, use 'LUADIET=' '" or
something to that effect. This can be set per-file, should some module
turn out to be broken by dieting.
The "dopush" utility macro is split and now called "dopushlua" and
"dopushtext" (which skips luasrcdiet even if it is engaged).
Nathaniel Wesley Filardo [Sat, 29 Jul 2017 20:09:42 +0000 (16:09 -0400)]
fifosock: dramatically simplify
All we really need here is a thin shim around send; stop trying to be
clever, it just makes things obfucsated when they go wrong.
Chase consequences around the tree. Extensive testing was done looking
for memory leaks despite the newfound simplicity, with none found.
Nathaniel Wesley Filardo [Sat, 29 Jul 2017 19:32:45 +0000 (15:32 -0400)]
tq bugfixes (and API change)
- not all lapsed time should be credited to the head node
- needs to reset the time base (_tst) in all cases
- always return the object for cancellation
- defend against time going backwards (just in case)
While here, rework to simplify, simplify API, and add comments
Rachael [Sat, 8 Jul 2017 23:52:11 +0000 (16:52 -0700)]
Merge branch 'master' of https://github.com/AcmeTensorToys/esp-lua
Nathaniel Wesley Filardo [Sat, 8 Jul 2017 23:38:14 +0000 (19:38 -0400)]
example/lamp: Small tweaks
Fixes doing lots of framebuffer math in a loop unnecessarily, too!
Rachael [Sat, 8 Jul 2017 22:44:51 +0000 (15:44 -0700)]
removes a useless loop that made the dimming code much slower. This also moves the dimming code form the left most button on the front to the back most button on the left side so as to limit accidental triggering.
Rachael [Sat, 8 Jul 2017 22:25:37 +0000 (15:25 -0700)]
Merge branch 'master' of https://github.com/AcmeTensorToys/esp-lua
Nathaniel Wesley Filardo [Sat, 3 Jun 2017 22:11:21 +0000 (18:11 -0400)]
lamp/linux-draw: tmr unregister also stops
Rachael [Sun, 14 May 2017 01:12:39 +0000 (18:12 -0700)]
removed some dead code from a failed fix attempt
Rachael [Sun, 14 May 2017 01:08:38 +0000 (18:08 -0700)]
fixed a bug wherein it would switch to the last local image before dimming. Now it will instead dim whatever is on the screen, local or remote.
Rachael [Sun, 14 May 2017 00:22:56 +0000 (17:22 -0700)]
adds the un-dimming feature to the dimming feature
Nathaniel Wesley Filardo [Thu, 11 May 2017 10:24:42 +0000 (06:24 -0400)]
examples/lamp: fix linux-draw-xpm
Nathaniel Wesley Filardo [Thu, 4 May 2017 02:27:35 +0000 (22:27 -0400)]
examples/lamp: implement more of tmr better
draw-flower uses more of the API
Rachael [Mon, 1 May 2017 16:43:49 +0000 (09:43 -0700)]
adds stubs for the new buttons.
Rachael [Mon, 1 May 2017 16:41:35 +0000 (09:41 -0700)]
Wes's new and improved dimming function.
Rachael [Mon, 1 May 2017 05:19:44 +0000 (22:19 -0700)]
kinda works, sorta
Rachael [Sun, 30 Apr 2017 22:45:24 +0000 (15:45 -0700)]
simpler dimming function that merely cuts values in half
Rachael [Sun, 30 Apr 2017 21:32:54 +0000 (14:32 -0700)]
tries to implement rgb --> hsl -> rgb, but fails compiling for an index out of range exception
Nathaniel Wesley Filardo [Thu, 27 Apr 2017 01:52:17 +0000 (21:52 -0400)]
examples/lamp: new drawing: flower bloom animation
Nathaniel Wesley Filardo [Mon, 24 Apr 2017 17:54:56 +0000 (13:54 -0400)]
examples/lamp: fix fallback drawing for linux xpm
Nathaniel Wesley Filardo [Mon, 30 Jan 2017 20:09:40 +0000 (15:09 -0500)]
examples/lamp/lamp-remote: don't call nil on malfored message
Nathaniel Wesley Filardo [Tue, 17 Jan 2017 06:40:47 +0000 (01:40 -0500)]
zshify host push tools
Nathaniel Wesley Filardo [Tue, 17 Jan 2017 06:42:11 +0000 (01:42 -0500)]
lamp/linux-draw: properly emulate timer callbacks
Rachael [Sun, 18 Dec 2016 07:00:19 +0000 (23:00 -0800)]
removes the extra pixel from the first frame of nom
Rachael [Sun, 18 Dec 2016 06:36:19 +0000 (22:36 -0800)]
Adds simple nom-ing animation, now with bugfixes
Rachael [Sun, 18 Dec 2016 06:35:28 +0000 (22:35 -0800)]
Merge branch 'master' of https://github.com/AcmeTensorToys/esp-lua
Nathaniel Wesley Filardo [Sun, 18 Dec 2016 06:34:54 +0000 (01:34 -0500)]
lamp: snake2: don't pass string to :fill
Whoopsies!
Rachael [Sun, 18 Dec 2016 06:33:48 +0000 (22:33 -0800)]
Adds simple nom-ing animation, now with bugfixes
Rachael [Sun, 18 Dec 2016 05:43:39 +0000 (21:43 -0800)]
Adds simple nom-ing animation
Nathaniel Wesley Filardo [Fri, 16 Dec 2016 07:13:27 +0000 (02:13 -0500)]
lamp: linux wrappers for xpm and morse renderers
This uses lua-cqueues to provide an implementation of the lamp renderer
as a kind of shell pipeline tool. I am sure things could be improved,
but this is a good start and lets me carry a virtual lamp on my desktop
as well as a slightly different piece of kit on my physical desk.
Nathaniel Wesley Filardo [Fri, 16 Dec 2016 07:12:03 +0000 (02:12 -0500)]
lamp: revise remote protocol
A new, improved lamp-remote.lua. The protocol herein is backwards
compatible with everything ever automatically generated by earlier
versions, but is not in general compatible with the old scheme. I
think I like this one better.
Nathaniel Wesley Filardo [Wed, 7 Dec 2016 07:52:24 +0000 (02:52 -0500)]
lamp: lua5.0-isms in draw-{candle,staryeyes}
In particular, the use of the function-local "arg" is deprecated and
gone entirely in lua5.2. Switch to "ipairs{...}" rather than
"ipairs(arg)" which should work with both nodemcu and host programs.
Nathaniel Wesley Filardo [Wed, 7 Dec 2016 07:51:55 +0000 (02:51 -0500)]
lamp: tidy snake2 drawing code
Nathaniel Wesley Filardo [Sat, 3 Dec 2016 22:07:45 +0000 (17:07 -0500)]
lamp: touch should not reset its state every load
Nathaniel Wesley Filardo [Wed, 23 Nov 2016 00:47:32 +0000 (19:47 -0500)]
lamp: draw-happy: blank the framebuffer first
Nathaniel Wesley Filardo [Mon, 21 Nov 2016 21:50:05 +0000 (16:50 -0500)]
Merge remote-tracking branch 'github/master'
Nathaniel Wesley Filardo [Mon, 21 Nov 2016 21:47:58 +0000 (16:47 -0500)]
lamp: tweak draw-candle
Nathaniel Wesley Filardo [Mon, 21 Nov 2016 21:47:49 +0000 (16:47 -0500)]
lamp: draw-happy
Nathaniel Wesley Filardo [Mon, 21 Nov 2016 21:43:59 +0000 (16:43 -0500)]
lamp: allow going back in drawing selection, too
Nathaniel Wesley Filardo [Mon, 21 Nov 2016 21:40:47 +0000 (16:40 -0500)]
lamp: support sequences of drawings
This changes the protocol to necessitate a ';' at the end of each
animation. The directives are "[delay] [drawing] [r] [g] [b] ;", with
delay decimal milliseconds to wait after the previous command, r/g/b hex
0-FF and drawing as before. e.g. '0 fill 0 3 0 ; 5000 heart 7 0 7 ;'.