Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ricardocosme/inout_thermo
ATtiny85 Inside&Outside thermometer written in modern C++
https://github.com/ricardocosme/inout_thermo
Last synced: 15 days ago
JSON representation
ATtiny85 Inside&Outside thermometer written in modern C++
- Host: GitHub
- URL: https://github.com/ricardocosme/inout_thermo
- Owner: ricardocosme
- License: mit
- Created: 2020-10-24T17:28:58.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-15T17:51:56.000Z (over 3 years ago)
- Last Synced: 2024-08-01T16:22:51.454Z (3 months ago)
- Language: C++
- Size: 1.64 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
** Inside&Outside thermometer
This is an ATtiny85 project to measure the ambient temperature of my office and the outside temperature. The temperatures are measured with two DS18B20 sensor and the values are shown on a SSD1306 0.96" OLED display. The code is written in C++17/20 with two goals in mind: [[#code-size][small code size]] and [[#power-consumption][low power consumption]].[[file:images/in_action_640px.png]]
/Note: The photo above is outdated because now there is a push button to turn on the device./
** Circuit
[[file:images/circuit.png]]/Note: The image is outdated because now there is a push button to turn on the device./
** Code size
:PROPERTIES:
:CUSTOM_ID: code-size
:END:
This project uses *1794bytes* if compiled with ~avr-gcc 10.2~ and ~-Os~.** Power consumption
:PROPERTIES:
:CUSTOM_ID: power-consumption
:END:
The system stays at power down mode sleep consuming *0.5uA @ 5V* and it wakes up when the power switch is pressed. The process of taking one temperature value lasts *~100ms* and the pair of temperatures are displayed by 8 seconds, after that the system goes to sleep again. Another important point is that the contrast of the display is defined to be the lowest possible. The system reaches a peak of *~3.87mA* when it wakes up to take the temperatures. The MCU is running under 1Mhz clock.** Dependencies
1. [[https://github.com/ricardocosme/ssd1306][ssd1306]]
2. [[https://github.com/ricardocosme/ds18b20][ds18b20]]
3. [[https://github.com/ricardocosme/avrcxx][avrcxx]]
4. [[https://github.com/ricardocosme/power_switch][power_switch]]** Requirements
1. ~avr-gcc 10.2~ with ~-std=c++20 -Os~