-
Datei
eventctrl_uc.ino
/* -------------------------------------------------------- eventb_ctrl6.ino Eventbasierendes System, hier ganz bewusst ohne Interrupts 11.05.2026 R. Seelig -------------------------------------------------------- */ #include <stdint.h> #include <ctype.h> #include <stdlib.h>
in „Schulnotenbewertung eines Arduino-Programms“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
TimerBug.ino
#include <util/atomic.h> #define AtomicSection ATOMIC_BLOCK(ATOMIC_RESTORESTATE) /* Arduino Mega2560 Timer 2: CTC, Mode 2 Pinouts >>> http://www.pighixxx.net/pinoutspg/boards/ Uno >>> http://www.pighixxx.net/portfolio-items/uno/?portfolioID=314 Mega2560 >>> http://www.pighixxx.net/portfolio-items/mega/?portfolioID=314 */ //const byte pin_T2 = 10; const byte pin_T2 = LED_BUILTIN; void setup(void) { Serial.begin(9600); pinMode(LED_BUILTIN, OUTPUT); pinMode(pin_T2, OUTPUT); Serial.print("OCR2A"); Serial.print('\t'); formatiere_Byte (OCR2A); Serial.print("OCR2B"); Serial.print('\t'); formatiere_Byte
in „Attiny13a stürzt ab“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
klimaanlage_1.ino
#include "esp_timer.h" #include "WiFi.h" #include "esp_now.h" #include <Preferences.h> Preferences preferences; typedef struct struct_message{ int id; int einspeise_leistung; int mittelwert_oben_links; int mittelwert_unten_links; int mittelwert_oben_rechts; int mittelwert_unten_rechts; } struct_message; struct_message myData; int32_t server_werte[5] = {0,0,0,0,0}; int64_t zeit_speicher[300]; int32_t index_1 = 0; bool m = 0; int32_t druck_zeiger = 0; int64_t aus_zeit = 0; byte inhalts_liste[288]; int32_t inhalts_index = 0; byte sende_schritt = 0; int64_t sende_start_zeit = 0; int64_t sende_ziel_zeit
in „Klimaanlage steuern in Abhängigkeit von PV-Leistung“ · Haus & Smart Home ·
-
Datei
klimaanlage_1.ino
#include "esp_timer.h" #include "WiFi.h" #include "esp_now.h" #include <Preferences.h> Preferences preferences; typedef struct struct_message{ int id; int einspeise_leistung; int mittelwert_oben_links; int mittelwert_unten_links; int mittelwert_oben_rechts; int mittelwert_unten_rechts; } struct_message; struct_message myData; int32_t server_werte[5] = {0,0,0,0,0}; int64_t zeit_speicher[300]; int32_t index_1 = 0; bool m = 0; int32_t druck_zeiger = 0; int64_t aus_zeit = 0; byte inhalts_liste[288]; int32_t inhalts_index = 0; byte sende_schritt = 0; int64_t sende_start_zeit = 0; int64_t sende_ziel_zeit
in „Klimaanlage steuern in Abhängigkeit von PV-Leistung“ · Haus & Smart Home ·
-
Datei
weichen_Test.ino
// ============================================================ // CONRAD WEICHEN-PRUEFGERAET // ARDUINO NANO // // PWM-WECHSELSPANNUNG UEBER DIE VORHANDENE BRUECKE // // Pin 3 = PWM // Pin 2 = Richtung / Polaritaet // // Die vorhandene Hardware erzeugt daraus: // // PWM + LOW // PWM + HIGH // // und damit eine Wechselspannung am Ausgang. // // ------------------------------------------------------------ // // A6 = Frequenz-Grundeinstellung // 50 ... 200 Hz // // A7 = Tastverhaeltnis // 25 ... 100 % // // A0 = EIN // A1 = AUS // // A2 = Frequenz PLUS // A3 = Frequenz MINUS // // + / - veraendert
-
Datei
Arduino_Sketch_.ino
Hier ist ein einfacher und effizienter Arduino-Sketch, der einen digitalen Eingang (Port) abfragt. Sobald dieser Port zum dritten Mal ein HIGH-Signal registriert hat, verzweigt das Programm in einen speziellen Code-Abschnitt.Damit ein einzelner Tastendruck nicht fälschlicherweise als Mehrfachklick gezählt wird, enthält der Code eine einfache Entprellung (Debounce), die darauf wartet, dass das Signal erst wieder LOW wird, bevor der nächste Impuls gezählt wird.cpp// Pin-Definitionen const int eingangsPin = 2; // Der Port, der abgefragt wird const int ledPin = 13; // Beispiel-Ausgang (Interne LED) // Variablen
in „Lichtschranken-Rundenzähler (12V).“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Logo-lesen.ino
/* ============================================================ ESP32-WROOM Siemens LOGO! 8 FS4 ============================================================ LOGO! IP-Adresse: 192.168.0.99 LOGO! Variable: VW0 S7-Adresse: DB1.DBW0 Kommunikation: S7 / ISO-on-TCP TCP Port 102 Rack 0 Slot 2 ESP32: Asynchroner Webserver Automatische LOGO!-Wiederverbindung VW0 wird alle 500 ms gelesen ============================================================ BENÖTIGTE LIBRARIES ============================================================ Settimino AsyncTCP ESPAsyncWebServer =============================================
in „mit ESP32 LOGO 8 VM Block lesen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ArduinoISP.ino
// ArduinoISP // Copyright (c) 2008-2011 Randall Bohn // If you require a license, see // https://opensource.org/licenses/bsd-license.php // // Note that this sketch refers to the SPI bus pins using the legacy MISO/MOSI // names rather than the modern CIPO/COPI names. // For further details, see https://docs.arduino.cc/learn/communication/spi // // This sketch turns the Arduino into a AVRISP using the following Arduino pins: // // Pin 10 is used to reset the target microcontroller. // // By default, the hardware SPI pins MISO, MOSI and SCK are used to communicate // with the target. On all Arduinos
in „Problem beim Hochladen zum Arduino Nano“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Reset_Toner_Chip_SP150.ino
with Arduino Uno R3 // Sources: // http://www.mikrocontroller.net/topic/369267 // AND // FILE: Reset.ino // AUTHOR: Ludovic Guégan adjusted for SP150 Viktor D. // VERSION: 0.2 // PURPOSE: Reset chip for Ricoh SP150 toner // DATE: 2026-03-016 // // Released to the public domain //Wirings: #include <Wire.h
in „Hack: Ricoh Aficio SP100e Toner Chip“ · Projekte & Code ·
-
Datei
I2CVersuch.ino
#include "NDP.h" #include <Wire.h> #define ESP_SLAVE_ADDR 0x42 volatile uint8_t matchToSend = 0; void sendit(char* label) { // LED blau bei Match nicla::leds.begin(); nicla::leds.setColor(blue); delay(200); nicla::leds.setColor(off); nicla::leds.end(); if (strcmp(label, "NN0:Helmet") == 0) matchToSend = 0x01; else if (strcmp(label, "NN0:Iron Man") == 0) matchToSend = 0x02; else if (strcmp(label, "NN0:Shutdown") == 0) matchToSend = 0x03; else if (strcmp(label, "NN0:Startup") == 0) matchToSend = 0x04; else if (strcmp(label, "NN0:Repulsor") == 0) matchToSend = 0x05; else if (strcmp(label, "NN0:Stones
-
Datei
I2CESP.ino
#include <Wire.h> #define NICLA_MASTER_ADDR 0x42 #define LED_PIN 2 #define I2C_SDA 19 #define I2C_SCL 16 volatile uint8_t lastMatch = 0; void receiveEvent(int howMany) { while (Wire.available()) { lastMatch = Wire.read(); if (lastMatch != 0) { digitalWrite(LED_PIN, HIGH); delay(150); digitalWrite(LED_PIN, LOW); delay(150); } } } void setup() { pinMode(LED_PIN, OUTPUT); digitalWrite(LED_PIN, LOW); Wire.begin(NICLA_MASTER_ADDR, I2C_SDA, I2C_SCL); Wire.onReceive(receiveEvent); } void loop() { // passiv warten }
-
Datei
BluetoothNiclaKannSenden.ino
#include <ArduinoBLE.h> BLEService testService("12345678-1234-1234-1234-1234567890ab"); BLEByteCharacteristic testChar( "87654321-4321-4321-4321-ba0987654321", BLERead | BLENotify ); uint8_t counter = 1; unsigned long lastSend = 0; void setup() { Serial.begin(115200); BLE.begin(); BLE.setLocalName("NiclaBLETest"); BLE.setAdvertisedService(testService); testService.addCharacteristic(testChar); BLE.addService(testService); testChar.writeValue((byte)0x00); BLE.advertise(); Serial.println("BLE Test Advertised"); } void loop() { BLE.poll(); BLEDevice central = BLE.central(); if (!central || !central.connected
-
Datei
BluetoothESPKAnnEmpfangen.ino
#include <ArduinoBLE.h> BLEDevice nicla; BLECharacteristic testChar; void setup() { Serial.begin(115200); while (!Serial); if (!BLE.begin()) { Serial.println("BLE init failed"); while (1); } Serial.println("ESP BLE scanning..."); BLE.scan(); // 🔥 DAS HAT GEFEHLT } void loop() { BLE.poll(); if (!nicla) { BLEDevice dev = BLE.available(); if (dev) { Serial.print("Found device: "); Serial.println(dev.localName()); if (dev.localName() == "NiclaBLETest") { Serial.println("Connecting to Nicla..."); BLE.stopScan(); if (dev.connect()) { Serial.println("Connected"); dev.discoverAttributes(); testChar = dev.characteristic
-
Datei
FunktionierendeSpamBluetooth.ino
#include "NDP.h" #include <ArduinoBLE.h> // BLE Service & Characteristic UUIDs BLEService matchService("12345678-1234-1234-1234-1234567890AB"); BLEByteCharacteristic matchChar("87654321-4321-4321-4321-BA0987654321", BLERead | BLENotify); volatile uint8_t matchID = 0; volatile bool matchPending = false; volatile int lastLabelIndex = -1; // letztes gesendetes Label merken // Alle Labels in Array definieren const char* labels[] = { "Combat", "Helmet", "Iron Man", "Repulsor", "Shutdown", "Startup", "Stones", "noise", "unknown" }; // Callback bei Match void sendMatch(int labelIndex) { // Nur neues Label
-
Datei
mit_ohne_analogRead.ino
void setup() { pinMode(PC13, OUTPUT); //pinMode(PA5, INPUT); } void loop() { digitalWrite(PC13, LOW); Serial.println("Tick"); delay(500); digitalWrite(PC13, HIGH); Serial.println("Tack"); //Serial.println(analogRead(PA5)); }
in „Warum ist die USB/CDC Implementierung der Cube HAL so groẞ?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ntc_cout_demo.ino
/* -------------------------------------------------------- ntc_cout_demo.cpp demonstriert die Verwendung eines abgepeckten cout in Verbindung mit einem NTC-Widerstand 07.03.2026 R. Seelig -------------------------------------------------------- */ #include <Arduino.h> #include "cout_light.h" #include "v003_adc.h" // Objektinstanz fuer cout_light cout_light<HardwareSerial> cout_serial(Serial); ADC ntc1(PD4); // und Umleiten auf den Namen "cout" ... :-) nicht ganz die feine Art #define cout cout_serial // mittels LookUp-Table Generator aus // www.jjflash.de/ntc_table_v2.html erzeugte Tabelle // und
in „CH32V003 und Arduino“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
OLED_Test_30032026.ino
#include "U8glib.h" // Konstruktor anpassen! (Beispiel für SSD1306 I2C) U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); void draw() { int sensorValue = analogRead(A0); // 1024.0 ist Korrektur für 0-5V Umrechnung float voltage = sensorValue * (5.0 / 1024.0); u8g.setFont(u8g_font_unifont); // Position für Legende setzen, drucken u8g.drawStr(2, 10, "Analogwert:"); // Position für Spannung U1 setzen, drucken u8g.setPrintPos(2, 30); u8g.print("U1: "); u8g.print(voltage); int sensorValue1 = analogRead(A1); // 1024.0 ist Korrektur für 0-5V Umrechnung float voltage1 = sensorValue1 * (5.0 / 1024.0); // Position
in „I2C Display einfache Frage“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
avr_adafruit_logodraw.ino
#include <Adafruit_GFX.h> #include <Adafruit_ST7735.h> #include <SPI.h> #define TFT_CS 10 // PB2 #define TFT_RST 6 // PD6 #define TFT_DC 7 // PD7 Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST); // RGB565 Farbpallete der "EGA"-Farben uint16_t egapalette [] = { 0x0000, 0x0015, 0x0540, 0x0555, 0xa800, 0xa815, 0xaaa0, 0xad55, 0x52aa, 0x52bf, 0x57ea, 0x57ff, 0xfaaa, 0xfabf, 0xffea, 0xffff }; /* ---------------------------------------------------------- rgbfromvalue Setzt einen 16-Bitfarbwert aus 3 einzelnen Farbwerten fuer (r)ot, (g)ruen und (b)lau zusammen. r,g,b : 8-Bit Farbwerte
in „Turtlegrafik: Interpreter, Creator & Designer“ · Projekte & Code ·
-
Datei
GPS_Time_Arduino.ino
// #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include <SoftwareSerial.h> #include <TinyGPSPlus.h> // OLED Display Einstellungen (128x64 Pixel über I2C) #define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 64 #define OLED_RESET -1 Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); // GPS Modul Pins (Rx=4, Tx=5 -> wir nutzen nur Rx an Pin 4 für GPS-TX) SoftwareSerial gpsSerial(4, 5); TinyGPSPlus gps; // Zeitzonen-Offset (z.B. +1 für MEZ / +2 für MESZ Sommerzeit) const int UTC_OFFSET = 2; void setup() { gpsSerial.begin(9600); // Standard-Baudrate der meisten
in „DCF-Uhr from Scratch“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
eventcb_ctrl6.ino
/* -------------------------------------------------------- eventb_ctrl6.ino Eventbasierendes System, hier ganz bewusst ohne Interrupts 11.05.2026 R. Seelig -------------------------------------------------------- */ #include <stdint.h> #include <ctype.h> #include <stdlib.h>
in „Schulnotenbewertung eines Arduino-Programms“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
BLE_Keyboard2.ino
/* Bluetooth BLE Keyboard Use an ESP32 as Bluetooth keyboard. The ESP is connected to the sender PC via USB and sends keystrokes by BLE. Minicom as Key sender: minicom -D /dev/ttyUSB0 Hardware: ESP32 WROOM Framework Arduino ESP32 Libraries needed: https://github.com/HijelHub/HijelHID_BLEKeyboard https://github.com/h2zero/NimBLE-Arduino Inspired from https://class.academany.org/futures/cybersecurity/2026/labs/isafjordur/students/hanndoddi/cyber-road/lapboard/ 2026-08-13 initial version, mchris */ #include <HijelHID_BLEKeyboard.h> HijelHID_BLEKeyboard keyboard; void setup() { Serial.begin(115200);
in „Remote Tastatur“ · Projekte & Code ·
-
Datei
Metalldetektor_b_Arduino.ino
#include <Wire.h> int value = 0; int value_max; long time_start; int impuls = 119; //select the pulse length depending on the frequency int measure_time = 0; int base = 0; void setup() { pinMode(A0, INPUT); pinMode(A1, INPUT); pinMode(8, OUTPUT); pinMode(A4, INPUT); pinMode(A5, OUTPUT); } void loop() { measure_time = analogRead(A4); // determining the measure-time between [0,1023] µsec digitalWrite(8,HIGH); // creating a pulse in the excitation coil with the duration = impuls µs delayMicroseconds(impuls); digitalWrite(8, LOW); value_max = 0; time_start = micros(); while(micros() - time_start <
in „Physikprojekte“ · Offtopic ·
-
Datei
BLE_Keyboard5.ino
/* Bluetooth BLE Keyboard - Deutsches Tastaturlayout (QWERTZ) ESP32 wird per USB an den Sender-PC angeschlossen und sendet Tastenanschlaege per BLE an den Ziel-Rechner. Benutzung mit minicom (Linux) als Sender: minicom -D /dev/ttyUSB0 Hardware: ESP32 WROOM Framework: Arduino ESP32 Bibliotheken: https://github.com/HijelHub/HijelHID_BLEKeyboard https://github.com/h2zero/NimBLE-Arduino 2026-08-17 mchris (Claude support), Version für deutsche Tastatur */ #include <HijelHID_BLEKeyboard.h> HijelHID_BLEKeyboard keyboard("ESP32 Tastatur", "Deutsch", 100); // Sendet einen Unicode-Codepoint so, dass am Host
in „Remote Tastatur“ · Projekte & Code ·
-
Datei
VeluxSender2.ino
// Fernbedienung für Velux WLC100 // LCD/Keypad Shield an D4 D5 D6 D7 D8 D9 und A0 // IR-Sendediode über Treibertransistor an D3 // 16MHz Keramikresonator oder Schwingquarz #include <LiquidCrystal.h> // ============================================================ // Globale Variablen // ============================================================ int m = 1; // welcher Motor des Fensters, 1-3 Manual, 4-6 = 1-3 Auto int f = 0; // welches Fenster, 0=All, 1-10 // ============================================================ // LCD 16x2 Keypad Shield // ==============================================
in „Velux WLC 100 durch Kleinsteuerung ersetzen“ · Haus & Smart Home ·
-
Datei
hp_signal_steuerung.ino
// Signalsteuerung Hp0 / Hp1 / Hp2 / Sh1 // Automatischer Fall auf Hp0 nach 3 Runden (2 Reedkontakte, Gruppensignal) // plus 4 manuelle Taster zur Signalwahl (Hp0 manuell = normaler Haltruf) // Arduino Nano const int S1_PIN = 2; // Reedkontakt 1 const int S2_PIN = 3; // Reedkontakt 2 const int BTN_HP0 = 4; // Taster Hp0 (Halt) const int BTN_HP1 = 5; // Taster Hp1 (Fahrt) const int BTN_HP2 = 6; // Taster Hp2 (Langsamfahrt) const int BTN_SH1 = 7; // Taster Sh1 (Rangierfahrt) const int LED_ROT1 = 8; const int LED_ROT2 = 9; const int LED_GRUEN = 10; const int LED_GELB = 11; const int LED_WEISS1 = 12
in „Lichtschranken-Rundenzähler (12V).“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
morse_esp32.ino
/* * ========================================================================== * Morse-Decoder / Morse-Geber für ESP32 mit SPI-TFT (ILI9341 / ST7735 / ST7789) * ========================================================================== * * Board : AZ-Delivery ESP32 DevKit V4 (ESP32-WROOM-32, ESP32-D0WD-V3, 4 MB Flash) * Display: 1,69" ST7789V2, 240x280 (Pins/Einstellungen aus PlatformIO-Projekt "Test ST7789") * Arduino-Board-Einstellung: "ESP32 Dev Module" (FQBN esp32:esp32:esp32) * * Funktionen * ---------- * DECODER : Morsetaste (Taster gegen GND) an GPIO 27. * - Entprellung in Software * -
in „Mit KI generierter CW-Decoder für ESP32“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Poti_16_Stufen.ino
/* Die Spannung eines Potis wird mit 16 abgestuften Spanungswerten 0 -> VCC am PWM-Ausgang ausgegeben; dazu muß ein RC-Filter ergaenzt werden. Die Stellung des Potis muß zuvor ueber 80 ms stabil sein und wird mit einer Hysterese ausgewertet, damit der Ausgangswert nicht 'wackelt'. Verwendete Hardware: Arduino UNO mit ATmega328 http://www.mino-elektronik.de Alle Angaben ohne Gewaehr ! 2025-10-17 */ #include <avr/io.h> #include <avr/interrupt.h> #include <stdlib.h> #define BIT(x) (1<<x) #define F_CPU 16000000L // 16MHz ggf. an eff.Frequenz anpassen #define T1_VORTEILER 8 #define PRO_SEKUNDE 100 /
in „Ich möchte aus einer Spannung einen binärcode erzeugen“ · Analoge Elektronik und Schaltungstechnik ·
-
Datei
Giga_008_Poti_Scala.ino
// Programm für Arduino Giga mit Bildschirm // Giga_008_Poti_Scala // LED_PR1 = D51/PE5, LED_PR2 = D40/PE6, PR1 = A11/PA0_C, PR2 = A10/PA1_C #include <Arduino_GigaDisplay_GFX.h> #include <Arduino_GigaDisplay.h> #include "Fonts/FreeMonoBold18pt7b.h" GigaDisplay_GFX display; // create the object #include <farbe16.h> #define PR1 A11 #define PR2 A10 #define LED_PR1 51 #define LED_PR2 40 #define DRE_A 35 #define DRE_B 36 #define DRE_KN 34 #define GIGA_RED 86 #define GIGA_GREEN 87 #define GIGA_BLUE 88 // Einstellungen für Scala und Rahmen #define SCALAEIN 0 // 1 = Scala eingeschaltet (Scala selbst, ohne
in „Arduino GIGA + GigaDisplay Scala Problem“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_mar14f.ino
struct TxBox { int x1, y1; //class/struct Point int x2, y2; //class/struct Point int upBorderAttr; int dwnBorderAttr; int txFieldAttr; }; TxBox tbox { x1: 0, y1: 0, x2: 40, y2: 10, upBorderAttr: 0x70, dwnBorderAttr: 0xae, txFieldAttr: 0x2e }; void ansiTxBox(const TxBox &box) { int x; x= box.x1; Serial.println("\n\r Nur eine Testausgabe \n\r"); } void setup() { Serial.begin(115200); tbox = { x1: 5, y1: 6, x2: 40, y2: 10, upBorderAttr: 0x70, dwnBorderAttr: 0xae, txFieldAttr: 0x2e }; tbox.x2 = 85; ansiTxBox(tbox); } void loop() { }
in „Arduino und struct gefallen sich nicht !“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
I2c_scanner.ino
/* I2C Scanner Boardeinstellung in Arduino IDE ESP32 Wrover Module Ergebnis 19.3.2026 Alle möglichen I2C pins probiert, kein Device Antwortet Scanning... No I2C devices found */ #include <Wire.h> //#define IIC_CLK 27 //#define IIC_DATA 25 //#define IIC_CLK 32 //#define IIC_DATA 33 #define IIC_CLK 18 #define IIC_DATA 23 #define GPIO_PA_EN 21 void setup() { Serial.begin(115200); pinMode(IIC_CLK, INPUT_PULLUP); // Force ESP32 internal pull-ups pinMode(IIC_DATA, INPUT_PULLUP); //pinMode(0, OUTPUT); digitalWrite(0, HIGH); // Boot0 to power ES8388 codec // Enable amplifier //pinMode(GPIO_PA_EN, OUTPUT
in „ESP32 WAV-Player: Praxiswert der CPU-Geschwindigkeit gesucht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Giga_009_Poti_Scala.ino
// Programm für Arduino Giga mit Bildschirm // Giga_009_Poti_Scala // LED_PR1 = D51/PE5, LED_PR2 = D40/PE6, PR1 = A11/PA0_C, PR2 = A10/PA1_C #include <Arduino_GigaDisplay_GFX.h> #include <Arduino_GigaDisplay.h> #include "Fonts/FreeMonoBold18pt7b.h" GigaDisplay_GFX display; // create the object #include <farbe16.h> #define PR1 A11 #define PR2 A10 #define LED_PR1 51 #define LED_PR2 40 #define DRE_A 35 #define DRE_B 36 #define DRE_KN 34 #define GIGA_RED 86 #define GIGA_GREEN 87 #define GIGA_BLUE 88 // Einstellungen für Scala und Rahmen #define SCALAEIN 0 // 1 = Scala eingeschaltet (Scala selbst, ohne
in „Lib für Arduino Giga machen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Giga_010_Poti_Scala.ino
// Programm für Arduino Giga mit Bildschirm // Giga_010_Poti_Scala // LED_PR1 = D51/PE5, LED_PR2 = D40/PE6, PR1 = A11/PA0_C, PR2 = A10/PA1_C // Arbeit mit class #include <Arduino_GigaDisplay_GFX.h> #include <Arduino_GigaDisplay.h> #include "Fonts/FreeMonoBold18pt7b.h" GigaDisplay_GFX display; // create the object #include <farbe16.h> #define PR1 A11 #define PR2 A10 #define LED_PR1 51 #define LED_PR2 40 #define DRE_A 35 #define DRE_B 36 #define DRE_KN 34 #define GIGA_RED 86 #define GIGA_GREEN 87 #define GIGA_BLUE 88 class Maxim_scala{ public: // Beschreibung von Konstruktor. xo,yo,xu,yu - äußere Maße
in „Lib für Arduino Giga machen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Giga_011_Poti_Scala.ino
// Programm für Arduino Giga mit Bildschirm // Giga_011_Poti_Scala // LED_PR1 = D51/PE5, LED_PR2 = D40/PE6, PR1 = A11/PA0_C, PR2 = A10/PA1_C // Arbeit mit class als Lib #include <Arduino_GigaDisplay_GFX.h> #include <Arduino_GigaDisplay.h> #include "Fonts/FreeMonoBold18pt7b.h" #include <Maxim_scala.h> #include <farbe16.h> #define PR1 A11 #define PR2 A10 #define LED_PR1 51 #define LED_PR2 40 #define DRE_A 35 #define DRE_B 36 #define DRE_KN 34 #define GIGA_RED 86 #define GIGA_GREEN 87 #define GIGA_BLUE 88 uint16_t WERT_L, WERT_R; long meintime = 0; int16_t zaehler = 0; long dauer = 0; #define SYMB_LINKE_ZAHL
in „Lib für Arduino Giga machen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Giga_012_Poti_Scala.ino
// Programm für Arduino Giga mit Bildschirm // Giga_012_Poti_Scala // LED_PR1 = D51/PE5, LED_PR2 = D40/PE6, PR1 = A11/PA0_C, PR2 = A10/PA1_C // Arbeit mit class als Lib, Variante mit Referenz // Sketch uses 160320 bytes (8%) of program storage space. Maximum is 1966080 bytes. // Global variables use 55336 bytes (10%) of dynamic memory, leaving 468288 bytes for local variables. Maximum is 523624 bytes. #include <Arduino_GigaDisplay_GFX.h> #include <Arduino_GigaDisplay.h> #include "Fonts/FreeMonoBold18pt7b.h" #include <Maxim_scala_ref.h> #include <farbe16.h> #define PR1 A11 #define PR2 A10 #define
in „Lib für Arduino Giga machen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Giga_011_Poti_Scala.ino
// Programm für Arduino Giga mit Bildschirm // Giga_011_Poti_Scala // LED_PR1 = D51/PE5, LED_PR2 = D40/PE6, PR1 = A11/PA0_C, PR2 = A10/PA1_C // Arbeit mit class als Lib, Variante mit Zeiger // Sketch uses 160320 bytes (8%) of program storage space. Maximum is 1966080 bytes. // Global variables use 55336 bytes (10%) of dynamic memory, leaving 468288 bytes for local variables. Maximum is 523624 bytes. #include <Arduino_GigaDisplay_GFX.h> #include <Arduino_GigaDisplay.h> #include "Fonts/FreeMonoBold18pt7b.h" #include <Maxim_scala.h> #include <farbe16.h> #define PR1 A11 #define PR2 A10 #define LED_PR1
in „Lib für Arduino Giga machen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Timer4_HighSpeed.ino
#include <arduino.h> byte intVar_OC4 = 61; void timer4_ctc_init(void); void setup() { // put your setup code here, to run once: Serial.begin(115200); Serial.println(F("HALLO")); pinMode(13,OUTPUT); digitalWrite(13,LOW); delay(1000); digitalWrite(13,HIGH); delay(1000); digitalWrite(13,LOW); delay(1000); digitalWrite(13,HIGH); timer4_ctc_init(); } void loop() { // put your main code here, to run repeatedly: if (Serial.available()>0) intVar_OC4 =Serial.parseInt(); OCR4C= intVar_OC4; Serial.println(intVar_OC4); delay(500); } void timer4_ctc_init(void) { PLLCSR=(1<<PINDIV) | (1<<PLLE) | (0<<PLOCK);
in „Wie baut man eine Endstufe für einen Mittelwellensender (160m Band)?“ · HF, Funk und Felder ·
-
Datei
Lambdacontroller_ai_claude_2.ino
#include <Arduino.h> #include <SPI.h> #include <avr/io.h> #include <util/delay.h> #include <avr/pgmspace.h> // ----------------------------- // Pin-Zuordnung MegaCore AT90CAN64 // ----------------------------- #define CJ125_CS_PIN 8 // PB0 #define HEATER_OUTPUT_PIN 12 // PB4, Low-Side MOSFET #define LED_ONOFF_PIN 15 // PB7 #define LED_STATUS_POWER 7 // PE7 #define LED_STATUS_HEATER 6 // PE6 #define UB_ANALOG_INPUT_PIN 48 // PF3 -> UBatt #define UR_ANALOG_INPUT_PIN 49 // PF4 -> UR #define UA_ANALOG_INPUT_PIN 50 // PF5 -> UA // ----------------------------- // CJ125 Register / Konstanten // ----
in „Bosch CJ125 mit AVR AT90CAN64“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_sep10a.ino
#include <SD.h> #include <Wire.h> #include <Adafruit_Sensor.h> #include <Adafruit_BME280.h> #include <TinyGPS++.h> // Pins definieren const int GPS_PPS_PIN = 2; // PPS-Signal vom GPS für Sekundentakt const int LICHTSCHRANKE_PIN = 3; // Signal von der Lichtschranke const int SD_CS_PIN = 10; // Chip Select für SD-Kartenleser // Speicher-Intervall für die Lichtschranke (jeder 1800. Impuls) const unsigned long SPEICHER_INTERVALL_IMPULSE = 1800; // Instanzen TinyGPSPlus gps; Adafruit_BME280 bme; // Volatile Variablen für die Interrupts volatile unsigned long ppsMicrosRef = 0; // Systemzeit der letzten GPS-Sekunde
in „Datenlogger Pendeluhr“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Programm_Taster_PD_5.ino
// Programm Taster PD5 // ESP32-S3 // Grundlage: Dannegger-Entprellung // 5 Taster / 5 Status-LEDs // 5 zusätzliche Test-LEDs // Kurzer Tastendruck: // Test-LED EIN // Langer Tastendruck: // Test-LED AUS // Taster LOW-aktiv // LED LOW-aktiv #define T1 17 #define T2 18 #define T3 3 #define T4 35 #define T5 21 // bisherige LEDs #define LED1 42 #define LED2 2 #define LED3 40 #define LED4 41 #define LED5 38 // zusätzliche Test-LEDs #define TEST1 14 #define TEST2 13 #define TEST3 10 #define TEST4 12 #define TEST5 11 const byte keyPins[5] = { T1, T2, T3, T4, T5 }; const byte ledPins[5] = { LED1, LED2,
in „Tastersteuerung nach Peter Dannegger“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_sep10a.ino
#include <SD.h> #include <Wire.h> #include <Adafruit_Sensor.h> #include <Adafruit_BME280.h> #include <TinyGPS++.h> // Pins definieren const int GPS_PPS_PIN = 2; // PPS-Signal vom GPS für Sekundentakt const int LICHTSCHRANKE_PIN = 3; // Signal von der Lichtschranke const int SD_CS_PIN = 10; // Chip Select für SD-Kartenleser // Speicher-Intervall für die Lichtschranke (jeder 1800. Impuls) const unsigned long SPEICHER_INTERVALL_IMPULSE = 1800; // Instanzen TinyGPSPlus gps; Adafruit_BME280 bme; // Volatile Variablen für die Interrupts volatile unsigned long ppsMicrosRef = 0; // Systemzeit der letzten GPS-Sekunde
in „Datenlogger Pendeluhr“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_oct23a.ino
#include <SPI.h> #include <SD.h> #include <Wire.h> #include <RTClib.h> #include <Adafruit_BME280.h> #include <TinyGPS++.h> // Pin-Konfiguration const int LIGHT_BARRIER_PIN = 2; const int RTC_SQW_PIN = 3; const int SD_CS_PIN = 10; // Sensor-, Uhr- und GPS-Objekte RTC_DS3231 rtc; Adafruit_BME280 bme; TinyGPSPlus gps; // Volatile Variablen für die Interrupts volatile unsigned long totalPulses = 0; volatile unsigned long ppsMicros = 0; volatile unsigned long currentRtcEpoch = 0; // Hilfsvariablen für die Datenübergabe aus dem Interrupt volatile unsigned long targetPulseNumber = 0; volatile unsigned
in „Datenlogger Pendeluhr“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_jan26e_minimal.ino
#include <avr/sleep.h> #include <avr/wdt.h> #include <util/atomic.h> #include <Streaming.h> // die Lib findest du selber ;-) Print &cout = Serial; // cout Emulation für "Arme" constexpr uint8_t LED_PIN = PB5; uint32_t wdt_ticks; int bufferSize; void setup() { Serial.begin(9600); bufferSize = Serial.availableForWrite(); cout << F("Start: ") << F(__FILE__) << endl; cout << F("bufferSize: ") << bufferSize << endl; DDRB = (1 << LED_PIN); //LED_PIN als Ausgang ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { wdt_reset(); WDTCSR |= (1 << WDCE) | (1 << WDE); WDTCSR = (1 << WDIE) | (1 << WDP2) | (1 << WDP1); // 1s } } void loop()
in „AVR: Watchdog löst keinen Interrupt aus“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Doorbell_attiny85-5v.ino
/*********************************************************** * _____ +-----\/-----+ * * RESET PB5 1 --|o |-- 8 Vcc * * | | * * XALT1 PB3 2 --| |-- 7 PB2 SCK SCL * * | ATTINY85 | * * XALT2 PB4 3 --| |-- 6 PB1 MISO DO * * | | * * GND 4 --| |-- 5 PB0 MOSI DI SDA * * +------------+ * * * * compiled with ATtiny Microcontrollers from * * David A. Mellis https://github.com/damellis/attiny * * * ***********************************************************/ #include <avr/sleep.h> #include <avr/power.h> #define PIN_LED PCINT0 // PIN 5 PB0 for debugging, remove later #define PIN_DOORBELL PCINT1 // PIN 6 PB1
in „Türklinger verstärken ohne elektrischen Eingriff in Hausanlage“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
_LiquidCrystal_PCF8574_Test.ino
// This example shows various featues of the library for LCD with 16 chars and 2 lines. #include <Arduino.h> #include <Wire1.h> #include <LiquidCrystal_PCF8574.h> LiquidCrystal_PCF8574 lcd(0x27); // set the LCD address to 0x27 for a 16 chars and 2 line display int show = -1; // 2 custom characters byte dotOff[] = { 0b00000, 0b01110, 0b10001, 0b10001, 0b10001, 0b01110, 0b00000, 0b00000 }; byte dotOn[] = { 0b00000, 0b01110, 0b11111, 0b11111, 0b11111, 0b01110, 0b00000, 0b00000 }; void showStatus(uint8_t data_){ Serial.print(" status==");Serial.print(data_);Serial.println(""); } void setup() { int error
in „TWI1 auf Atmega328PB schlägt fehl“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Kurz_und_knapp_copy_20251111A.ino
// Dateiname: Kurz_und_knapp_Jahr_Monat_Tag_lfd Buchstabe // // Arduino UNO SMD R3 und QHV5160 Version 1.0 E (TMC5160) über Spi-Schnittstelle // Letzte Änderung: 11.11.25 22:25 Uhr // Strom fliesst; keine Drehzahl //#include <arduino.h> #include <SPI.h> // Konstanten definieren // SPI Pins #define sck 13 //SPI clock #define mosi 11 //master transmit out slave receive input #define miso 12 //master receive input slave transmit out const int PIN_CS = 10; // Chip Select const int PIN_EN = 9; // Drive-Enable Lowaktiv // Variablen definieren uint32_t result; // Funktion: 32-Bit Register schreiben void
in „Arduino Uno mit QHV5160 über SPI keine Drehzahl“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
MSP3400_ATMEGA32_ADC_2.ino
#include <IRremote.hpp> #include <Wire.h> // --------------------------------------------------------- // PIN‑MAPPING (ELECTRONICFOX 2026(c), PORT‑BASIERT, ATmega32) // --------------------------------------------------------- // IR‑Empfänger: PB2 // Tasten: PB0, PD3, PD4, PD5 // Display‑Bus: CLK=PD2, DLEN=PB6, DATA=PB1 // Test/Power: TEST=PB5 // SC‑Out: SC=PD6 // Statusports: LED1=PC3=SUCHLAUF, LED2=PB4=MEMORY // PWM-DAC: PB3 (Timer0), PD7 (Timer2) // ADC: ADC2 (PA2), ADC3 (PA3) // --------------------------------------------------------- #define IR_RECEIVE_PIN PIN_PB2 // PB2 IR-Eingang // Display
in „Zeigt her eure Kunstwerke (ab 2023)“ · Projekte & Code ·
-
Datei
MSP3400_ATMEGA32_ADC_2.ino
#include <IRremote.hpp> #include <Wire.h> // --------------------------------------------------------- // PIN‑MAPPING (ELECTRONICFOX 2026(c), PORT‑BASIERT, ATmega32) // --------------------------------------------------------- // IR‑Empfänger: PB2 // Tasten: PB0, PD3, PD4, PD5 // Display‑Bus: CLK=PD2, DLEN=PB6, DATA=PB1 // Test/Power: TEST=PB5 // SC‑Out: SC=PD6 // Statusports: LED1=PC3=SUCHLAUF, LED2=PB4=MEMORY // PWM-DAC: PB3 (Timer0), PD7 (Timer2) // ADC: ADC2 (PA2), ADC3 (PA3) // --------------------------------------------------------- #define IR_RECEIVE_PIN PIN_PB2 // PB2 IR-Eingang // Display
in „AUDIOCONTROLLER MSP3400C einfach mit ATMEGA32 ansteuern“ · Projekte & Code ·
-
Datei
This_example_code_is_in_the_public.ino
This example code is in the public domain. https://docs.arduino.cc/built-in-examples/basics/Blink/ */ // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin LED_BUILTIN as an output. pinMode(LED_BUILTIN, OUTPUT); } // the loop function runs over and over again forever void loop() { digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) delay(50); // wait for a second digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW delay(400); // wait for a second }
in „Spannung an Ausgangs-Pin Arduino UNO“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ESP32_32E_Tasten_ok.ino
/* 2.8" ESP32-32E ILI9341 20-Tasten Touch Keyboard 16 normale Tasten + 4 Sondertasten Touch: XPT2046 / TFT_Touch Ausgabe: Display + Serial Basis: funktionierender Hersteller-Demo-Code */ #include <Arduino.h> #include "TFT_eSPI.h" #include <TFT_Touch.h> // ------------------------------------------------------------ // TOUCH-PINS – aus der funktionierenden Hersteller-Demo // ------------------------------------------------------------ #define RTP_DOUT 39 #define RTP_DIN 32 #define RTP_SCK 25 #define RTP_CS 33 #define RTP_IRQ 36 // ------------------------------------------------------------ //
-
Datei
sketch_sep10a_neu1.ino
#include <SD.h> #include <Wire.h> #include <Adafruit_Sensor.h> #include <Adafruit_BME280.h> #include <TinyGPS++.h> // Pins definieren const int GPS_PPS_PIN = 2; // PPS-Signal vom GPS für Sekundentakt const int LICHTSCHRANKE_PIN = 3; // Signal von der Lichtschranke const int SD_CS_PIN = 10; // Chip Select für SD-Kartenleser // Speicher-Intervall für die Lichtschranke (jeder 1800. Impuls) const unsigned long SPEICHER_INTERVALL_IMPULSE = 1; // Instanzen TinyGPSPlus gps; Adafruit_BME280 bme; // Volatile Variablen für die Interrupts volatile unsigned long ppsMicrosRef = 0; // Systemzeit der letzten GPS-Sekunde
in „Datenlogger Pendeluhr“ · Mikrocontroller und Digitale Elektronik ·