Commit Graph

1042 Commits

Author SHA1 Message Date
Gregg ac88329d34 Deprecated setMaxConnections(); Added reserveSocketConnections()
Use homeSpan.reserveSocketConnections(n) to reserve n sockets *not* to be used for HAP.  Multiple calls can be used to cumulate a total number of reserved sockets.  This makes is easy to add reserveSocketConnections(n) at multiple point in the code whenever a certain number of sockets need to be reserved for use with that portion of the code.  For example enableOTA() calls reserveSocketConnections(1).

If both setMaxConnections(), and one or more reserveSocketConnections(), methods are called HomeSpan will use the more restrictive net value.
2022-02-10 21:55:03 -06:00
Gregg 4973d1aaa1 Revert "Initial coding of protectPinISR(pin) method"
This reverts commit 852a916d61.
2022-02-10 21:09:42 -06:00
HomeSpan 1efe7bba0a
Update Reference.md 2022-02-10 21:08:17 -06:00
HomeSpan 8525495720
Update Reference.md 2022-02-10 21:04:52 -06:00
Gregg 44ee504831 Merge branch 'dev' of https://github.com/HomeSpan/HomeSpan into dev 2022-02-10 21:02:12 -06:00
Gregg 32b417a1da Added homeSpan method deleteStoredValues()
Provides a programmatic way of deleting all stored Characteristic values from NVS.  Identical to the 'V' CLI Command.
2022-02-10 21:02:10 -06:00
HomeSpan 65f000d65e
Update Reference.md 2022-02-10 20:48:16 -06:00
HomeSpan 4270760c40
Update Reference.md 2022-02-10 06:21:53 -06:00
HomeSpan 9e229cda9a
Update QRCodes.md 2022-02-07 21:57:58 -06:00
Gregg f955ff689b Added homeSpan.setPairCallback() method
Callback function must be of type void()(boolean isPaired).  Will be called when device is paired and when device is unpaired.  Allows for user-defineable actions upon device pairing/unpairing.
2022-02-06 08:39:47 -06:00
Gregg 9e40666231 Added Pixel() and Dot() operator overloads to Color struct
Color now supports a==b, a!=b, a+b, a-b, a+=b, and a-=b operators
2022-02-05 23:30:28 -06:00
Gregg acdcab1132 Verified Pixel() and Dot() classes work on ESP32-C3 2022-02-05 16:24:01 -06:00
Gregg e27d310733 Updated Pixel Example to use Pixel() and Dot() Classes 2022-02-05 16:08:51 -06:00
Gregg d0a13e5417 Updated Pixel() class to use more streamlined methods implemented in Dot() class
Pixel() and Dot() classes are now complete.  Tested DotStar RGB, NeoPixel RGB, and NeoPixel RGBW, all running at same time on a single ESP32.

Next up: Must update Pixel Example as well as Holiday Lights Project
To Do: Add documentation page for Pixel() and Dot()
2022-02-05 12:35:01 -06:00
Gregg a21cc0679d Add two-wire addressable DotStar RGB LEDs to Pixel.h
Pixel.h now contains Pixel() and Dot() classes.
Dot() class uses more streamlined methods; must next update Pixel() to use similar methods, which will allow Pixel and Dot to be more "interchangeable".
2022-02-05 09:17:56 -06:00
Gregg 852a916d61 Initial coding of protectPinISR(pin) method
Works for all NVS calls in homeSpan.h.  To Do:  Add logic to all other NVS calls.
2022-01-30 22:33:07 -06:00
Gregg d2bbd4f56c Added logic for RGB vs. RGBW
Tested with original 8-pixel RGB and 60-pixel RGBW.  Works as expected.
2022-01-29 18:26:17 -06:00
HomeSpan 877f47a64d Split RFControl constructor into public and private versions
Private constructor only used for Pixel, which is friend class of RFControl
2022-01-27 21:41:05 -06:00
Gregg 4588669cd2 Added ARDUINO_VARIANT (type of board) to MDNS 2022-01-23 16:40:46 -06:00
Gregg 46820c66a2 Add Arduino-ESP32 version number to MDNS output 2022-01-23 15:00:12 -06:00
Gregg b7f2495e7c Update Pixel.ino
Added example pin definitions for ESP32/S2/C3
2022-01-22 17:52:33 -06:00
Gregg a09b8d0b85 Update Pixel.cpp 2022-01-22 07:18:19 -06:00
Gregg 95b41fd929 Revert "Update logic so Pixel uses only ONE channel and shares across all instances"
This reverts commit 4af3a22764.
2022-01-22 07:09:48 -06:00
Gregg 4af3a22764 Update logic so Pixel uses only ONE channel and shares across all instances 2022-01-21 21:56:51 -06:00
Gregg e060856b78 corrected an issue in loadData ISR that would cause a hang
Also updated Pixel example with Knight Rider Effect.
Testing on C3 seems to be working.  Must test on S2 and ESP32 next.
2022-01-20 21:01:31 -06:00
Gregg 4419a91bef verified functionality on ESP32-S2 2022-01-17 13:15:24 -06:00
Gregg fd3955f0c2 verified functionality on ESP32 original 2022-01-17 12:52:09 -06:00
Gregg b6d21fd2c0 streamlined identification of interrupt masks and memory size 2022-01-17 12:36:02 -06:00
Gregg 89f0d0dd94 verified works on C3 when either channel 0 or 1 is used 2022-01-17 11:30:55 -06:00
Gregg 5f513c4c34 updated 2022-01-17 08:25:26 -06:00
Gregg 79c028c057 moved loadData into interrupt 2022-01-17 07:16:31 -06:00
Gregg 40c05bd53f some more cleanup
Next up:  Move loadData into isrHandler, if possible.
To Do: redo single-color methods
2022-01-16 23:24:54 -06:00
Gregg 1a99df4214 check in progress 2022-01-16 23:14:12 -06:00
Gregg 46d7ade046 Re-doing Pixel class once again
This time using customized interrupts to fill RMT memory on-the-fly.

* Added getChannel() to RFControl
* Add 3rd, optional, boolean argument to RFControl(int pin, bool refTick, bool defaultDrive) to that RMT can be initialized but without the default driver (allows for use of custom interrupt code instead)
2022-01-16 14:16:52 -06:00
Gregg 1f9c8bfd48 Merge branch 'dev' of https://github.com/HomeSpan/HomeSpan into dev 2022-01-11 06:41:19 -06:00
Gregg 3e1c676f90 Update Pixel.ino 2022-01-11 06:41:17 -06:00
HomeSpan 184cd3d82f
Update Reference.md 2022-01-11 06:01:19 -06:00
Gregg 6f4cea1b4d Updated version number to 1.4.3
Also updated Pixel example.
2022-01-10 22:52:08 -06:00
Gregg aefa737675 Completed "optimization"
Pixels now lets you reserve memory for pixels so that the call to start the RF transmission can be done for multiple pixels at once.  However, gain is not as much as expected.  May need to revisit if driving a large matrix of pixels is needed.
2022-01-08 17:28:43 -06:00
Gregg ee6c270de3 optimizing to allow for pulse train batching 2022-01-08 16:18:37 -06:00
Gregg 9d0c56799c Update extras.ino 2022-01-07 06:58:40 -06:00
Gregg 1b402b5ebc changed range of S and V to be 0-100 instead of 0-1
But still use float so that values of 50.3, 99.5, etc. are still distinguishable.
2022-01-07 06:25:11 -06:00
Gregg 3020b800a6 testing 2022-01-06 21:43:54 -06:00
Gregg f10f5cffcd Normalized and optimized Pixel methods
created color_t typedef and use as basis for all RGB and HSV methods
2022-01-06 21:15:03 -06:00
Gregg d5b27d6e14 Added ability to set same color on multiple pixels
Added 4th, optional argument, nPixels, to setRGB() and setHSV().
2022-01-06 18:09:22 -06:00
HomeSpan 738dce3ad3
Update Reference.md 2022-01-05 17:25:28 -06:00
HomeSpan 22de894f92
Update Reference.md 2022-01-02 17:06:15 -06:00
Gregg e8c7afae00 Increased default max number of connections to 14!
Reflects increase in max number of LWIP sockets from 10 (Arduino-ESP32 v2.0.0) to 16 (Arduino-ESP32 v2.0.1).  Since HomeSpan needs at least 2 (one for Server and 1 free for new connections), this leaves 14 connections for controllers.  A big improvement over only having 8!
2022-01-02 15:36:54 -06:00
Gregg 5d3a4bfc38 Added simple Pixel example to Other Examples 2022-01-01 08:14:32 -06:00
Gregg 12c283e8c3 Update Pixel.h 2022-01-01 07:14:30 -06:00