Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add esp support #2

Merged
merged 7 commits into from
Aug 21, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update README.md
  • Loading branch information
Erriez committed Aug 21, 2022
commit 9ec44e88f5d59037d965cc12f3ecd3d1e680dad8
47 changes: 43 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Oregon THN128 433MHz temperature sensor transmit/receive library for Arduino

This is a transmit/receive library Arduino library with the Oregon THN128 433MHz wireless protocol.
# Oregon THN128 433MHz temperature transmit/receive library for Arduino

This is a 433MHz wireless 3-channel Oregon THN128 temperature transmit/receive Arduino library for ATMega328,
ESP8266 and ESP32 emulating v1 protocol:

![Oregon THN128](https://raw.githubusercontent.com/Erriez/ErriezOregonTHN128/master/extras/OregonTHN128.png)

## Transmit / receive hardware

This library is optimized for low-power ATMega328 microcontroller (AVR architecture).
This microcontroller is available on Arduino UNO and `Pro Mini 3.3V 8MHz` boards. Other targets are not tested.
This Arduino library is optimized for low-power ATMega328 microcontroller (AVR architectures like `Arduino UNO` and
`Pro Mini 3.3V 8MHz` boards).

![Transmit and receive hardware](extras/transmit-receive-hardware.png)

Expand All @@ -23,6 +26,14 @@ This microcontroller is available on Arduino UNO and `Pro Mini 3.3V 8MHz` boards
* SSD1306 I2C 128x64 OLED display.
* Pro-Mini 3V3 8MHz.

### Supported microcontrollers

* ATMega328 AVR designed for low-power
* ESP8266
* ESP32
* Other microcontrollers are not tested and may or may not work


### Hardware notes

Supported hardware:
Expand Down Expand Up @@ -210,8 +221,36 @@ void loop()
}
```

## Library Changes

### v1.1.0

The callback function `void delay100ms()` has been removed as this was not compatible with ESP32. The application should
change the code to:

```c++
// Send temperature twice with 100ms delay between packets
OregonTHN128_Transmit(&data);
delay(100);
OregonTHN128_Transmit(&data);
```

AVR targets can replace `delay(100)` with LowPower usage:

```c++
LowPower.powerDown(SLEEP_15MS, ADC_OFF, BOD_OFF);
LowPower.powerDown(SLEEP_60MS, ADC_OFF, BOD_OFF);
LowPower.powerDown(SLEEP_15MS, ADC_OFF, BOD_OFF);
```

## Saleae Logic Analyzer

![capture](extras/SaleaeLogicAnalyzer/RX_rol7_channel1_temp20.7_lowbat0.png)

A [capture](extras/SaleaeLogicAnalyzer/RX_rol7_channel1_temp20.7_lowbat0.sal) from the Oregon THN128 can be opened with https://www.saleae.com/downloads/.
[capture](extras/SaleaeLogicAnalyzer/RX_rol7_channel1_temp20.7_lowbat0.sal) from the Oregon THN128 can be opened with
https://www.saleae.com/downloads/.

## Generated Arduino Library Doxygen Documentation

* [Online Doxygen HTML](https://erriez.github.io/ErriezOregonTHN128/index.html)
* [Doxygen PDF](https://github.com/Erriez/ErriezOregonTHN128/blob/gh-pages/ErriezTemplateLibrary.pdf)