DevJav / best_friend_lamp_arduino

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

Does not change color #13

Closed inthenash closed 1 year ago

inthenash commented 1 year ago

@DevJav Do you have updated coding for this project? I can get the LEDs to light up with the initial color, but then no matter what they remain this color regardless of the input from the touch sensor. Do you have any possible ideas?

DevJav commented 1 year ago

What color do they light?

inthenash commented 1 year ago

Red...only no matter what I press

DevJav commented 1 year ago

But does it turn red just after booting and stays that color? That may indicate that it wasn't able to connect to the wifi. If it happens after you boot it and you make an initial press I don't really know what may be. It'd be helpful if you could upload a video of it.

inthenash commented 1 year ago

It connects to the wifi and adafruit.io fine. Just when you press the sensor, the lights come on red, and then go into breathe mode until the other light is pressed. then they both flash and become bright red and then stay static bright red until the timeout happens. No matter what sensor press function is done, they remain red.

DevJav commented 1 year ago

It goes instantly to breathe mode after the first press? I can't reproduce that error, I tap it once and then it turns red, but if I tap again before the double double flash it changes it color. When a color is selected you cannot change it

MaxKneilling commented 1 year ago

Hi inthenash, may could you try to use a simple pushbutton instead of the touch sensor. For many of my initial problem the root cause was found to be the touch sensor.

DevJav commented 1 year ago

Hi inthenash, may could you try to use a simple pushbutton instead of the touch sensor. For many of my initial problem the root cause was found to be the touch sensor.

That could be the issue, the touch sensor isn't very reliable

inthenash commented 1 year ago

I will try a push button rather than a touch sensor.

MaxKneilling commented 1 year ago

Once you figured that out, here was my solution for the touch sensor, which works now like a charme. Intially i had bought a ttp223b sensor in blue (unfortunately i have not found any details about the manufacturer or a product code). After some research i found a red one, also a based on the ttp223 chip, but smaller in size and, most importantly, pins for an additional capacitor to control the sensitivity of the sensor. In my case (IKEA Solskur, touch sensor connected to the brass knob) i found a 47pF capacitor working best. No more „self sending“ or restarts due to „overload“

inthenash commented 1 year ago

@DevJav

I tap it once and then it turns red, but if I tap again before the double double flash it changes it color. When a color is selected you cannot change it

I have made some progress. Lamp 1 is activated, then touched again to choose a color, green for example. The choice is then locked after the double flash. Lamp 2 comes on with the color choice of Lamp 1. Communication is occurring, somehow.

I still think I have something wrong because , one would think with another press, (on Lamp 1 or Lamp 2) the color could be changed and transmitted. Example, start with green...then goes yellow (or another color) if I press either lamp. Right now, the initial color is locked until time out.

DevJav commented 1 year ago

That's the intended behavior, once a color is sent you can't change it until it turns off. Touching it while on will result in the sending of pulse animation.

inthenash commented 1 year ago

Thank you friends for your help. I believe these lamps are functioning with in nominal parameters! (I just got done watching SpaceX, LOL!) Peace be with you all!