If you are not yet familiar with the Kniwellino device, you will find in this article a short introduction with the necessary craft stuff.
Why only check the weather with a BME280 sensor? Just put the fridge on and the Kniwwelino with the sensor inside - wait well - check fridge temperature (5 centigrade) with your measurement after (7.40 cenitgrade). Finished!
In addition to the typical BME280 information such as temperature, humidity and air pressure (height information omitted), a timestamp with date is also output on the integrated matrix.
PreparationFor this to succeed, a few steps of preparation are needed. First of all: Under Blockly, the I2C address (0x76) for the sensor is fixed. A change like in my case, is only possible via the Arduino IDE.
Check I2C addressSo check before deciding whether Blockly or Arduino IDE has which I2C address your sensor has (link to an I2C scanner) and match it with the Kniwwelino docu.
Install Board & LibsNow prepare the Arduino IDE with the necessary libraries once. Go for the most part as described here. Note that the information shown does not correspond to the most recent versions.
- Since the Kniwwelino belongs to the family of ESP8266 devices, insert the link as indicated and do not orient yourself on the screenshot.
- Type ESP into the search box of the Boards Manager window and not "kni" (for Kniwwelino).
- use the WeMos D1 and set the Flash Size to 4M (3M SPIFFS) or with Arduino IDE 1.8.5 you can use Lolin (WeMos) D1 R2 & mini.
- Installation of all necessary libraries
The following libraries are required to use the Kniwwelino Arduino Library:
- Adafruit GFX Library v1.2.2 https://github.com/adafruit/Adafruit-GFX-Library
- Adafruit NeoPixel v1.1.6 https://github.com/adafruit/Adafruit_NeoPixel
- ArduinoJson v5.11.1 https://github.com/bblanchon/ArduinoJson
- MQTT v2.3.1 https://github.com/256dpi/arduino-mqtt
- WiFiManager v0.12 https://github.com/tzapu/WiFiManager.git
- Time 1.5 https://github.com/PaulStoffregen/Time
- TimeAlarms 1.5 https://github.com/PaulStoffregen/TimeAlarms
- Timezone 1.1.1 https://github.com/JChristensen/Timezone
The example offered for the BME280 was probably programmed at night under the influence of lack of time ;-) and does not work right away: in addition to the fixed I2C address, there is still a small typo error in it and in principle little was documented. The map-command is here explained. If you look over it and look at the Kniwwelino library, you will quickly learn about other commands, such as using the timestamp with Kniwwelino.getTime(). A real time component is not included: rather, the time stamp is retrieved via NTP.
So I let myself be guided by the example and came to my code in the attachment.
Put all your components in this 3D printed box. Not tested.
Comments
Please log in or sign up to comment.