Sonoff Basic R2 (1.3) and US-100 Sensor via UART

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
dakkar
New user
Posts: 2
Joined: 24 Nov 2020, 16:43

Sonoff Basic R2 (1.3) and US-100 Sensor via UART

#1 Post by dakkar » 26 Nov 2020, 19:59

Hello ;) I'm looking for a solution for my problem:

I have a sonoff R2 (board revision 1.3). This means i have the following gpio PINs available:
3v3,G,RX,TX

The US-100 sensor (ultrasonic) can be powered with 3.3V and via UART. In order to get the distance, I need to send "0x55" via serial and receive a two byte long response (and do some maths afterwards).
This result should be published via mqtt after requesting via mqtt.

Some Details can be found here: https://bananarobotics.com/shop/US-100- ... sor-Module

Can this be archieved with espeasy? I have no experience with the firmware :D

TD-er
Core team member
Posts: 9900
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff Basic R2 (1.3) and US-100 Sensor via UART

#2 Post by TD-er » 26 Nov 2020, 20:46

Have you tried this? https://espeasy.readthedocs.io/en/lates ... 100#us-100
This part of the documentation suggests it will also work with the US-100, although the screenshots suggest it is not used via UART, but via measuring the pulse duration.

dakkar
New user
Posts: 2
Joined: 24 Nov 2020, 16:43

Re: Sonoff Basic R2 (1.3) and US-100 Sensor via UART

#3 Post by dakkar » 26 Nov 2020, 21:55

yep I found this doc.

The reason why I'd prefer the serial mode: the module can (and does only in this mode) take the environmental temperature into consideration, which allows more exact measurements.
I also read, themodule is not very reliable when powered with 3v3 in trigger/echo mode

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests