-
Datei
OLED_Analogwert.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 u8g.drawStr(2, 10, "Analogwert:"); // Position für Spannung U1 setzen 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 für Spannung
in „I2C Display einfache Frage“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
bis6.ino
#include <CombiePin.h> #include <CombieTimer.h> #include <CombieTools.h> #include <CombieTypeMangling.h> using namespace Combie::Millis; using Taster = Combie::Pin::TasterGND<2>; // Taster zwischen Pin und GND(invertierend) using OutPin = Combie::Pin::OutputPin<13>; // Ausgang (nicht invertierend) using Counter = Combie::Tools::Counter<unsigned>; Counter counter; Taster taster; OutPin outPin; Combie::Timer::EntprellTimer entprell {20_MilliSekunden}; Combie::Tools::FlankenErkennung flankenerkennung; Combie::Timer::FallingEdgeTimer toff {1.5_Sekunden}; // abfallende Flanke wird verzoegert //Combie::
in „Monostufe mit Retrigger für Arduino“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
blink_forum.ino
#define LEDPIN PB1 void setup() { // put your setup code here, to run once: pinMode(LEDPIN, OUTPUT); } void loop() { // put your main code here, to run repeatedly: digitalWrite(LEDPIN,LOW); delay(1000); digitalWrite(LEDPIN,HIGH); delay(1000); }
in „py32v002A: Blink-Binary "gesucht"“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
event_ctrl.ino
/* -------------------------------------------------------- event_ctrl.ino Eventbasierendes System, hier ganz bewusst ohne Interrupts 03.05.2026 R. Seelig -------------------------------------------------------- */ #include "sn74hc595.h" /* --------------------------------
in „Schulnotenbewertung eines Arduino-Programms“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
event_ctrl.ino
/* -------------------------------------------------------- event_ctrl.ino Eventbasierendes System, hier ganz bewusst ohne Interrupts 03.05.2026 R. Seelig -------------------------------------------------------- */ #include "sn74hc595.h" /* --------------------------------
in „Schulnotenbewertung eines Arduino-Programms“ · Mikrocontroller und Digitale Elektronik ·
-
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
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
Melody_PROGMEM_all.ino
// **************************************************** // Melodien aus PROGMEM vom 27. 09. 2025 // **************************************************** const PROGMEM char title[] = { // List of text for melody-titles new 30.06.2025 - change number_mel too! "Asa Branca " // 1 Asa Branca 0 text-length 14 all titles full length "Take on me " // 2 Take on me "Starwars " // 3 Starwars "Cantina-Band " // 4 Cantina-Band "Game of Throne" // 5 Game of Thrones "Fuer Elise " // 6 Für Elise "Greensleeves " // 7 Greensleeves "Silent Night " // 8 Silent Night "Happy Birthday" // 9 Happy Birthday "Nokia Ringtone
in „Arduino Uno R4: Besonderheiten und Abhilfen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Serial_Test_4.ino
// // Serial-Test 01.10.2025 // void setup() { Serial.begin(19200); delay(1000); Serial.println("Test serielle Übertragung"); } bool rxStart = 0; bool data = 1; int contBytes = 0; int bufferMax = 0; int serData = 0; int count = 0; int bytes = 0; long timeout = 0; long baud = 0; unsigned long startMicros = 0; unsigned long contMicros = 0; unsigned long totalMicros = 0; unsigned long duration = 0; void loop() { while (Serial.available() || timeout) { if (!rxStart) { startMicros = micros(); } if (Serial.available()) { timeout = 10000; } byte y = Serial.available(); if (y > bufferMax) { bufferMax = y;
in „Arduino Uno R4: Besonderheiten und Abhilfen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Daten_Einlesen_Veit.ino
struct Daten { // static const byte READ_BUFFER_SIZE {20}; static const int READ_BUFFER_SIZE {15000}; // Datentyp und Arraygrösse geändert - Es sollen Dateien bis ca. 10 kB eingelesen werden. char rxBuffer [READ_BUFFER_SIZE + 1] {'\0'}; // Platz für 20 Zeichen + Null-Terminator //byte index {0}; int index {0}; // Datentyp aufgrund Puffergrösse geändert char c {'\0'}; }; Daten meinBuffer; int total = 0; void setup() { Serial.begin(19200); } void loop() { // liefert true wenn das LF eingelesen wurde if (readLine(Serial, meinBuffer)) { Serial.print("Eingelesen: "); Serial.println(meinBuffer.rxBuffer
in „Arduino Uno R4: Besonderheiten und Abhilfen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
IR_KL.ino.txt
// ATMEGA8 mit internen 8MHz-RC-Oszillator // PB0=PA-M104B1, PB1=PB-M104B1, PB2=PC-M104B1, PB3=PD-M104B1, PB4=HIFI-TO, PB5=STBY-M104B1 // PROGRAMM RUNTER PC0 vom ATMEGA8 // PROGRAMM RUNTER PC1 vom ATMEGA8 // LAUTSTÄRKE VERRINGERN PD6 vom ATMEGA8 // LAUTSTÄRKE ERHÖHEN PD5 vom ATMEGA8 // IN BEREITSCHAFT SCHALTEN PD4 vom ATMEGA8 // HIFI-Funktion PD3 vom ATMEGA8 // IR-Diode an PD7 vom ATMEGA8 #define DECODE_NEC #define DECODE_SONY #define DISABLE_CODE_FOR_RECEIVE_PROTOCOLS 1 #include <IRremote.hpp> #define IR_RECEIVE_PIN 7 // IR-Diode an PD7 vom ATMEGA8 // --- Zusätzliche Tastenpins --- #define BTN_PROG_MINUS
in „Alte VFD-Anzeige übrig, möchte gerne eine Uhr damit bauen“ · Analoge Elektronik und Schaltungstechnik ·
-
Datei
020_fmes2.ino
/* PIO frequency measurement 2025-10-21 mchris https://www.mikrocontroller.net/topic/580993#7954679 PIO Assembler: https://wokwi.com/tools/pioasm */ #include "fmes.pio.h" // Includes the compiled PIO assembly program for blinking #include <hardware/gpio.h> #include <hardware/pio.h> #include "hardware/clocks.h" #define TESTPIN 16 // Macro for frequency input // function to translate #if defined(ARDUINO_ARCH_MBED) #include <pinDefinitions.h> static int translate_pin(int pin) { return digitalPinToPinName(pin); } #else static int translate_pin(int pin) { return pin; } #endif static PIO pio; static
in „PiPico PIO programmieren“ · Mikrocontroller und Digitale Elektronik ·
-
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
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_sep21d.ino
#include "util/atomic.h" unsigned long mymillis = 0; int main (void) { const unsigned long eventInterval = 1000; unsigned long previousTime = 0; DDRB |= (1 << PB5); TCCR1B |= (1 << WGM12); // Configure timer 1 for CTC mode TIMSK1 |= (1 << OCIE1A); // Enable CTC interrupt OCR1A = 7999; // Set CTC compare value to 1 Hz at 8 MHz AVR clock , with a prescaler of 256 TCCR1B |= (1 << CS00); // Start timer at F_CPU /256 sei (); // Enable global interrupts while (1) { // Updates frequently unsigned long currentTime; ATOMIC_BLOCK(ATOMIC_RESTORESTATE) currentTime = mymillis; // This is the event if (currentTime
in „Versuch einer Millis Funktion für AVR“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Melody_ARM_aus_EEPROM_all.ino
// **************************************************** // Melodien aus EEPROM vom 27. 09. 2025 // **************************************************** const /*PROGMEM*/ char title[] = { // List of text for melody-titles new 30.06.2025 - change number_mel too! "Asa Branca " // 1 Asa Branca 0 text-length 14 all titles full length "Take on me " // 2 Take on me "Starwars " // 3 Starwars "Cantina-Band " // 4 Cantina-Band "Game of Throne" // 5 Game of Thrones "Fuer Elise " // 6 Für Elise "Greensleeves " // 7 Greensleeves "Silent Night " // 8 Silent Night "Happy Birthday" // 9 Happy Birthday "Nokia Ringtone
in „Arduino Uno R4: Besonderheiten und Abhilfen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_sep28d.ino
#include <Streaming.h> // die Lib findest du selber ;-) Print &cout = Serial; // cout Emulation für "Arme" // constexpr int melody[] // Globale Variablen verwenden 6744 Bytes // int melody[] // Globale Variablen verwenden 7080 Bytes const int melody[] // Globale Variablen verwenden 6744 Bytes { 1,4,6,8,22,5, 1,4,6,8,22,5, 1,4,6,8,22,5, 1,4,6,8,22,5, 1,4,6,8,22,5, 1,4,6,8,22,5, 1,4,6,8,22,5, 1,4,6,8,22,5, 1,4,6,8,22,5, 1,4,6,8,22,5, 1,4,6,8,22,5, 1,4,6,8,22,5, 1,4,6,8,22,5, 1,4,6,8,22,5, }; void setup() { delay(6000); Serial.begin(9600); cout << F("Start: ") << F(__FILE__) << endl; for(auto data: melody
in „Arduino Uno R4: Besonderheiten und Abhilfen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Beispiel_ESP32_ledc.ino
#include <Streaming.h> #include <ranges> constexpr unsigned milliSec {3}; constexpr bool DEBUG {false}; namespace MeineLed { constexpr unsigned frequency {5000}; // Hz constexpr unsigned resolution {10}; // Bit, 0...255 / 0...1023 /* const unsigned dimLed [] {0,0,0,0,0,0,0,0, 1,1,1,2,2,2,3,3,4,5,6,7,8,10,11,13,14,16,18,21,23,25,28,31,34, 37,40,43,47,51,55,59,63,67,72,77,82,87,93,98,104,110,116,123, 129,136,143,150,158,166,173,182,190,199,207,216,226,235,245,255}; */ const unsigned dimLed [] {0,0,0,0,0,0,0,0,1,1,1,2,2,3,3,4,5,6,7,8,9,10,11,13,14,16,18,19,21,23,26,28,30, 33,35,38,41,44,47,50,54,57,61,64,68,72,77,81,85,90,95,100,105,110,115,121
in „Arduino-ESP32 LEDC API ledcAttach() resolution“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
tssp960.pdf
PRODUCT LABEL (finished goods) PLAIN WRITING ABBREVIATION LENGTH Item-description - 18 Item-number INO 8 Selection-code SEL 3 LOT-/serial-number BATCH 10 Data-code COD 3 (YWW) Plant-code PTC 2 Quantity QTY 8 Accepted by ACC - Packed by PCK - Mixed code indicator MIXED CODE - Origin xxxxxxx+ Company logo
in „was ist das für ein Bauteil??“ · Analoge Elektronik und Schaltungstechnik ·
-
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
Arrduino_R4_Melodien_aus_EEPROM.ino
void melodie(){ // Play melody 1- number mel from external eeprom - new if (snd > 0){ // Melody not stopped ofset = (snd-1) * ((length*4) +15); // Offset = 0*50*2= 0, 1*50*2 = 100 integers! *2 -> *4 int ext_ee_adr = EXT_EE_MELODY_R+1 + ofset; // Address base + offset - ignore first byte which is the data-type - moved to here 26-09-2025 tempo=read_ext_eeprom(ext_ee_adr + 14); // Melody tempo starts at address +14 int wholenote = (60000 * 4) / tempo; // Calculate note (tempo is integer) int divider = 0, noteDuration = 0; // Clear divider and note duration divider=read_integer(ext_ee_adr+15+thisNote
in „Arduino Uno R4: Besonderheiten und Abhilfen“ · Mikrocontroller und Digitale Elektronik ·