-
Datei
CS5524_Skeletton_V2.ino
// Version 8, 09.04.2023 #include <LiquidCrystal_I2C.h> #include<SPI.h> #include <stdio.h> #define MOSI 11 #define MISO 12 #define SPICLOCK 13 #define CS 4 //CS byte clr; byte clr1; LiquidCrystal_I2C lcd(0x27, 20, 4); //Zuweisen Adresse (0x27); 20 (Stellen); 4 (Zeilen) byte counterStart = 131; // alternative: 6 unsigned int scaleFactor = 250; // alternative: 1000 //char spi_transfer(volatile char data) unsigned char spi_transfer(char data) { SPDR = data; // Start the transmission while (!(SPSR & (1<<SPIF))) // Wait the end of the transmission { }; clr = SPSR; clr = SPIF; return SPDR; // return the received
in „ADC CS5524 mit Atmega328“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_juli13b_Regent.ino
// Solar Warmwasserboiler Regent 1500W Stufen 240W / 360W / 480W #include <Wire.h> #include <LiquidCrystal_I2C.h> // A4=SDA, A5=SCL https://arduinogetstarted.com/tutorials/arduino-lcd-i2c LiquidCrystal_I2C lcd(0x27, 16, 2); //Brabander I2C address 0x27, 16 column and 2 rows int resetoutpin = 7; unsigned long startreset; unsigned long tagezaehler; int netzpin = 8; bool netzeingang; unsigned long netzeingangist; unsigned long netzeingangstart; unsigned long netzentprellt; // Insel int inselpin = 9; bool inselbetrieb; // Multivibrator / Taktgeber unsigned long mvstart; unsigned long mvist; unsigned long
in „Arduino nano arbeitet ohne Display nicht.“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_juli29a_Regent.ino
// Solar Warmwasserboiler Regent 1500W Stufen 240W / 360W / 480W #include <Wire.h> #include <LiquidCrystal_I2C.h> // A4=SDA, A5=SCL https://arduinogetstarted.com/tutorials/arduino-lcd-i2c LiquidCrystal_I2C lcd(0x27, 16, 2); //Brabander I2C address 0x27, 16 column and 2 rows int resetoutpin = 7; unsigned long startreset; unsigned long tagezaehler; bool eingephast = LOW; // Einphasungszeit für Wechselrichter unsigned long einphasungszeit = 900000; // 15 Minuten int synchronleistung = 210; // 70W*3=210W beim Einhpasen int netzpin = 8; bool netzeingang; unsigned long netzeingangist; unsigned long netzeingangstart
in „int und long miteinander verrechnen und int Resultat?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
NRF24_SendRcvMIesp.ino
/* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. Getestet auf ESP8266/ArduinoUNO. https://www.mikrocontroller.net/topic/525778 https://github.com/hm-soft/Hoymiles-DTU-Simulation Alle Einstellungen sind in Settings.h !! */ #include <stdint.h> #include <printf.h> #include <Arduino.h> #include <SPI.h> #include <RF24.h> #include <RF24_config.h> #include "Settings.h" #include "CircularBuffer.h" #include "hm_crc.h" #include "hm_packets.h" #include "Debug.h" #include "wifi.h" #include "mqtt.h" #ifdef ESP8266 #define DISABLE_EINT noInterrupts() #define ENABLE_EINT interrupts
in „Wechselrichter Hoymiles HM-xxxx 2,4 GhZ Nordic Protokoll?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
NRF24_SendRcvMIesp.ino
/* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. /* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. /* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. Getestet auf ESP8266/ArduinoUNO. https://www.mikrocontroller.net/topic/525778 https://github.com/hm-soft/Hoymiles-DTU-Simulation Alle Einstellungen sind in Settings.h !! */ #include <stdint.h> #include <printf.h> #include <Arduino.h> #include <SPI.h> #include <RF24.h> #include <RF24_config.h> #include "Settings.h" #include "CircularBuffer.h" #include "hm_crc.h"
in „Wechselrichter Hoymiles HM-xxxx 2,4 GhZ Nordic Protokoll?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
NRF24_SendRcvMIesp.ino
/* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. /* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. /* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. Getestet auf ESP8266/ArduinoUNO. https://www.mikrocontroller.net/topic/525778 https://github.com/hm-soft/Hoymiles-DTU-Simulation Alle Einstellungen sind in Settings.h !! */ #include <stdint.h> #include <printf.h> #include <Arduino.h> #include <SPI.h> #include <RF24.h> #include <RF24_config.h> #include "Settings.h" #include "CircularBuffer.h" #include "hm_crc.h"
in „Wechselrichter Hoymiles HM-xxxx 2,4 GhZ Nordic Protokoll?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
NRF24_SendRcvMIesp.ino
/* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. /* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. /* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. Getestet auf ESP8266/ArduinoUNO. https://www.mikrocontroller.net/topic/525778 https://github.com/hm-soft/Hoymiles-DTU-Simulation Alle Einstellungen sind in Settings.h !! */ #include <stdint.h> #include <printf.h> #include <Arduino.h> #include <SPI.h> #include <RF24.h> #include <RF24_config.h> #include "Settings.h" #include "CircularBuffer.h" #include "hm_crc.h"
in „Wechselrichter Hoymiles HM-xxxx 2,4 GhZ Nordic Protokoll?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
NRF24_SendRcvMIesp.ino
/* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. /* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. /* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. Getestet auf ESP8266/ArduinoUNO. https://www.mikrocontroller.net/topic/525778 https://github.com/hm-soft/Hoymiles-DTU-Simulation Alle Einstellungen sind in Settings.h !! */ #include <stdint.h> #include <printf.h> #include <Arduino.h> #include <SPI.h> #include <RF24.h> #include <RF24_config.h> #include "Settings.h" #include "CircularBuffer.h" #include "hm_crc.h"
in „Wechselrichter Hoymiles HM-xxxx 2,4 GhZ Nordic Protokoll?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
NRF24_SendRcvMIesp.ino
/* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. Getestet auf ESP8266/ArduinoUNO. https://www.mikrocontroller.net/topic/525778 https://github.com/hm-soft/Hoymiles-DTU-Simulation Alle Einstellungen sind in Settings.h !! */ #include <stdint.h> #include <printf.h> #include <Arduino.h> #include <SPI.h> #include <RF24.h> #include <RF24_config.h> #include "Settings.h" #include "CircularBuffer.h" #include "hm_crc.h" #include "hm_packets.h" #include "Debug.h" #include "wifi.h" #include "mqtt.h" #ifdef ESP8266 #define DISABLE_EINT noInterrupts() #define ENABLE_EINT interrupts
in „Wechselrichter Hoymiles HM-xxxx 2,4 GhZ Nordic Protokoll?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
NRF24_SendRcvMIesp.ino
/* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. Getestet auf ESP8266/ArduinoUNO. https://www.mikrocontroller.net/topic/525778 https://github.com/hm-soft/Hoymiles-DTU-Simulation Alle Einstellungen sind in Settings.h !! */ #include <stdint.h> #include <printf.h> #include <Arduino.h> #include <SPI.h> #include <RF24.h> #include <RF24_config.h> #include "Settings.h" #include "CircularBuffer.h" #include "hm_crc.h" #include "hm_packets.h" #include "Debug.h" #include "wifi.h" #include "mqtt.h" #ifdef ESP8266 #define DISABLE_EINT noInterrupts() #define ENABLE_EINT interrupts
in „Wechselrichter Hoymiles HM-xxxx 2,4 GhZ Nordic Protokoll?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
NRF24_SendRcvMIesp.ino
/* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. Getestet auf ESP8266/ArduinoUNO. https://www.mikrocontroller.net/topic/525778 https://github.com/hm-soft/Hoymiles-DTU-Simulation Alle Einstellungen sind in Settings.h !! */ #include <stdint.h> #include <printf.h> #include <Arduino.h> #include <SPI.h> #include <RF24.h> #include <RF24_config.h> #include "Settings.h" #include "CircularBuffer.h" #include "hm_crc.h" #include "hm_packets.h" #include "Debug.h" #include "wifi.h" #include "mqtt.h" #ifdef ESP8266 #define DISABLE_EINT noInterrupts() #define ENABLE_EINT interrupts
in „Wechselrichter Hoymiles HM-xxxx 2,4 GhZ Nordic Protokoll?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
NRF24_SendRcvMIesp.ino
/* die orig. SW ist vom Hubi, wurde von mir(Ziyat T.) für den MI-WR abgeaendert. Getestet auf ESP8266/ArduinoUNO. https://www.mikrocontroller.net/topic/525778 https://github.com/hm-soft/Hoymiles-DTU-Simulation Alle Einstellungen sind in Settings.h !! modiefied 2022/08/31 JR */ #include <stdint.h> #include <printf.h> #include <Arduino.h> #include <SPI.h> #include <RF24.h> #include <RF24_config.h> #include "Settings.h" #include "CircularBuffer.h" #include "hm_crc.h" #include "hm_packets.h" #include "Debug.h" #include "wifi.h" #include "mqtt.h" #ifdef ESP8266 #define DISABLE_EINT noInterrupts() #define
in „Wechselrichter Hoymiles HM-xxxx 2,4 GhZ Nordic Protokoll?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
HIPP_TIMER_V1.02.ino
// Test Program to evaluate T1 Capture performance // Input configured for falling edge detection // Application Requirement Range is 1ms-10s // T1 clocked at 16MHz // Capture input (coupled with 4n7 and 1K Pullup) // Input using D8 (PB ) pin // Calibrated TTL Test Generator with // 0.1Hz-100kHz Output range // // 24-01-24 V1.02 const unsigned long period = 1000; // RESULTS INTERVALL const unsigned long period2 = 25; // ADC READ RATE unsigned long startMillis; unsigned long startMillis2; unsigned long currentMillis; #define ICP_INPUT 8 void setup() { pinMode(ICP_INPUT, INPUT_PULLUP); startMillis
in „AVR T1 Capture Problem - Meinung erbeten“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Timer1_25kHz.ino
/* IDE 1.8.19 Arduino Mega2560 & UNO (wobei UNO nicht getestet) */ #include <Streaming.h> // https://github.com/janelia-arduino/Streaming Stream &out {Serial}; const byte pinFan {11}; void setup(void) { Serial.begin(250000); Serial.println(F("\nuC Reset ####\n")); //readT1Register(Serial); // Debug resetTimer1(); //readT1Register(Serial); // Debug initPwmPin(pinFan); //readT1Register(Serial); // Debug initTimer1To25kHz(); //readT1Register(Serial); // Debug changeT1Duty(pinFan, 33); // Pin, Duty [%] //readT1Register(Serial); // Debug } /* Default TCCR1A 1010.0001 // COM1A1, COM1B1, WGM10 (Clear
in „AVR Timer1 Capture und Overflow gleichzeitig“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
eFSB_Display_hd44780.ino
#include <Wire.h> // Wire Bibliothek einbinden #include <LiquidCrystal_I2C.h> // Vorher hinzugefügte LiquidCrystal_I2C Bibliothek einbinden LiquidCrystal_I2C lcd(0x27, 16, 2); //Hier wird festgelegt um was für einen Display es sich handelt. In diesem Fall eines mit 16 Zeichen in 2 Zeilen und der HEX-Adresse 0x27. Für ein vierzeiliges I2C-LCD verwendet man den Code "LiquidCrystal_I2C lcd(0x27, 20, 4)" int PWM = 9; void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); pinMode(LED_BUILTIN, OUTPUT); lcd.init(); //Im Setup wird der LCD gestartet lcd.backlight(); //Hintergrundbeleuchtung
in „Mit Wire.h über I2C auf LCD-Display 1602 zugreifen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
MQTT-Client-Broker-OTA_pub.ino
//MQTT Broker with DoorbellButton input at IO4 and OTA //For the first time you must program via COMx: //Afterwards you can chage the program port to the network adress wich //is reported at line 38 to the serial monitor #include <Arduino.h> #include <PicoMQTT.h> #include <WiFi.h> #include <HTTPClient.h> //OTA Includes and definitions ############################ #include <ArduinoOTA.h> const char* ssid = "SSID"; const char* password = "PASSWORD"; //OTA ##################################################### PicoMQTT::Server mqtt; unsigned long timeout = millis(); int greeting_number = 1; const int
in „ESP32-MQTT-Client-Broker-OTA“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
RB_DCC_Sniffer_v2.ino
/////////////////////////////////////////////////////// // // DCC packet analyze: Ruud Boer, October 2015 // DCC packet capture: Robin McKay, March 2014 // ------------------------------------------------------- // Version 2.0: Jürgen Winkler, March 2016 // - improve accessory decoder packet handling // - improve detection of repeated = same packets // - corrected display of on/off for basic accessory decoder packets // - add hexdecimal output format for packets // - packet output format may be selected using keyboard commands (bin,hex,both,none) // - display of idle packet may be toggled using
in „DCC Singal auslesen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Temperatur_DS18B20.ino
/** * Temperature monitor for DS18B20 (Dallas) or similar one (like DS18S20) * supported 1 until 4 sonsors (more is possible by changing code-lines) * target: ESP8266, especially Kit-8 type * written by Peter Rebesky, February 2023 * Copyright (©): 2023 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 using can exchange some parts of code or modify some code-lines. This code is allowed change for private use only. * This software is basicly owned by Peter Rebesky and any
in „ESP Temperaturmodul mit DS18B20 und Web-Ansicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_Tor1_Garage_neu.ino
#include <Servo.h> Servo myServo; // Erstelle ein Servo-Objekt int potPin = A0; // Pin, an dem das Potentiometer angeschlossen ist int servoPin = 9; // PWM-Pin, an dem das Servo angeschlossen ist int inputPin = 7; // Pin, an dem das Eingangssignal angeschlossen ist int outputPin = 8; // Pin, an dem der Zustand des Servos angezeigt wird int potValue; // Variable zum Speichern des Potentiometerwertes int targetAngle; // Variable zum Speichern des Zielwinkels int currentAngle = 0; // Variable zum Speichern des aktuellen Winkels const int totalTravelTime = 2000; // Gesamtzeit für die Bewegung in Millisekunden
in „Schaltungsproblem oder Arduinoproblem“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
LED_2_Schalter_hell_dunkel.ino
#include <Adafruit_NeoPixel.h> #define NEOPIXEL_PIN 6 // Datenausgang für LEDs #define NUMPIXELS 66 // Anzahl der LEDs #define SENSORPIN1 A3 // Schalter hell #define SENSORPIN2 A5 // Schalter dunkel #define INPUT1 (1<<0) // Bitmuster für Codeauswertung #define INPUT2 (1<<1) // Bitmuster für Codeauswertung #define INPUT12 (INPUT1 | INPUT2) // Bitmuster für Codeauswertung, beide Eingänge Adafruit_NeoPixel pixels(NUMPIXELS, NEOPIXEL_PIN, NEO_GRBW + NEO_KHZ800); int code, flanke; int code_old; bool led_active = false; void setup() { pinMode(SENSORPIN1, INPUT); pinMode(SENSORPIN2, INPUT); pixels.begin();
in „Probleme mit High- und Low-Eingängen Arduino Nano“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
tsop62.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 „IR Sensor gesucht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
tiny_oled_spi_3wire_b.ino
/* --------------------------------------------------------------------- tiny_oled_spi_3wire.ino Demoprogramm zum Anbinden eines SSD1306 OLED-Displays mit nur 3 benoetigten I/O Leitungen des ATtiny-Controllers. Demoprogramm hier fuer ATtiny44/84. Programm sollte durch Abaenderung der Anschlusspins
in „ATtiny85 benötige Taster und kein freier Port“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
Osram_Oslon_SSL_Hyper_Red_400mW.pdf
R H Opctor 0219 D)D/ vi h e /0 % RA ondu :210 4 ( 000 lat arceaegd 0 ˚C OS e i CHNO H123 T:2 Ni s InO RS % r ik0 a f<3 S P)BA 23G ()Q IO ntaS IC T <9 d poea n so r ). ou r r ( NO: 25 U Tg c SE ND U a d jcin ( d ign ˚ ,o co de 2 H Houou rrs TLOT 0014 M A s baR I OE ˚C su ess con ± 5 ate e 7 48 4 HH ou
in „Eagle lbr für Osram Oslon SSL (überprüfung)“ · Platinen ·
-
Datei
HMC5883L_SpeedTest2.ino
#include <Wire.h> #define MAG_ADDRESS ((char) 0x1E) uint8_t mag_buffer[6], mag_status; int16_t mag_raw[3]; long start_time = 0; long previous_time = 0; long loop_duration = 0; void setup() { Serial.begin(115200); Serial.println("Initializing..."); Wire.begin(); configMag(); previous_time = micros(); } void loop() { start_time = micros(); loop_duration = start_time - previous_time; mag_status = readStatus(); if (mag_status & 0x01) { readMag(); Serial.print(mag_raw[0], DEC); Serial.print(","); Serial.print(mag_raw[1], DEC); Serial.print(","); Serial.print(mag_raw[2], DEC); Serial.print(",$"); Serial.print
in „Strommessung am Kabel“ · Analoge Elektronik und Schaltungstechnik ·
-
Datei
Useles_Box_final_random_oft_test.ino
#include <Servo.h> #include <avr/sleep.h> Servo myservo2; // create servo object to control a servo Servo myservo1; int pos = 0; // variable to store the servo position int boxon = 1; int randomein = 0; // Predefined positions for a spesific box/servo int S1fra = 1400; // from s1=Servo1 int S1mid = 1800; // Mid int S1mid2 = 1580; int S1mid3 = 1640; int S1til = 2050; // To int S2fra = 1784; //From s2=Servo2 int S2mid = 1200; int S2mid2 = 1000; // Almost on the switch int S2til = 770; int seq = 0; void setup() { myservo2.attach(13); // attaches the servo on pin 13 to the servo object (PB5) myservo1
in „Promgrammfehler in Arduino“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Useles_Box_final_random_oft_und_ablauf.ino
#include <Servo.h> #include <avr/sleep.h> Servo myservo2; // erzeugt ein Servoobjekt Servo myservo1; int pos = 0; // variable um die Servoposition zu speichern int boxon = 1; int pin = 5; //Schalter an Pin 5 angeschlossen int randomein = 0; //Variable für Randomschalter(nicht unbedingt benötigt) // Vordefinierte Positionen für die spezielle Box/Servo int S1fra = 1400; // von s1=Servo1 int S1mid = 1800; // Mitte int S1mid2 = 1580; int S1mid3 = 1640; int S1til = 2050; // zu int S2fra = 1784; //von s2=Servo2 int S2mid = 1200; int S2mid2 = 1000; // Fast am Schalter int S2til = 770; int seq = 0; void
in „Servomotor dreht in die falsche Richtung“ · 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
Zx81_Debugger_LineOut_test.ino
#include "ZX81_debug_drv.h" void setup() { pinMode(LED_BUILTIN, OUTPUT); setDebugBusActive(); } #define VERZ 1 void loop() { /* > Die Frage ist: kann man die auch aktiv zurück setzen? OUT 0FEh startet VSync und setzt CAS low. IN 0FEh auch, aber dabei liest man auch noch die Tastatur ein. OUT 0FFh beendet VSync und setzt CAS high. */ Z80_out(0xFE,0);// data lines are not used delay(VERZ); Z80_out(0xFF,0);// data lines are not used delay(VERZ); }
-
Datei
Zx81_Debugger_LineOut_test.ino
// 2020, programmed by chris_ #include "ZX81_debug_drv.h" /* 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 ZX81 expects to see a continuous low, with alternating high going pulses. A very simple setup with (variable, as sending zero's takes less time ) low speed, (an average of just 300 bps) but with just 1K to max 16K of RAM slowness doesn't matter much. */ // tbd: check polarity! void tapeSendPulse() { Z80_in(0xFE); delayMicroseconds(150); Z80
-
Datei
EEPROM-Werte-Speichern_Tisch_20200129b.ino
/* #include <EEPROM.h> int drehungenende = 1200; // Maximale Tischhöhe 118cm Hub 55cm int drehungenlinks; int drehungenrechts; void setup() { drehungenlinks = drehungenende; drehungenrechts = drehungenende; EEPROM.put( 0, drehungenlinks); EEPROM.put(2, drehungenrechts); } void loop() { }*/ #include <EEPROM.h> int drehungenende = 1200; // Maximale Tischhöhe 118cm Hub 55cm int mp = 13; // Messpunkt mit LED int drehungenlinks; int drehungenrechts; void setup() { pinMode(mp,OUTPUT); EEPROM.get(0, drehungenlinks); EEPROM.get(2, drehungenrechts); } void loop() { if(drehungenlinks == drehungenrechts)
in „Arduino put() get() ein ppar Fragen dazu.“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
EEPROM-Werte-Speichern_Tisch_20200129c.ino
#include <EEPROM.h> int bandgappin = A4; int bandgapzahl; bool spggut; bool spgguta; bool spggutflanke; bool led; //led MF zur Sichtkontrolle unsigned long ledstart; unsigned long ledist; unsigned long ledvz = 200; int mp = 13; // Messpunkt, LED int drehungenende = 1200; // Maximale Tischhöhe 118cm Hub 55cm int drehungenlinks; int drehungenrechts; void setup() { drehungenlinks = drehungenende; drehungenrechts = drehungenende; // EEPROM.put(0, drehungenlinks); // EEPROM.put(2, drehungenrechts); pinMode(mp, OUTPUT); } void loop() { bandgapzahl = analogRead(bandgappin); // Kontrolle der 5V vom 7805
in „Arduino put() get() ein ppar Fragen dazu.“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
EEPROM-Werte-Speichern_Tisch_20200130b.ino
#include <EEPROM.h> int acpin = A4; bool volt; bool spggut; unsigned long spggutstart; unsigned long spggutist; unsigned long spggutvz = 45; bool spgguta; bool speichern; int mp = 13; // Messpunkt, LED int drehungenende = 1200; // 1200Maximale Tischhöhe 118cm Hub 55cm int drehungenlinks; int drehungenrechts; bool led; //led MF zur Sichtkontrolle unsigned long ledstart; unsigned long ledist; unsigned long ledvz = 500; void setup() { drehungenlinks = drehungenende; drehungenrechts = drehungenende; pinMode(mp, OUTPUT); } void loop() { if(analogRead(acpin) > 500){volt = HIGH;} // >12V Tatfo hat 15VAC an Steuerwicklung
in „Arduino put() get() ein ppar Fragen dazu.“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
SunTracking_Heliostat_Program_V098.ino
//************************************************************** // Name : Simple Arduino Sun Tracking / Heliostat Control Program // Author : Gabriel Miller // Website : http://www.cerebralmeltdown.com // Notes : Code for controlling various types of solar // : machines. //**************************************************************** #include <BigNumberMath.h> #include <bcconfig.h> #include <BigNumber.h> #include <number.h> #include "Wire.h" #include <Flash.h> #include <EEPROM.h> #include "SunPositionAlgo_LowAc.h" #include "RTC_Code.h" //PUT YOUR LATITUDE, LONGITUDE, AND TIME ZONE HERE float
in „Heliostatensteuerung mit Arduino Uno“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
10.04.MODBUSMasterMAX485_Anemometer.ino
#include "ModbusMaster.h" //https://github.com/4-20ma/ModbusMaster #define MAX485_RE_NEG 4 //D4 RS485 has a enable/disable pin to transmit or receive data. Arduino Digital Pin 2 = Rx/Tx 'Enable'; High to Transmit, Low to Receive #define Slave_ID 1 #define RX_PIN 16 //RX2 #define TX_PIN 17 //TX2 // instantiate ModbusMaster object ModbusMaster modbus; void preTransmission() { digitalWrite(MAX485_RE_NEG, HIGH); //Switch to transmit data } void postTransmission() { digitalWrite(MAX485_RE_NEG, LOW); //Switch to receive data } void setup() { pinMode(MAX485_RE_NEG, OUTPUT); // Init in receive mode digitalWrite
in „NODEMCU ESP32 Anemometer RS485 MAX485“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
JSON_MQTT_3er_Vorlage_ESP32.ino
#include <WiFi.h> #include <PubSubClient.h> #include <ArduinoJson.h> #define wifi_ssid "" #define wifi_password "" #define mqtt_server "192.168.0.24" #define mqtt_port 1883 const char* on_cmd = "ON"; const char* off_cmd = "OFF"; const int BUFFER_SIZE = 300; int count = 0; String topicStr = "NULL"; byte brightness[3] = {255,255,255}; bool stateOn[3] = {false,false, false}; int LED1 = 21; int LED2 = 23; int LED3 = 13; const int freq = 5000; const int ledChannel1 = 0; const int ledChannel2 = 1; const int ledChannel3 = 2; const int resolution = 8; WiFiClient espClient; PubSubClient client(espClient);
in „ESP32 PWM Probleme“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
I2C_Adressen_und_Frequenz_Scanner.ino
/* https://evision-webshop.de/blog/i2c-slave-adressierung-mit-7-bit-8-bit-und-10-bit I2C Adressen und Frequenz Scanner */ #include <Streaming.h> #include <Wire.h> Stream &cout {Serial}; TwoWire &wire0 {Wire}; // die echten Frequenzen sind abhängig vom Pullup und Leitungskapazität const uint32_t i2cFreq [] = {100000, 200000, 400000}; // , 800000}; const uint8_t ANZAHLFREQ = sizeof(i2cFreq) / sizeof(i2cFreq[0]); void setup() { Serial.begin(9600); Wire.begin(); cout.println("\nReset ####"); delay(100); scanner(cout, wire0, 0); } void loop (void) { scanner(cout, wire0, 5000); } void scanner (Stream &
in „Arduino: page-write in I2C eeprom verliert sporadisch ein Byte“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
solar_light_tracker_07_11_24.ino
/*************************************************************************** * Solar light tracker project with Mega 2560 R3 Board microcontroller, * * Solar panel, LDR resistors, 0.96 inch OLED 128X64 pixels display, * * 2 TB6600 modules and 2 NEMA17 step by step motors. * * Armin Rolfes/Wilfried Meyer * * * Last revisión 09.10.2024 * ***************************************************************************/ /************** OLED display library and configuration *************/ #include <Wire.h> // I2C communication library. #include <Adafruit_GFX.h> // Core graphics library for screen. #include
in „Code Solartracker“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
SerialToSerialBT_SSP_pairing.ino
//This example code is in the Public Domain (or CC0 licensed, at your option.) //By Richard Li - 2020 // //This example creates a bridge between Serial and Classical Bluetooth (SPP with authentication) //and also demonstrate that SerialBT have the same functionalities of a normal Serial #include "BluetoothSerial.h" #if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED) #error Bluetooth is not enabled! Please run `make menuconfig` to and enable it #endif #if !defined(CONFIG_BT_SPP_ENABLED) #error Serial Bluetooth not available or not enabled. It is only available for the ESP32 chip. #endif BluetoothSerial
in „Arduino Bluetooth serial“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
wi2--0-1-led2.ino
#include <SoftwareSerial.h> #define AP_SSID "Router SSID" #define AP_PASSWORT "Router Passwort" #define xPORT 80 #define LED 13 SoftwareSerial ESPSerial(10, 11); // RX, TX boolean ESP_Aktiv; boolean ESP_Verbunden; boolean SERVER_Aktiv; //int wifi_id; int wifi_packetlaenge; char wifi_Host[24]; int verbindungsversuche = 3; void setup() { pinMode(LED, OUTPUT); Serial.begin(9600); ESPSerial.begin(9600); ESPSerial.setTimeout(5000); debug("\nDebug Serial OK"); if(ESP_Test()) { for(int i=1; i<=verbindungsversuche; i++) { debug("Verbindungsversuch "+String(i)+" von "+String(verbindungsversuche)); ESP_Verbunden = ESP_Verbinden
in „Arduino+ESP8266 über Webinterface ansteuern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Dallas_WaitForConversion_Bsp_002.ino
/* Test of Arduino Mega 2560 Arduino IDE v1.6.5 Temperaturmessung ohne Blockierung der loop */ #include <OneWire.h> #include <DallasTemperature.h> // https://github.com/milesburton/Arduino-Temperature-Control-Library // Data wire is plugged into port 2 on the Arduino #define ONE_WIRE_BUS 7 // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs) OneWire oneWire(ONE_WIRE_BUS); // Pass our oneWire reference to Dallas Temperature. DallasTemperature sensors(&oneWire); // change of your sensors adress or use "getTempCByIndex" and see below DeviceAddress
in „AVR Frequenzmessung, DS18S20“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Protogen_OS_V3.1_mod.ino
Protogen_OS_V3.1_mod.ino
in „Max7219 an Arduino Nano will nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
PinKlasse_klassisch_toggle.ino.elf.txt
C:\Users\Worker\AppData\Local\Temp\arduino_build_9702\PinKlasse_klassisch_toggle_Forum.ino.elf: file format elf32-avr Disassembly of section .text: 00000000 <__vectors>: 0: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__ctors_end> 4: 0c 94 79 00 jmp 0xf2 ; 0xf2 <__bad_interrupt> 8: 0c 94 79 00 jmp 0xf2 ;
in „Buchempfehlung C++ und MCUs“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Cisco_WS-CAC_3000W_INT.ino
//Eingang für Strommessung an Pin A1 int strom; //Ausgang für Lüfter an D3 int lufterpwm; //Widerstand Shunt in mOhm int shunt = 1; //maximaler Strom in mA int Imax = 66000; int spannung_shunt_max = Imax*shunt; int spannung_shunt; int lufterdisplay; #include <U8g2lib.h> #include <Wire.h> U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE); void u8g2_prepare() { u8g2.setFont(u8g2_font_t0_11_tf); u8g2.setFontRefHeightExtendedText(); u8g2.setDrawColor(1); u8g2.setFontPosTop(); u8g2.setFontDirection(0); } void setup(void) { pinMode(3, OUTPUT); u8g2.begin(); Serial.begin(9600); u8g2_prepare
in „Stimmt mit meinem OLED Display etwas nicht?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_Jan07_TIMER2_OVF.ino
/********************************************************************************************** 10kHz to 120MHz VFO / RF Generator with Si5351 and Arduino Nano, with Zwischenfrquenz (ZF) offset + . See the schematics for wiring details. By J. CesarSound - ver 1.0 - Dec/2020. Originallösung verwendet PINCHANGE Interrupt etwas geändert auf Timer2 Interrupt Timer0 wird in Arduino für millis() verwendet Funktionen Wobbeln, Calibration via DCF-Frequenzabgleich mit Oszi, ev mit Lissajoufigur. und aus hist. Gründen 9 MHz an clk0 und clk2 90° phasenverschoben etwas FM-Modulation mit 2,5kHz Jan 2022 adapted
in „USB to TTL mit CH340“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
TX_433Mhz_Robot_new_button.ino
#include <SoftwareSerial.h> SoftwareSerial BTserial(2, 3); // RX | TX char *controller; int x; int y; int led; int buttonPin = 8; int buttonState = 0; void setup() { pinMode(buttonPin, INPUT); Serial.begin(9600); BTserial.begin(9600); controller = "0"; } void loop() { x = analogRead(A0); y = analogRead(A1); led = analogRead(A2); buttonState = digitalRead(buttonPin); if (x > 0 && x < 250) { BTserial.write("A"); } else if (x > 250 && x < 400) { BTserial.write("B"); } else if (x > 500 && x < 520 && y > 500 && y < 520) { BTserial.write("C"); } else if (x > 600 && x < 750) { BTserial.write("D"); } else
in „Problem mit momentaner Button-Funktion“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
STM32F4_Discovery_Blink.ino
/* Blink Turns on an LED on for one second, then off for one second, repeatedly. Most Arduinos have an on-board LED you can control. On the Uno and Leonardo, it is attached to digital pin 13. If you're unsure what pin the on-board LED is connected to on your Arduino model, check the documentation at http://www.arduino.cc This example code is in the public domain. modified 8 May 2014 by Scott Fitzgerald */ #define REDLED PD12 // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin 13 as an output. pinMode(REDLED, OUTPUT); } // the loop function
in „STM32F4 Discovery Arduino“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
MK_ESP_WIFI_Serial_Client_Server.ino
/*-------------------------------------------------- https://blog.thesen.eu/telnet2serial-telnet-zu-rs232seriell-bruecke-mit-dem-esp8266-microcontroller/#comment-2437 Serial to Serial AccessPoint for ESP8266 for ESP8266 adapted Arduino IDE - stellte eine 1 zu n (n max. 5???) her - 1 = Server = Accesspoint der Daten seiner Uart RX per Broadcast an alle Clients schick und Daten die er von den Clients erhält an die Uart TX weiterleitet - n = Clients die sich an einem AP anmelden, Daten vom Server erhalten und an ihre Uart TX weiterleiten oder Daten der Uart RX an den Server weiterleiten - Synchronisierung
in „ESP82266 UART-WIFI-UART Brücke“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
MYSENSORS_GatewayClient_WORK_V3.ino
/** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org *
in „String Array verarbeiten / Arduino“ · Mikrocontroller und Digitale Elektronik ·