easpeasy and apds9960

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
tchi59
Normal user
Posts: 26
Joined: 24 Jun 2021, 15:04

easpeasy and apds9960

#1 Post by tchi59 » 01 Jul 2021, 15:57

Hi
I would like to know if the sensor apds9960 is manageable with ESP32 and ESPEASY ?
if yes can you please show me some example

Thx

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: easpeasy and apds9960

#2 Post by Ath » 01 Jul 2021, 16:26

Have you looked at the documentation for that plugin?

It should work just as fine on an ESP32 as it does on an ESP8266.
Just pick any of the TESTING builds (has 'test' in the bin name).
/Ton (PayPal.me)

tchi59
Normal user
Posts: 26
Joined: 24 Jun 2021, 15:04

Re: easpeasy and apds9960

#3 Post by tchi59 » 01 Jul 2021, 18:09

thx
testing code means it is not tested yet ?

tchi59
Normal user
Posts: 26
Joined: 24 Jun 2021, 15:04

Re: easpeasy and apds9960

#4 Post by tchi59 » 01 Jul 2021, 19:22

hi again
i noticed this evening that ESP32 has builtin multiple "touch pin"
Do you know if it is possible to use touchpin with espeasy ?
have you got an example ?
thanks

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: easpeasy and apds9960

#5 Post by Ath » 01 Jul 2021, 20:17

tchi59 wrote: 01 Jul 2021, 18:09 thx
testing code means it is not tested yet ?
The testing name is a leftover from the time that the 'normal' build held a set of thoughly tested and accepted plugins, and 'testing' held also a set of plugins that had some lesser 'experience' in actual use. That time has passed, as all available plugins are a) rather stable but b) they don't fit into a single build anymore. (Though since a couple of months there is the 'max' build, only available for ESP32 with 16MB flash, that does contain all plugins that actually work on an ESP32).
For historic reasons the 'test(ing)' name was kept, but even that was split into 4 sets, A..D, as even the larger possible bin size of an ESP32 with 4MB couldn't accommodate all plugins any longer.

If you have a suggestion for a better naming scheme, please provide that, it will be taken into consideration!
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: easpeasy and apds9960

#6 Post by Ath » 01 Jul 2021, 20:18

tchi59 wrote: 01 Jul 2021, 19:22 hi again
i noticed this evening that ESP32 has builtin multiple "touch pin"
Do you know if it is possible to use touchpin with espeasy ?
have you got an example ?
thanks
This? https://espeasy.readthedocs.io/en/lates ... #p097-page
/Ton (PayPal.me)

tchi59
Normal user
Posts: 26
Joined: 24 Jun 2021, 15:04

Re: easpeasy and apds9960

#7 Post by tchi59 » 02 Jul 2021, 07:38

hi
maybe you can help here,
i did create a devices "Touch (ESP32) - internal" with the name touch15 .
I plugged a wire on the touch GPIO15.
when i hold the wire with my hand it is working, see the log:

212204 : Info : Touch : ADC2 ch3 (T3): 18
212301 : Info : EVENT: touch15#All=18.00
213201 : Info : EVENT: touch15#Duration=1015
213905 : Info : Touch : ADC2 ch3 (T3): 15
214000 : Info : EVENT: touch15#All=15.00
214702 : Info : EVENT: touch15#Duration=887
215204 : Info : Touch : ADC2 ch3 (T3): 15
215300 : Info : EVENT: touch15#All=15.00
215702 : Info : EVENT: touch15#Duration=588

Now i want to create a rule, when the wire is hold trigger an action, here is my rule
on touch15#Touch
do
logentry,Starting **************** touch15
endon

i tryied again holding the wire, but the rules is not run ?
do you know why ?
Thx

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: easpeasy and apds9960

#8 Post by Ath » 02 Jul 2021, 08:31

I don't see an event touch15#touch in your log, so that indeed won't trigger.
Should be like this I guess:

Code: Select all

on touch15#All do
  logentry,"touch15 All = %eventvalue1%"
endon
on touch15#Duration do
  logentry,"touch15 Duration = %eventvalue1%"
endon
(NB: Don't put the 'do' on a separate line, that might give unexpected results, or no results at all)
(NB2: The logentry I added quotes, as a space is also an argument separator, like a comma, so it would have only logged the word 'Starting' in the way you put it)

In the example rule from the documentation, the task value variable is called Touch, and I assume you named it All?
/Ton (PayPal.me)

tchi59
Normal user
Posts: 26
Joined: 24 Jun 2021, 15:04

Re: easpeasy and apds9960

#9 Post by tchi59 » 02 Jul 2021, 09:12

Working very well
Many Thanks

tchi59
Normal user
Posts: 26
Joined: 24 Jun 2021, 15:04

Re: easpeasy and apds9960

#10 Post by tchi59 » 02 Jul 2021, 09:50

Many thx
i ordered that kind of switch to be used as a touch switch

https://www.amazon.fr/gp/product/B07BVN ... UTF8&psc=1

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: easpeasy and apds9960

#11 Post by Ath » 02 Jul 2021, 11:04

tchi59 wrote: 02 Jul 2021, 09:50 Many thx
i ordered that kind of switch to be used as a touch switch

https://www.amazon.fr/gp/product/B07BVN ... UTF8&psc=1
You don't need ESP32 Touch support for that, these act just like a regular switch, giving either a 0 or 1 output on active (configurable by soldering the correct pads as documented). And it will only give on/off status, not the duration it was touched that you can have when using the ESP32 built-in touch sensor(s).
You could also use the TTP229-B hardware and the available plugin for that kind of keypad (older documentation available only)
/Ton (PayPal.me)

tchi59
Normal user
Posts: 26
Joined: 24 Jun 2021, 15:04

Re: easpeasy and apds9960

#12 Post by tchi59 » 04 Jul 2021, 10:50

thx

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 18 guests