DevJav / best_friend_lamp_arduino

Best friend lamp project made with Arduino
15 stars 5 forks source link

Update best_friend_lamp_arduino.ino #9

Open hippsabq opened 1 year ago

hippsabq commented 1 year ago

Added short press duration

Added complexity to pulse function to:

  1. reset "on timer" with each pulse to keep the lamps on longer with each pulse sent
  2. use new short press duration to reject random touch sensor errors
DevJav commented 1 year ago

Have you tried the multiple lamp feature?

Also, I don't really like the feature of reseting the timer for each touch :(

If you remove that feature and confirm that multiples lamps work I'll merge it

hippsabq commented 1 year ago

Sorry, didn't mean to send the multiple lamps PR before testing it. I only have access to one of my lamps of course, but I will flash the changes on in and flash a couple more ESPs for testing this weekend.

In my head then changes should work though, but could make the Adafruit feed a bit "chatty" with multiple lamps which hopefully won't cause issues.

I'm still having issues with one of my lamps with the touch sensor and the over-sensitivity. :(

DevJav commented 1 year ago

Thank you! In reality you could try just publishing manually the messages from the adafruit io page (for example a 34 or somthing different from 20s and 10s) there is no really need to use more ESPs

The touch sensors have given me a lot of headaches :( there seems not to be a great way to fix that apart from making long presses of 10 seconds hahaha

hippsabq commented 1 year ago

Yeah, I use the Adafruit feeds for testing, but also like seeing the messages fly on their own, so I'll just flash on a couple of boards without pixels, send my own button presses via the Feed, and watch the chatter to verify.

Flashed it on my current lamp..sent some messages...(55, 470, etc..)..and seems like it will work out

Have a couple of typos to fix up too. Thanks for sharing this awesome project!!