-
Datei
simpleELS_V1.ino
/************************************************************************************ * * Simple ELS V1.0.1 für ESP32 Dualcore * * (c)2021 Frohnix Bastelbude - Frank Frohnert * * Kommerzielle Verwendung/Nutzung & Verkauf ist ausdrücklich untersagt. * * Um die Software nutzen zu können muss die Arduino Library TMC5160 von tommag * installiert werden: * * https://github.com/tommag/TMC5160_Arduino * * und die ESP32 Encoder Library * https://github.com/madhephaestus/ESP32Encoder/ * * V1.0.1: * - "Zustellung" in "Vorschub" umbenannt * ******************************************************************
in „Elektronische Leitspindel "Simple ELS" - Frage zum code für den ESP32“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
rf69_tor_basic.ino
#include <RadioLib.h> #include <AceCRC.h> using namespace ace_crc::crc16ccitt_nibble; #define RF_PACKET_SIZE 16 // RF69 ESP8266 connections: // CS/NSS pin: D8 // DIO0 pin: D1 // RESET pin: D3 // SCK D5 // MOSI D7 // MISO D6 RF69 radio1 = new Module(D8, D1, D3); volatile bool receivedFlag = false; // we make a structure for all settings (in the full project we set this with MQTT-topic and JSON-stream from Host-Web-Server) struct setvals { int ontime =300; // holdtime for each relais (millisecs), its possible for a defined pulstime on the external gate control (you can change to longer) String sync
in „2-/3-fach kinetic switch an ESP8266 (Arduino)“ · Haus & Smart Home ·
-
Datei
Arduino_ImpulsCounterSimple.ino
unsigned long startTime; unsigned long endTime; void setup() { // put your setup code here, to run once: pinMode(10, INPUT); Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: while(digitalRead(12) == LOW); startTime = millis(); while(digitalRead(12) == HIGH); endTime = millis() - startTime; Serial.print("I received impuls with length in ms : "); Serial.println(endTime, DEC); }
in „Seltsames Verhalten bei Arbeit mit LevelShifter“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
fifo_5000_RP2040.ino
/* Den Eingangspegel an FIFO_IN um 5 ms verzoegert an FIFO_OUZ ausgeben. http://www.mino-elektronik.de Alle Angaben ohne Gewaehr ! 2022-07-21 */ #define FIFO_LEN 5000 // 5000 * 1 µs #define FIFO_IN 0 // Pin0 #define FIFO_OUT 1 // Pin1 uint8_t fifo[FIFO_LEN]; uint32_t fifo_index; void setup() { pinMode(FIFO_IN,INPUT); pinMode(FIFO_OUT, OUTPUT); } void loop(void) { delayMicroseconds(1); // durch genaue Verzoegerung mit externen Takt oder internen Timer ersetzen digitalWrite(FIFO_OUT,fifo[fifo_index]); // verzoegerten Wert schreiben fifo[fifo_index] = digitalRead(FIFO_IN); // neuen Wert lesen if(++
in „Schieberegister ersetzen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
MT174_Logger_OPEN.ino
/** * DTZ EEG Logger * Version 3.99 open for ISKRA MT174 * 11.09.2022 P. Rebesky * author Creator P.Rebesky * Copyright (©): 2020-2022 by Peter Rebesky * This code can use in private cases only. Every business or companies using of this codes or codes parts is required an approval of us (me) * Every private use can exchange some parts of code or modify some code-lines. This code can change for private use only. * This software is basicly owned by Peter Rebesky and any comercial use is forbidden without approval of us (me). **/ /** * DTZ EEG Logger * Version 4.04 for ISKRA MT174 * 27.08.2022 P.
in „Digitale Stromzähler auslesen und in DB speichern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lsatLED_mit_RC_test.ino
#include <FastLED.h> #include <RCSwitch.h> void setup() { // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: }
in „433 MHz Kommunikation ohne Interrupt“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_oct02e.ino
#include <Streaming.h> // die Lib findest du selber ;-) Print &cout = Serial; // cout Emulation für "Arme" extern "C" { unsigned geta(); unsigned getb(); } void setup() { Serial.begin(9600); cout << F("Start: ") << F(__FILE__) << endl; cout << F("geta adresse: ") << geta() << endl; cout << F("getb adresse: ") << getb() << endl; } void loop() { }
in „EEPROM per ISP mit Werten füllen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_oct06b.ino
#include <Streaming.h> // die Lib findest du selber ;-) Print &cout = Serial; // cout Emulation für "Arme" #include "test.h" char *getA(); char *getB(); void setup() { Serial.begin(9600); cout << F("Start: ") << F(__FILE__) << endl; cout << testStr << endl; cout << getA() << endl; cout << getB() << endl; } void loop() { }
in „Konstanten-Datei in C“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
20221011b-interrupt-Einspeise.ino
// Einspeisewechselrichter // https://www.etechnophiles.com/how-to-change-the-pwm-frequency-of-arduino-nano/ // TCCR2B = TCCR2B & B11111000 | B00000001; // for PWM frequency of 31372.55 Hz on D3 & D11 // https://www.arduino.cc/reference/de/language/functions/external-interrupts/attachinterrupt/ int lpumppin = 11; int dcdcanpin = 7; int modulationspin = 3; // OVLO mit Auszeit int drainpin = 6; int dcdcauspin = 4; unsigned long drainist; unsigned long drainstart; unsigned long drainvz = 10000; bool drain; bool ovlodrain; bool dcdcaus; // UVLO Batterie mit Hysterese int battpin = A0; unsigned long
-
Datei
sketch_oct07a.ino
#include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #define DISPLAY_I2C_ADDRESS 0x3C #define DISPLAY_WIDTH 128 #define DISPLAY_HEIGHT 64 Adafruit_SSD1306 display(DISPLAY_WIDTH, DISPLAY_HEIGHT, &Wire, -1); /*#include "Arduino.h" #include "SoftwareSerial.h" #include "DFRobotDFPlayerMini.h" SoftwareSerial mySoftwareSerial(10, 11); DFRobotDFPlayerMini myDFPlayer;*/ int motor = 6; int in1 = 9; int in2 = 8; int f = 0; int i = 0; void setup() { if (!display.begin(SSD1306_SWITCHCAPVCC, DISPLAY_I2C_ADDRESS)) { Serial.println("SSD1306 nicht gefunden"); for (;;); } /*if
in „DFPlayer Mini“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
20221014a-interrupt-Einspeise.ino
// Einspeisewechselrichter // https://www.etechnophiles.com/how-to-change-the-pwm-frequency-of-arduino-nano/ // TCCR2B = TCCR2B & B11111000 | B00000001; // for PWM frequency of 31372.55 Hz on D3 & D11 // https://www.arduino.cc/reference/de/language/functions/external-interrupts/attachinterrupt/ // https://www.mikrocontroller.net/topic/542674?page=3#7218665 int lpumppin = 11; int dcdcanpin = 7; int modulationspin = 3; // OVLO mit Auszeit int drainpin = 6; int dcdcauspin = 4; unsigned long drainist; unsigned long drainstart; unsigned long drainvz = 10000; bool drain; bool ovlodrain; bool dcdcaus; //
-
Datei
20221015b-interrupt-Einspeise.ino
// Einspeisewechselrichter // https://www.etechnophiles.com/how-to-change-the-pwm-frequency-of-arduino-nano/ // TCCR2B = TCCR2B & B11111000 | B00000001; // for PWM frequency of 31372.55 Hz on D3 & D11 // https://www.arduino.cc/reference/de/language/functions/external-interrupts/attachinterrupt/ // https://www.mikrocontroller.net/topic/542674?page=3#7218665 int lpumppin = 11; int dcdcanpin = 7; // OVLO mit Auszeit int drainpin = 6; int dcdcauspin = 4; unsigned long drainist; unsigned long drainstart; unsigned long drainvz = 10000; bool drain; bool ovlodrain; bool dcdcaus; // UVLO Batterie mit Hysterese
-
Datei
20221021b-interrupt-Einspeise.ino
// Einspeisewechselrichter // https://www.etechnophiles.com/how-to-change-the-pwm-frequency-of-arduino-nano/ // TCCR2B = TCCR2B & B11111000 | B00000001; // for PWM frequency of 31372.55 Hz on D3 & D11 // https://www.arduino.cc/reference/de/language/functions/external-interrupts/attachinterrupt/ // https://www.mikrocontroller.net/topic/542674?page=3#7218665 // OVLO mit Auszeit int drainpin = 6; unsigned long drainist; unsigned long drainstart; unsigned long drainvz = 10000; bool drain; bool ovlodrain; // UVLO Batterie mit Hysterese int elkoladepin = 5; int battpin = A0; unsigned long battist; unsigned
-
Datei
sketch_oct27a.ino
#include <Wire.h> #include "ledkey.h" constexpr byte addr = 0x40; LEDKey led {addr}; void setup() { Serial.begin(9600); led.begin(); led.pinOn(0); led.pinOn(1); led.pinOn(2); led.pinOff(3); } void loop(){}
in „mal wieder: Arduino Klasse in Klasse - bitte Hilfe!“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_nov21a.ino
#include <Wire.h> #include "RTClib.h" RTC_DS1307 rtc; #include <SD.h> #include <SPI.h> File myFile; int pinCS = 10; // Pin 10 auf Arduino Uno int temperatur = 20; int i = 0; void setup() { Serial.begin(9600); while (!Serial); if (! rtc.begin()) { Serial.println("Couldn't find RTC"); while (1); } rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); Serial.println("RTC adjusted!"); DateTime now = rtc.now(); String zeit = ((String) (now.year()) + (now.month()) + (now.day()) + (now.hour())); String wetterdaten= (String) temperatur + "|Temperatur"; pinMode(pinCS, OUTPUT); if (SD.begin()) { Serial.println("SD card
in „SD-KArte jede stunde einen Wert speichern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_nov21a.ino
#include <Wire.h> #include "RTClib.h" #include <SD.h> #include <SPI.h> #define pinCS 10 // Pin 10 auf Arduino Uno RTC_DS1307 rtc; File myFile; int temperatur = 20; DateTime now, last; TimeSpan ts; void setup() { // init UART Serial.begin(9600); while (!Serial); // init RTC if (!rtc.begin()) { Serial.println("Couldn't find RTC!"); while (1); } rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); Serial.println("RTC adjusted."); last = rtc.now(); // init SD card pinMode(pinCS, OUTPUT); if (SD.begin()) { Serial.println("SD card is ready to use."); } else { Serial.println("SD card initialization failed!"); while
in „SD-KArte jede stunde einen Wert speichern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
WebLogMinExmpl.ino
// benoetigte Lib: // * "AsyncTCP" by dvarell // * "ESPAsyncWebServer" by lacamera #include <Arduino.h> //Server #include <WiFi.h> #include <WiFiClient.h> #include <AsyncTCP.h> #include <ESPAsyncWebServer.h> #include "index.h" //Web page header file // SD #include "FS.h" #include "SD.h" #include "SPI.h" #define PIN_CS 5 const int baudrate = 115200; const char* ssid = "ESPServ"; const char* password = "ESPtest"; AsyncWebServer server(80); IPAddress local_ip(192, 168, 1, 1); IPAddress gateway(192, 168, 1, 1); IPAddress subnet(255, 255, 255, 0); void SD_Init(void) { if(!SD.begin(PIN_CS)){ Serial.println
in „ESP32 Webserver Download Logfile von SD-Karte, Arduino“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Bosch_Athlet_DIY_240416.ino
/* this code is an aternative software for Bosch vaccuumcleaner, tested and working on the BCH6L2560 & BBH7360K model. Other Bosch models may work, but YOU must chek first if your hardware is supported ! We take no responsability at all for this code, use it on your own risk. Here you find basic schematics (uncomplete) and fotos…. https://www.mikrocontroller.net/topic/513088 Many thaks to Daniel F.(per48or) for programming with me Lena S.(lena_s) this piece of code to awaken this vaccuumclears again. */ // SET your Board to MiniCore ATmega328PB @ 8Mhz Internal, BOD=2.7V, no Bootloader // https://github.com
in „Bosch Athlet 25,2 V Akku 7 Stück Tauschen“ · Analoge Elektronik und Schaltungstechnik ·
-
Datei
Bosch_Athlet_DIY_240619.ino
/* this code is an aternative software for Bosch vaccuumcleaner, tested and working on the BCH6L2560 & BBH7360K model. Other Bosch models may work, but YOU must chek first if your hardware is supported ! We take no responsability at all for this code, use it on your own risk. Here you find basic schematics (uncomplete) and fotos…. https://www.mikrocontroller.net/topic/513088 Many thaks to Daniel F.(per48or) for programming with me Lena S.(lena_s) this piece of code to awaken this vaccuumclears again. */ // SET your Board to MiniCore ATmega328PB @ 8Mhz Internal, BOD=2.7V, no Bootloader // https://github.com
in „Bosch Athlet 25,2 V Akku 7 Stück Tauschen“ · Analoge Elektronik und Schaltungstechnik ·
-
Datei
BastelMotorSerialMess.ino
/* One Pole Motor - Field Coil - Rotor Coil - AS5600 hall encoder - current sensors ACS712x05B - L298 dual motor bridge - PiPico MCU 2024-07-09 ch */ // L298 pins #define EnA 16 #define EnB 17 #define In1 21 #define In2 20 #define In3 19 #define In4 18 // current sensors #define PIN_ROTORCURRENT A1 #define PIN_FIELDCURRENT A0 #define PIN_AS5600ANALOG A2 #define MySerial Serial // Serial1 is output for pipico debug probe float VALUE_field = 0; float VALUE_rotor = 0; float VALUE_angle = 0; void setFieldCoil(int16_t value) { if (value > 0) { digitalWrite(In1, LOW); digitalWrite(In2, HIGH); } else
-
Datei
sketch_feb26a.ino
#include <Wire.h> #include <SoftwareSerial.h> #include <LiquidCrystal_I2C.h> #define DEBUG true #define STARTUP true #define RX 10 //pin layout #define TX 11 // #define measureO A0// #define measureU A1// #define relay 8 // #define button 4 // #define dimmer 9 // SoftwareSerial Esp8266(RX, TX); String ssid = "FRITZ!Box 6591 Cable VW"; String pwd = "15974136204554170633"; int connectionId; bool skipWifiSetup = false; bool on = true;//is pump regulation turned on LiquidCrystal_I2C lcd(0x27, 16, 2); int displayPage; int disTimeout = 10000; //display timeout time in milliseconds unsigned long disTimer
in „HTML code not working on Ipad“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_feb26a.ino
#include <Wire.h> #include <SoftwareSerial.h> #include <LiquidCrystal_I2C.h> #define DEBUG true #define STARTUP true #define RX 10 //pin layout #define TX 11 // #define measureO A0// #define measureU A1// #define relay 8 // #define button 4 // #define dimmer 9 // SoftwareSerial Esp8266(RX, TX); String ssid = "FRITZ!Box 6591 Cable VW"; String pwd = "15974136204554170633"; int connectionId; bool skipWifiSetup = false; bool on = true;//is pump regulation turned on LiquidCrystal_I2C lcd(0x27, 16, 2); int displayPage; int disTimeout = 10000; //display timeout time in milliseconds unsigned long disTimer
in „HTML code not working on Ipad“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Lauflicht_Schweif_Begegungsmelder_Zeit.ino
#include <Adafruit_NeoPixel.h> #define PIN 6 //LED-Stripe #define NUMPIXELS 66 #define SENSORPIN1 A3 //Schalter hell #define SENSORPIN2 A5 //Schalter dunkel Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRBW + NEO_KHZ800); int Sensorstatus1 = 0; int Sensorstatus2 = 0; int a=0; int b=0; void setup() { pinMode(SENSORPIN1, INPUT); pinMode(SENSORPIN2, INPUT); digitalWrite(SENSORPIN1, LOW); //10KOhm-R digitalWrite(SENSORPIN2, LOW); //10KOhm-R pixels.begin(); } void EinschaltsequenzTag() { for(int i=-7; i<66; i++) { pixels.setPixelColor(i, pixels.Color(100,100,200,250)); // weiß wird hell dargestellt
in „Probleme mit High- und Low-Eingängen Arduino Nano“ · 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 ·
-
PDF
AP3019A-318144-1.pdf
oEDs, 188 200 212 mV FB TA=-40 C to 85 C FB Pin Bias Current IFB 35 100 nA Quiescent Current Q VFBV ,INo switching 1.5 2.5 3.2 mA Shutdown Quiescent Current ISHDN VCTRL=0V 2.0 4.0 6.0 µA Switching Frequency f 0.9 1.2 1.5 MHz Maximum Duty Cycle D 90 93 % MAX D=40% 550 Switch Current Limit (Note 3) ILIMIT
in „StepUp Regler mit wenig Aussenbeschaltung“ · Analoge Elektronik und Schaltungstechnik ·
-
PDF
UNI-T_210E_Modding_Part2.pdf
flash. Switch UT210E to ~V mode then plug in Arduino into the USB. Open the attached i2cArduino210E.ino sketch in Arduino IDE. Open Serial Monitor window (CTRL+SHIFT+M). Now upload the sketch. You should see your eeprom dump in Serial Monitor window. You better Copy/Paste it for backup. Now you must edit
in „UT210E Zangenmultimeter hacken“ · Analoge Elektronik und Schaltungstechnik ·
-
PDF
tsop752w.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 „Startzeit IR Empfänger“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
photodiode_frontends.pdf
5 (let’s just ignore REfor contribution from Q , wh1ch rises with ing C f0.5 pF overcomes C , and ino- now).TransistorQ faithfullytransmitsits frequency; it is much more benign than duces a 1.1 MHz 3 dB bandwidth overall. 1 emittercurrenttoitscollector,whilekeep- the e Namp problem with transimpedance
in „Photodioden-Frontend hohe Empfindlichkeit, mittlere Bandbreite?“ · Analoge Elektronik und Schaltungstechnik ·
-
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
GB_Geschenk_Abgespeckt_2sensoren.ino
/********************************************************************************** * Allgemeine Deklaration **********************************************************************************/ // Lautsprecherausgang const byte Ton = 0; // Analog-Pins 0, 1, 2, 3, 4, 5 const int TP1A = A0; const int TP1B = A1; const int TP2A = A2; const int TP2B = A3; const int TP3A = A4; const int TP3B = A5; int sensorValue1 = 0; int sensorValue2 = 0; int sensorValue3 = 0; int Kalibration1 = 0; int Kalibration2 = 0; int Kalibration3 = 0; /****************************************************************************
in „ADC mit ATmega8A“ · 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
WIFI-Kit-8-DateTime.ino
#include <ESP8266WiFi.h> #include "oled.h" #define SSID "Muschikatze" #define PASSWORD "Geheim" #define SERVER "ptb.de" // There are 2 different versions of the board // static OLED display=OLED(2,14,4); static OLED display=OLED(4,5,16); static WiFiClient client; static char buffer[200]; /** * Sammle eine Zeile Text ein. * Rufe diese Funktion wiederholt auf, bis sie true zurück gibt. Dann hast * du eine Zeile im Puffer. Wenn die Zeile nicht in den Puffer passt, wird * sie abgeschnitten. * * @param source Der Quell-Stream. * @param buffer Der Ziel-Puffer, muss bereits mit '\0' terminiert sein. *
in „Zeitschaltuhr + PWM“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Mini-Cam-FTP-Timer-web.ino
#include <WiFi.h> #include <WiFiclient.h> #include "esp_camera.h" #define DEBUG #define DEBUG_FTP false // true #define DEBUG_CAM false // FTP-Userdaten direkt in Zeile 41 eintragen, also xxxx und yyyy anpassen // da wohl verschiedene Kameramodule im Umlauf sind ab Zeile 180 hmirror und vflip anpassen wenn das Bild falsch rum ist. // PIR-Cam ist das Modul mit PIR und OLED, M5Cam ist die kleine M5Stack-Cam, diese mit ESP32 Devkit ohne PSRAM compilieren. #define PIR_CAM // für M5Cam auskommentieren const char* ssid = "xxxxxxx"; const char* password = "yyyyyyyyy"; // DeepSleep Timer #define uS_TO_S_FACTOR
in „ov2640 Bild schießen und speichern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ESP8266_Robi_v2.ino
//*********************************************************************** //*** Programm-Version ************************************************ //*********************************************************************** #define PrgVer 1.00 // Datum: 2016-05-26 #define PrgVer 1.01 // Datum: 2016-05-27 // Debug-Meldungen abschaltbar #define PrgVer 1.02 // Datum: 2016-05-27 // Komplettüberarbeitung #define PrgVer 1.03 // Datum: 2016-06-03 // RSSI #define PrgVer 1.03 // Datum: 2016-06-03 // int statt char lesen // < 255 durch <= 255 ersetzt #define PrgVer 1.04 // Datum: 2016-06-17 // Anzeige Programm-Version
in „Automower G3 mit USB Diagnoseport fernsteuern?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
OLED_i2C_Test.ino
/* http://blog.simtronyx.de/ein-096-zoll-oled-display-i%C2%B2c-mit-128x64-pixel-und-ein-arduino/ geladen 06.05.2019 A4 (SDA) SDA A5 (SCL) SCL 5V VCC GND GND */ #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #define OLED_RESET 4 // not used / nicht genutzt bei diesem Display Adafruit_SSD1306 display(OLED_RESET); void setup() { // initialize with the I2C addr 0x3C / mit I2C-Adresse 0x3c initialisieren display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // random start seed / zufälligen Startwert für Random-Funtionen initialisieren randomSeed(analogRead(0)); } /
in „OLed Farbdisplay 128x64 mit 6 Pins“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Zx81_Debugger_debugger3.ino
// 2020 September, programmed by chris_ // // mcurses library for Arduino needed ( github ) // // you need a VT100 compatible terminal like minicom // // minicom -c on -b 115200 -D /dev/ttyACM0 #include "ZX81_debug_drv.h" // mcurses VT100 editor #include "hexedit.h" void Arduino_putchar(uint8_t c) { Serial.write(c); } char Arduino_getchar() { while (!Serial.available()); return Serial.read(); } /* The ZX81 saves data to tape by sending bursts of pulses, four pulses for a zero, and nine pulses for a one, each pulse being 150µS high and 150µS low, with a 1300µs low space between "bursts". So the
-
Datei
TCB_32Bit_Counter_Pulsweite.ino
/* Arduino IDE 1.8.13 AVR128DB48 Curiosity Nano Board https://github.com/SpenceKonde/DxCore 32Bit Counter Takteingang Pin PA4 Interruptmesspin für Oszi PB3 und PC3 */ #include <avr/io.h> #include <avr/interrupt.h> #include <util/atomic.h> volatile unsigned long countTimerTCB0; volatile unsigned long countTimerTCB1; volatile unsigned long countTimerCCMP_LSB; volatile unsigned long countTimerCCMP_MSB; volatile unsigned long countTimerTotal; volatile bool finishTCB0 = false; volatile bool finishTCB1 = false; void setup (void) { Serial1.begin(115200); // Package Pin 10/11 bzw. PC0/PC1, Tx/Rx Serial1
in „AVR128DB48 - TCB 32Bit Counter“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
OLED_LCD_Testcode_mit_Interrupt_Drehgeber.ino
/* This is an example of how to use the OLED 128x64 I2C with SSD1306 driver using the Adafruit library. It also applies to the 128x32 version, but not all components would fit the smaller screen. Pins: * GND = GND * VCC = 5V * SCL = A5 * SDA = A4 You can connect VCC to 3.3V to reduce the amount of high pitched noise that the display produces. It's a good idea to put a resistor between A4-5V and A5-5V to help stabilize the connection. What that does is pull-up the I2C pins to make it more reliable and prevents lock-ups. Libraries needed: https://github.com/adafruit/Adafruit_SSD1306 https://github.com
in „Arduino OLED Display hakt bei zu schneller Werteingabe“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
OLED_LCD_Testcode_mit_Interrupt_Drehgeber.ino
/* This is an example of how to use the OLED 128x64 I2C with SSD1306 driver using the Adafruit library. It also applies to the 128x32 version, but not all components would fit the smaller screen. Pins: * GND = GND * VCC = 5V * SCL = A5 * SDA = A4 You can connect VCC to 3.3V to reduce the amount of high pitched noise that the display produces. It's a good idea to put a resistor between A4-5V and A5-5V to help stabilize the connection. What that does is pull-up the I2C pins to make it more reliable and prevents lock-ups. Libraries needed: https://github.com/adafruit/Adafruit_SSD1306 https://github.com
in „Arduino OLED Display hakt bei zu schneller Werteingabe“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
MCnetCANBUS_reader_A4.ino
#include <stdint.h> #include "TouchScreen.h" #include <SPI.h> #include <Adafruit_GFX.h> #include "Adafruit_HX8357.h" #include <MCUFRIEND_kbv.h> #define TFT_RST 8 #define TFT_DC 9 #define TFT_CS 10 #define YP A1 #define XM A0 #define YM 28 #define XP 29 TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300); Adafruit_HX8357 tft = Adafruit_HX8357(TFT_CS, TFT_DC, TFT_RST); #include <Fonts/FreeSans9pt7b.h> #include <Fonts/FreeSans12pt7b.h> #include <Fonts/FreeSerif12pt7b.h> #include <FreeDefaultFonts.h> #include <Fonts/FreeSansBold18pt7b.h> #include <Fonts/FreeSansBold24pt7b.h> #define width 320 #define
in „CAN-Bus mit Arduino auswerten“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ESP8266_Robi_v2.ino
//*********************************************************************** //*** Programm-Version ************************************************ //*********************************************************************** #define PrgVer 1.00 // Datum: 2016-05-26 #define PrgVer 1.01 // Datum: 2016-05-27 // Debug-Meldungen abschaltbar #define PrgVer 1.02 // Datum: 2016-05-27 // Komplettüberarbeitung #define PrgVer 1.03 // Datum: 2016-06-03 // RSSI #define PrgVer 1.03 // Datum: 2016-06-03 // int statt char lesen // < 255 durch <= 255 ersetzt #define PrgVer 1.04 // Datum: 2016-06-17 // Anzeige Programm-Version
in „Automower G3 mit USB Diagnoseport fernsteuern?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ER-OLEDM015-1C.ino
/*************************************************** //Web: http://www.buydisplay.com EastRising Technology Co.,LTD Examples for ER-OLEDM015-1C Display is Hardward SPI 4-Wire SPI Interface Tested and worked with: Works with Arduino 1.6.0 IDE Test OK : Arduino DUE,Arduino mega2560,Arduino UNO Board ****************************************************/ /* == Hardware connection == OLED => Arduino *1. GND -> GND *2. VCC -> 3.3 *3. SCL -> SCK *4. SDA -> MOSI *5. RES -> 8 *6. DC -> 9 *7. CS -> 10 */ #include "OLED_Driver.h" #include "OLED_GFX.h" #include <SPI.h> #include <Wire.h> OLED_GFX oled = OLED_GFX
in „OLED ER-OLEDM015-1c“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
NRF24l01-Sender.ino
#include <Arduino.h> #include <SPI.h> #include <RH_NRF24.h> #include "LowPower.h" // Singleton instance of the radio driver RH_NRF24 nrf24; uint8_t pos = 4; uint8_t counter = 0; uint8_t chk = 0; void setup() { Serial.begin(9600); while (!Serial) ; // wait for serial port to connect. Needed for Leonardo only if (!nrf24.init()) { Serial.println("init failed"); } // Defaults after init are 2.402 GHz (channel 2), 2Mbps, 0dBm if (!nrf24.setChannel(3)) { Serial.println("setChannel failed"); } if (!nrf24.setRF(RH_NRF24::DataRate2Mbps, RH_NRF24::TransmitPower0dBm)) { Serial.println("setRF failed"); } Serial.println
in „Arduino mit NRF04l01 - Problem im PowerDown“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
AbsauganlageV2.11Nano.ino
// -- -- Abschaltautomatik -- -- // Anselm Hintermann // November 2020 // Version 2.1 // Arduino Nano // -- Einstellungen -- //Nachlaufzeiten in Millisekunden unsigned long NachlaufSaugerMaschine1 = 3000; unsigned long NachlaufSaugerMaschine2 = 3000; unsigned long NachlaufSaugerMaschine3 = 3000; unsigned long NachlaufSaugerMaschine4 = 3000; unsigned long NachlaufSaugerMaschine5 = 3000; unsigned long NachlaufVKlappeMaschine1 = 3000; unsigned long NachlaufVKlappeMaschine2 = 3000; unsigned long NachlaufVKlappeMaschine3 = 3000; unsigned long NachlaufVKlappeMaschine4 = 3000; unsigned long NachlaufVKlappeMaschine5
in „Absauganlage, Fehlersuche, Hallo“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Multi_DS18x20.ino
/* */ #include <OneWire.h> #include <DallasTemperature.h> // Taster der die Initialisierung auslöst ist an Pin 7 angeschlossen #define INIT_TAST 7 // Die Sensoren sind an Pin 4 angeschlossen #define ONE_WIRE_BUS 4 // Genauigkeit 11 Bit #define TEMPERATURE_PRECISION 11 // Maximale Anzahl Messtellen #define TEMPERATURE_ARR_SIZE 5 OneWire oneWire(ONE_WIRE_BUS); DallasTemperature sensors(&oneWire); DeviceAddress DS1820Address; // Speicher für die Messwerte float TemperatureArr[TEMPERATURE_ARR_SIZE]; // Speichert bei gültigem Index den Messwert ab void SetTemperature(uint8_t pos, float Temperature)