senseBox Blockly
senseBox-Logo
  1. ›
  2. Galerie

  3. ›
  4. SD-Speichern-Button

SD-Speichern-Button

Sensors
WIFI
ESPNOW
Ethernet
SD
LED
LED Matrix
Display
openSenseMap
LoRa
Aktivierung
Lora Message
TTN Mapper
Cayenne LPP
Bluetooth
Phyphox
Webserver
MQTT
Logic
Loops
Text
Time
Time control
RTC
NTP
Math
Audio
Variables
Functions
Advanced
Serial
Input/Output
Motors
Watchdog
Create file on SD-CardfilenameData.txt ▾Initialize DisplayButtonas Switch ▾Pin:on Board ▾true ▾= ▾true ▾Messung: booleanspeichern ▾create text withAirpressure/Temperature Sensor (DPS310)Value:Temperature in °C ▾Show Text/NumberFont colorWhite ▾Fontsize1x-Coordinates0y-Coordinates10ValueShow Text/NumberFont colorWhite ▾Fontsize1x-Coordinates0y-Coordinates0Valuebooleanspeichern ▾;Airpressure/Temperature Sensor (DPS310)Value:Temperature in °C ▾create text with Write Data to SD-Cardlinebreak✓Open a file from SD-CardData.txt ▾Print on displayInterval: Interval2000msPrint on displaysetbooleanspeichern ▾tofalse ▾Messung: booleanspeichern ▾create text withAirpressure/Temperature Sensor (DPS310)Value:Temperature in °C ▾Show Text/NumberFont colorWhite ▾Fontsize1x-Coordinates0y-Coordinates10ValueShow Text/NumberFont colorWhite ▾Fontsize1x-Coordinates0y-Coordinates0ValueClear DisplayPrint on displaysetbooleanspeichern ▾toifdoelseArduino run first:Arduino loop forever:
1113000100500100500100TitleUnitTitleUnit01505050150000000latitudelongitudealtitudepDOPfixType10110110001000000000101197011100110022010090
{ }
Arduino Source Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Code generated by senseBox Blockly on Fri May 30 2025 06:38:06 GMT+0000 (Coordinated Universal Time)
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h> // http://librarymanager/All#Adafruit_GFX_Library
#include <Adafruit_SSD1306.h> // http://librarymanager/All#Adafruit_SSD1306
#include <SD.h>
#include <JC_Button.h> // http://librarymanager/All#JC_Button
#include <Adafruit_DPS310.h> // http://librarymanager/All#Adafruit_DPS310
boolean speichern;
const long intervalInterval = 2000;
long time_startInterval = 0;
long time_actualInterval = 0;
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
File Data;
ToggleButton button_0(0);
Adafruit_DPS310 dps;
void setup() {
  display.begin(SSD1306_SWITCHCAPVCC, 0x3D);
<>
XML Blocks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<xml xmlns="https://developers.google.com/blockly/xml" board="null">
  <variables>
    <variable type="boolean" id="h]5+LB-F$K{BxB1pW-cZ">speichern</variable>
  </variables>
  <block type="arduino_functions" id="QWW|$jB8+*EL;}|#uA" deletable="false" x="132" y="151">
    <data>esp32</data>
    <statement name="SETUP_FUNC">
      <block type="sensebox_display_beginDisplay" id="}{OC2W~4:c[J9`JDkw2Y">
        <next>
          <block type="sensebox_sd_create_file" id="nXl!_`0X8=yb3Sgo/fUw">
            <field name="Filename">Data</field>
            <field name="extension">txt</field>
          </block>
        </next>
      </block>
    </statement>
    <statement name="LOOP_FUNC">
      <block type="controls_ifelse" id="uG[)*1LfXs/%%|?dfX9D">
        <value name="IF0">
          <block type="logic_compare" id="_s}.jc~-Y%.*]KERF@^S">
            <field name="OP">EQ</field>
            <value name="A">
              <block type="sensebox_button" id="!w9`0_D-mLOo9Boy`0$]">
                <field name="FUNCTION">toggleButton</field>
                <field name="PIN">0</field>
              </block>
            </value>
            <value name="B">
              <block type="logic_boolean" id="7HU(Pgyb=ZH!PiYMB#*e">
                <field name="BOOL">TRUE</field>
              </block>

Information about the Block

Select a Block to show the hint

This website uses cookies to enhance the user experience.
Impressum

|

Privacy

|

News

|

sensebox.de
Menu
    Blockly
    Tutorials
    Gallery
    Code Editor

    Login
    FAQ
    Settings

Which board are you using?

senseBox MCU

senseBox MCU-S2

senseBox MCU:mini

Here you can access the old blockly Version for the Arduino UNO or the senseBox MCU