-
Datei
DS18x20_Temperature.ino
#include <OneWire.h> // OneWire DS18S20, DS18B20, DS1822 Temperature Example // // http://www.pjrc.com/teensy/td_libs_OneWire.html // // The DallasTemperature library can do all this work for you! // http://milesburton.com/Dallas_Temperature_Control_Library OneWire ds(10); // on pin 10 (a 4.7K resistor is necessary) void setup(void) { Serial.begin(9600); } void loop(void) { byte i; byte present = 0; byte type_s; byte data[12]; byte addr[8]; float celsius, fahrenheit; if ( !ds.search(addr)) { Serial.println("No more addresses."); Serial.println(); ds.reset_search(); delay(250); return; } Serial.print
in „DS18B20 an Arduino“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Arduino_Ultraschall_3D_Scan.ino
// ========================================================================= // ====== Programm zur Erstellung eines 3D-Scans mittels Ultraschall ======= // ========================================================================= #include <Servo.h> // Inkludiert die Servodateien #include <i2cmaster.h> // Inkludiert die i2c-Bus-Dateien #define TRIGPIN 3 // Pin to send trigger pulse #define ECHOPIN 4 // Pin to receive echo pulse Servo servo_horiz; // Definiert den horizontalen servo Servo servo_verti; // Definiert den vertikalen servo int taste; // Tastaturpin für Start des Scans int winkel_horiz
in „Experimente mit Arduino und Ultraschall“ · Projekte & Code ·
-
Datei
I2C2_BME.ino
//#include <Wire.h> //TwoWire myWire1 (1, I2C_FAST_MODE); // to use the I2C 1 //TwoWire myWire2 (2, I2C_FAST_MODE); // to use the I2C 2 #include <Wire_slave.h> #include <Adafruit_Sensor.h> #include "Adafruit_BME680.h" #define SEALEVELPRESSURE_HPA (1013.25) Adafruit_BME680 bme; // I2C void setup() { Serial.begin(115200); delay(2000); Wire.begin(); delay(10); Wire1.begin(8); Wire1.onRequest(requestEvent); // register event Wire1.onReceive(receiveEvent); // register event delay(10); Serial.print("init BME280..."); if (!bme.begin(0x76)) { Serial.println("Could not find a valid BME680 sensor, check
in „STM32 I2C2 & BME680 Probleme“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
t4-audio-adc-dma.ino
#include <ADC.h> #include <AnalogBufferDMA.h> //#define DUMPCHUNK static const char SW[] = __FILE__ "," __DATE__ " " __TIME__; const uint8_t ADC_PIN = A2; const uint16_t ADC_MIDPOINT = 127; ADC adc; const uint16_t AVSIZE = 128; DMAMEM static volatile uint16_t __attribute__((aligned(32))) av1[AVSIZE], av2[AVSIZE]; AnalogBufferDMA abdma(av1,AVSIZE,av2,AVSIZE); const float GOER_FREQ = 7930.0; const float GOER_RATE = GOER_FREQ*4.0; float coef = 2.0*cos(2.0*PI*GOER_FREQ/GOER_RATE); void setup() { Serial.begin(115200); while (!Serial && millis() < 5000) continue; const char* sw = SW; for (const char
in „Bestimmtes Geräusch erkennen“ · Analoge Elektronik und Schaltungstechnik ·
-
Datei
Laufschrift_04_Test_Fehler_Reset.ino
/****************************************** * 0.96" Display (160x80px) ansteuern * Controller: ST7735S * 13pol. PFC 0.8mm Display Typ: RFA300960A-AYW-DNN * 8pol. PFC 0.5mm * * Einstellungen IDE: Board: "Arduino Pro or Pro Mini" * Processor: "ATmega328P (5V, 16MHz)" * Programmer: "AVRISP mkII" * * Einstellungen serielle Schnittstelle: 9600 Baud, 8N1 * * Anschluss: * D8: -> RS * D9: -> RST * D10: SS -> CS * D11: MOSI -> SDA * D13: SCK -> SCL * * PFC: Display Anschlüsse: * 1 SPI4W SPI4W=’0’, 3-wire SPI. SPI4W=’1’, 4-wire SPI. * 2 NC No connection * 5 3 SDA Serial interface data * 6 4 SCL Serial interface clock
in „ATmega328P resettet bei I/O Zugriff“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
SwitchBoxMotherboard_328PB.ino
#define SCLK PIN_PC1 // connected to SRCLK orange #define LATCH PIN_PB2 // connected to RCLK white #define MOSI PIN_PE3 // connected to SER green #define MISO PIN_PC0 // connected to last Q7S blue const uint8_t shiftregistercount = 4; //actual number of 8-channel shiftregisters const uint8_t channelcount = 18; //max shiftregistercount*8 const uint8_t channelassignment[channelcount] = { //starting from 0, max shiftregistercount*8-1 18, 19, 20, 21, 22, 23, 24, 25, 26, 13, 12, 11, 10, 9, 8, 7, 6, 5 }; uint8_t outputdata[shiftregistercount]; uint8_t routputdata[shiftregistercount]; uint8_t allon[shiftregistercount
in „Universeller Schieberegister-Controller“ · Projekte & Code ·
-
Datei
FastPWM-Mode_15_Code_Alles.ino
//////////////////////////////////////////////////////////////////////////////// // Ein Schrittmotor wird fortlaufend beschleunigt und abgebremst. // Es wird eine Anzahl von Schritten vorgefahren und sofort zurueck. // Danach bleibt der SM fuer ca. 1,5 Sekunde stehen und das Spiel wiederholt sich. // Im FastPWM-Mode 15 wird eine maximale Frequenz von ca. x kHz erreicht. // //#include "Define.h" #define SM_RICHTUNG_DDR DDRK #define SM_RICHTUNG_PORT PORTK #define SM_RICHTUNG_PIN PINK #define SM_RICHTUNG ( 1<<PK0 ) // 62 #define SM_DREHEN_STOP ( 1<<PK1 ) // Schrittmotor Drehen stoppen #define SM_SPEED_RANGE
in „Fragen zu schrittmotor Treiber“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
pt1000_rp2040_neu.ino
/* Alle Angaben ohne Gewaehr ! 2023-11-04 */ #define OFFSET 13 // 0-Offset des ADCs, Anpassung notwendig #define DEF_BAUDRATE 19200 #define ADC_MIN 0 #define ADC_MAX (4095 - OFFSET) // bei 12 Bit #define PT_IN_0 26 // analog Eingang A0 #define UNTERLAUF -99 // Fehler, auch bei Kurzschluss #define UEBERLAUF 999 // Fehler, auch bei offenem Eingang #define R_PT0 1000.0 // bei 0 Grad C #define R_REF 1200.0 // ext. Widerstand mit 0,1% #define R_ZULEITUNG 0 // bei laengeren Leitungen unbedingt anpassen #define PT_FAKTOR 3.85 // schon mit 1000.0 skaliert //#define IO_BANK0_BASE 0x40014000UL // ist auch schon
-
Datei
WS2812x300-Christmas.ino
#include <Adafruit_NeoPixel.h> #ifdef __AVR__ #include <avr/power.h> #endif // Which pin on the Arduino is connected to the NeoPixels? const uint8_t PIN = 6; // make sure to set this to the correct PixelPin, ignored for Esp8266 // How many NeoPixels are attached to the Arduino? const uint16_t NUMPIXELS = 300; // When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals. // Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest // example for more information on possible values. Adafruit_NeoPixel pixels = Adafruit_NeoPixel
in „Zeigt her eure elektronischen Weihnachtsbasteleien!“ · Projekte & Code ·
-
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 ·
-
Datei
sloeber.txt
project testESP **** "C:\\sloeber\\arduinoPlugin\\tools\\make\\make" all 'Building file: ..\sloeber.ino.cpp' 'Starting C++ compile' "C:\sloeber\/arduinoPlugin/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\sloeber
in „Arduino Sloeber - C Code einbinden“ · 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 ·