Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 5 additions & 2 deletions components.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"prefix": ""
},
"aliases": {
"components": "src/components",
"utils": "src/lib/utils"
"components": "@site/src/components",
"utils": "@site/src/lib/utils",
"ui": "@site/src/components/ui",
"lib": "@site/src/lib",
"hooks": "@site/src/lib/hooks"
}
}
2 changes: 1 addition & 1 deletion docs/boards/mcu/mcu-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const MCUManager = () => {
<NavBlocks href="/docs/hardware/bee/wifi-bee?board=edu" title="Wifi-Bee" />
<NavBlocks href="/docs/hardware/bee/sd-bee?board=edu" title="SD-Bee" />
<NavBlocks
href="/docs/hardware/sensors/temperatur-luftfeuchte?board=edu"
href="/docs/hardware/sensors/temperatur-luftfeuchte/temperatur-luftfeuchte?board=edu"
title="Temperatur- und Luftfeuchtesensor"
/>
<NavBlocks
Expand Down
2 changes: 1 addition & 1 deletion docs/boards/mcus2/mcu-s2-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export const MCUManager = () => {
</div>
<div className="grid grid-cols-2 md:grid-cols-3 gap-4 py-8">
<NavBlocks
href="/docs/hardware/sensors/temperatur-luftfeuchte?board=edus2"
href="/docs/hardware/sensors/temperatur-luftfeuchte/temperatur-luftfeuchte?board=edus2"
title="Temperatur- und Luftfeuchtesensor"
/>
<NavBlocks
Expand Down
125 changes: 0 additions & 125 deletions docs/hardware/sensors/temperatur-luftfeuchte.mdx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <Adafruit_HDC1000.h> // http://librarymanager/All#Adafruit_HDC1000_Library

Adafruit_HDC1000 hdc = Adafruit_HDC1000();

void setup(){
Serial.begin(9600);
hdc.begin();
}

void loop(){
Serial.print("Temperature: ");
Serial.println(hdc.readTemperature());
Serial.print("Humidity: ");
Serial.println(hdc.readHumidity());
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import board
import digitalio
from hdc1080 import HDC1080

# IO Enable Pin (only needed for senseBox MCU-S2)
io_enable_pin = digitalio.DigitalInOut(board.IO_POWER)
io_enable_pin.direction = digitalio.Direction.OUTPUT
io_enable_pin.value = False

# Initialize I2C bus
i2c = board.I2C()

# Initialize HDC1080 sensor
sensor = HDC1080(i2c)

while True:
temperature = sensor.temperature
humidity = sensor.humidity

print("Temperature: {:.2f} °C".format(temperature))
print("Humidity: {:.2f} %".format(humidity))

time.sleep(2) # Wait for 2 seconds before next reading
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
sidebar_position: 9
title: Temperatur- und Luftfeuchtigkeitssensor
hide_title: false
description: Temperatur- und Luftfeuchtigkeitssensor (HDC1080)
---

import ImageWithText from '@site/src/components/ImageWithText/ImageWithText'
import tempSensor from '@site/static/img/hardware-bilder/temperatur-luftfeuchte/sensor_temperatur_luftfeuchte.png'
import TutorialPorts from '@site/src/components/TutorialPorts/TutorialPorts'
import { useBoardStore } from '@site/src/lib/stores/store'
import { ProgrammingTabs } from '@site/src/components/ProgrammingTabs/ProgrammingTabs'

# Temperatur- und Luftfeuchtesensor

Der HDC1080 ist ein digitaler Feuchtigkeits- und Temperatursensor. Der Sensor hat eine hohe Genauigkeit und eine sehr geringe Stromaufnahme und passt dadurch ideal zur senseBox. Die Sensoren sind ab Werk kalibirert und können direkt eingesetzt werden.

<ImageWithText
src={tempSensor}
alt="Temperatur und Luftfeuchtigkeitssensor"
title="Temperatur und Luftfeuchtigkeitssensor"
/>

## Technische Information

- "Plug-in-and-Go" senseBox kompatibel
- Relative Luftfeuchte (RH) Betriebsbereich 0% bis 100%
- 14 Bit Messauflösung
- Relative Luftfeuchte Genauigkeit ±4%
- Temperatur Genauigkeit ±0.2°C
- 2100nA Stromzufuhr
- Betriebsspannung 2.7 V bis 5.5 V
- I2C Schnittstelle

## Anschluss

<TutorialPorts port="i2c" />

## Programmierung

<ProgrammingTabs
sensor="temperatur-luftfeuchte"
instructions={{
arduino: (
<>
<h3>Software Bibliothek</h3>
<p>Installiere die Adafruit HDC1000 Library.</p>
</>
),
circuitpython: (
<>
<p>Um den Sensor mit CircuitPython zu programmieren, muss die senseBox MCU-S2 zunächst mit CircuitPython geflasht werden. Eine Anleitung dazu findest du <a href="https://docs.sensebox.de/docs/editors/circuitpython/circuitpython_esp32">hier</a>.</p>
<h3>Software Bibliothek</h3>
<p>Lade dir die <a href="https://github.com/sensebox/CircuitPython_HDC1080/releases/download/1.0.0/circuitpython-hdc1080-9.x-mpy-1.0.0.zip">HDC1080 CircuitPython Bibliothek</a> herunter. Entpacke die .zip Datei und kopiere die <code>hdc1080.mpy</code> Datei aus dem <code>lib</code> Ordner in den <code>lib</code> Ordner deiner senseBox (<code>CIRCUITPY</code> Laufwerk).</p>
<h3>Code</h3>
<p>Mit dem CircuitPython Editor deiner Wahl kannst du nun den Sensor programmieren und seine Werte auslesen. Dieser Code gibt die Temperatur und die relative Luftfeuchte in der Konsole aus:</p>
</>
),
}}
/>

## Blockly


In Blockly kann der Sensor über folgenden Block ausgelesen werden:

![](/img/hardware-bilder/temperatur-luftfeuchte/block_temperatur_luftfeuchte.svg)

Im Block kannst du zwischen den verschiedenen Parametern des Temperatur und Luftfeuchtigkeitsensor auswählen:

- Temperatur in Grad Celsius (°C)
- Luftfeuchtigkeit in Prozent (%)


## Projekte

- #### [IoT Messstation](https://sensebox.de/projects/de/2024-01-10-iotmesstation_s2)

## Extras

> - [Shop](https://sensebox.kaufen/products/temperatur-luftfeuchtesensor)
> - [TI HDC1080 Datenblatt](https://www.ti.com/lit/ds/symlink/hdc1080.pdf)
2 changes: 1 addition & 1 deletion docs/products/bike/bike-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const MCUManager = () => {
<>
<div className="grid grid-cols-2 md:grid-cols-3 gap-4 py-8">
<NavBlocks
href="/docs/hardware/sensors/temperatur-luftfeuchte"
href="/docs/hardware/sensors/temperatur-luftfeuchte/temperatur-luftfeuchte"
title="Temperatur- und Luftfeuchtesensor"
/>
<NavBlocks
Expand Down
2 changes: 1 addition & 1 deletion docs/products/home/home-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const MCUManager = () => {
<NavBlocks href="/docs/hardware/bee/wifi-bee" title="Wifi-Bee" />
<NavBlocks href="/docs/hardware/bee/sd-bee" title="SD-Bee" />
<NavBlocks
href="/docs/hardware/sensors/temperatur-luftfeuchte"
href="/docs/hardware/sensors/temperatur-luftfeuchte/temperatur-luftfeuchte"
title="Temperatur- und Luftfeuchtesensor"
/>
<NavBlocks
Expand Down
13 changes: 13 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ const config = {
},
}
},
async function rawSourceLoaderPlugin(context, options) {
return {
name: 'raw-source-loader',
configureWebpack() {
return {
module: {
// import .py/.ino files as their raw text content instead of executing them
rules: [{ test: /\.(py|ino)$/, type: 'asset/source' }],
},
}
},
}
},
],
presets: [
[
Expand Down
23 changes: 12 additions & 11 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"$libs": ["src/libs"],
"$libs/*": ["src/libs/*"],
}
},
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"],
"exclude": ["node_modules", "**/node_modules", "dist"]
}

"compilerOptions": {
"baseUrl": ".",
"ignoreDeprecations": "6.0",
"paths": {
"@site/*": ["./*"],
"$libs": ["src/libs"],
"$libs/*": ["src/libs/*"]
}
},
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.jsx", "src/components/ui/tabs.tsx"],
"exclude": ["node_modules", "**/node_modules", "dist"]
}
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"crowdin:sync": "docusaurus write-translations && crowdin upload && crowdin download"
},
"dependencies": {
"@base-ui/react": "^1.7.0",
"@crowdin/cli": "^3.7.8",
"@docusaurus/core": "^3.6.3",
"@docusaurus/preset-classic": "^3.6.3",
Expand All @@ -38,11 +39,11 @@
"@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-tooltip": "^1.0.7",
"autoprefixer": "^10.4.17",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"eslint-config-prettier": "^9.1.0",
"framer-motion": "^11.0.25",
"lucide-react": "^0.344.0",
"lucide-react": "^1.38.0",
"phenomenon": "^1.6.0",
"postcss": "^8.4.35",
"prettier": "^3.2.5",
Expand All @@ -52,9 +53,11 @@
"react-dom": "^18.2.0",
"react-youtube": "^9.0.2",
"remark-collapse": "^0.1.2",
"tailwind-merge": "^2.2.1",
"shadcn": "^4.19.1",
"tailwind-merge": "^3.6.0",
"tailwindcss": "^3.4.1",
"tailwindcss-animate": "^1.0.7",
"tw-animate-css": "^1.4.0",
"zustand": "^4.5.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion sidebars/bikeSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const bikeSidebar = {
label: 'Sensoren',
key: 'bike-sensors',
items: [
"hardware/sensors/temperatur-luftfeuchte",
"hardware/sensors/temperatur-luftfeuchte/temperatur-luftfeuchte",
"hardware/sensors/mpu6050",
"hardware/sensors/feinstaub-sps30",
"hardware/sensors/distanz"
Expand Down
Loading