-
Datei
mcp_flipdot_v5.ino
/******************************************************** ** Projekt Flipdot ** ********************************************************/ #include <Wire.h> #include "Adafruit_MCP23017.h" Adafruit_MCP23017 mcp; // die Zeichenkodierung uint8_t hex2dot[][5] = { {0x07, 0x05, 0x05, 0x05, 0x07}, // 0 {0x02, 0x02, 0x02, 0x02, 0x02}, // 1 {0x07, 0x01, 0x07, 0x04, 0x07}, // 2 {0x07, 0x01, 0x03, 0x01, 0x07}, // 3 {0x05, 0x05, 0x07, 0x01, 0x01}, // 4 {0x07, 0x05, 0x07, 0x01, 0x07}, // 5 {0x04, 0x04, 0x07, 0x05, 0x07}, // 6 {0x07, 0x05, 0x01, 0x01, 0x01}, // 7 {0x07, 0x05, 0x07, 0x05, 0x07}, // 8 {0x07, 0x05
in „Flipdot Display Projekt (Hilfe Logik Erbeten)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ESP_IN-9-asyncMQTT.ino
/*-------------------------------------------------- v1.0 MSoft 14.05.2016 ESP-12 - 1MBit-Flash: 1Mno SPIFFS), QIO --------------------------------------------------*/ #include <ESP8266WiFi.h> #include <ArduinoOTA.h> #include <Ticker.h> #include <AsyncMqttClient.h> //#define DEBUG #define HOSTNAME "OTA-IN9" // IN9 -Daten setzen #define analogPin 3 #define IN9_MIN 165 #define IN9_MAX 820 #define TEMP_MIN 150 // 1/10 Grad #define TEMP_MAX 350 // 1/10 Grad #define WIFI_SSID "xxxxxxxx" #define WIFI_PASSWORD "xxxxxxxxxx" #define MQTT_HOST IPAddress(192, 168, 0, 99) #define MQTT_PORT 1883 // WiFi WiFiEventHandler
in „ESP8266 crash während updateWifi() - ist millis() das Problem?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
mcp_flipdot_hc05.ino
/******************************************************** ** Projekt Flipdot ** ********************************************************/ #include <Wire.h> #include "Adafruit_MCP23017.h" Adafruit_MCP23017 mcp; // die Zeichenkodierung uint8_t hex2dot[][5] = { {0x07, 0x05, 0x05, 0x05, 0x07}, // 0 {0x01, 0x01, 0x01, 0x01, 0x01}, // 1 {0x07, 0x01, 0x07, 0x04, 0x07}, // 2 {0x07, 0x01, 0x07, 0x01, 0x07}, // 3 {0x04, 0x05, 0x07, 0x01, 0x01}, // 4 {0x07, 0x04, 0x07, 0x01, 0x07}, // 5 {0x06, 0x04, 0x07, 0x05, 0x07}, // 6 {0x07, 0x05, 0x01, 0x01, 0x01}, // 7 {0x07, 0x05, 0x07, 0x05, 0x07}, // 8 {0x07, 0x05
in „Flipdot Display Projekt (Hilfe Logik Erbeten)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
M5_Cam-test.ino
// Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the
in „M5StackFire und M5Stack“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
MPU6050_DMP6.ino
// I2C device class (I2Cdev) demonstration Arduino sketch for MPU6050 class using DMP (MotionApps v2.0) // 6/21/2012 by Jeff Rowberg <jeff@rowberg.net> // Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib // // Changelog: // 2013-05-08 - added seamless Fastwire support // - added note about gyro calibration // 2012-06-21 - added note about Arduino 1.0.1 + Leonardo compatibility error // 2012-06-20 - improved FIFO overflow handling and simplified read process // 2012-06-19 - completely rearranged DMP initialization code and simplification // 2012-06-13 - pull
in „MPU-6050 Auslesen Prblem“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Blink_Trinket_M0.ino
/* Blink Turns 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, MEGA and ZERO it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to the correct LED pin independent of which board is used. If you want to know what pin the on-board LED is connected to on your Arduino model, check the Technical Specs of your board at: https://www.arduino.cc/en/Main/Products modified 8 May 2014 by Scott Fitzgerald modified 2 Sep 2016 by Arturo Guadalupi modified 8 Sep 2016 by Colby Newman This example code is in the
in „Bare-Metal ATSAM“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ResetCounter8bit.ino
#include <EEPROM.h> #include <Streaming.h> /** * Simpler 8 Bit breiter Reset Counter */ // Counter vorbesetzen, mit Eintag in *.eep Datei byte resetCounter EEMEM {0}; void serialEvent() { if('R' == Serial.read()) { EEPROM[int(&resetCounter)] = 0; Serial << F("ResetCounter auf Null gesetzt ") << endl; } } void setup() { Serial.begin(9600); Serial << F("Start") << endl; Serial << F("Gib R ein, um den Counter zurueck zu setzen") << endl; EEPROM[int(&resetCounter)]++; Serial << F("ResetCounter: ")<< EEPROM[int(&resetCounter)] << endl; } void loop() { }
in „AVR: EEPROM-Inhalt beim Flashen behalten?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ArduinoUnoNano-basic.ino
/* * Author: JP Meijers * Date: 2016-02-07 * Previous filename: TTN-Mapper-TTNEnschede-V1 * * This program is meant to be used with an Arduino UNO or NANO, conencted to an RNxx3 radio module. * It will most likely also work on other compatible Arduino or Arduino compatible boards, like The Things Uno, but might need some slight modifications. * * Transmit a one byte packet via TTN. This happens as fast as possible, while still keeping to * the 1% duty cycle rules enforced by the RN2483's built in LoRaWAN stack. Even though this is * allowed by the radio regulations of the 868MHz band, the fair
in „Arduino Nano mit RN2483“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
OV7670_Uno-mod.ino
// // Source code for application to transmit image from ov7670 to PC via USB // By Siarhei Charkes in 2015 // // #define PIN_HREF PB0 // IN H-aktiv OV7670 Zeilenstart mit H-Impuls #define PIN_VSYNC PD3 // IN H-aktiv OV7670 Bildstart mit H-Impuls #define PIN_WRST PD2 // OUT L-aktiv AL422B Write-Counterreset mit L-Impuls #define PIN_STR PB1 // IN H-aktiv OV7670 Blitzlichtsteuerung #define PIN_RCK PB2 // OUT H-aktiv AL422B default L #define PIN_RRST PB3 // OUT L-aktiv AL422B Read-Counterreset mit L-Impuls #define PIN_WR PB4 // OUT H-aktiv AL422B verknüpft mit HREF OV7670 zu /WR AL422B #define PIN_OE PB5
in „Brauche Unterstützung beim OV7670 (bzw. SCCB)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
IL9340C_counter.ino
/************************************************************************ 2.2' TFT Demonstration: Large counter in the center of the screen TFT used: ILI9340C libraries used: https://github.com/adafruit/Adafruit_ILI9340 https://github.com/adafruit/Adafruit-GFX-Library Written by a MC-Net User 2016 license: free beer license ************************************************************************/ #include "SPI.h" #include "Adafruit_GFX.h" #include "Adafruit_ILI9340.h" #if defined(__SAM3X8E__) #undef __FlashStringHelper::F(string_literal) #define F(string_literal) string_literal #endif #define _sclk
in „2.2'TFT ILI9340 und Arduino“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
cquam_darius_20191004a.ino
#include <Wire.h> #include <LiquidCrystal_I2C.h> // 27=A4=SDA, Pin28=A5=SCL LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); #include <rotary.h> #include <EEPROM.h> int volt = A1; //24 Atmega Eingang Spannungskontrolle int spg; bool start, obi, unterspg, flagspg; unsigned long unterspgstart, unterspgist; unsigned long flagspgstart, flagspgist; unsigned long unterspgverz = 21; bool ul, uh, uth, utl, uts, us; unsigned long startul, istul, startuh, istuh; int sumeing = A3; //26 Atmega Eingang Summensignal int diffeing = A2; //25 Atmega Eingang Differenzsignal int c; int d; int L; int R;
in „<rotary.h> mit bool "ein" und Ausschalten.“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
cquam_darius_20191004b.ino
#include <Wire.h> #include <LiquidCrystal_I2C.h> // 27=A4=SDA, Pin28=A5=SCL LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); #include <rotary.h> #include <EEPROM.h> int volt = A1; //24 Atmega Eingang Spannungskontrolle int spg; bool start, obi, unterspg, flagspg; unsigned long unterspgstart, unterspgist; unsigned long flagspgstart, flagspgist; unsigned long unterspgverz = 21; bool ul, uh, uth, utl, uts, us; unsigned long startul, istul, startuh, istuh; int sumeing = A3; //26 Atmega Eingang Summensignal int diffeing = A2; //25 Atmega Eingang Differenzsignal int c; int d; int L; int R;
in „<rotary.h> mit bool "ein" und Ausschalten.“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ePaper-Test2.ino
// ePaper 2.9 Zoll Waveshare b/w // Anschluss und Einstellungen für Arduino NANO: // BUSY -> 7, RST -> 9, DC -> 8, CS-> 10, CLK -> 13, DIN -> 11 // Board: "Arduino Nano" // Processor: "ATmega328P (Old Bootloader)" // Programmer: "AVRISP mkII" // Anschluss und Einstellungen für Arduino MEGA 2560: // BUSY -> 7, RST -> 9, DC -> 8, CS-> 53, CLK -> 52, DIN -> 51 // Board: "Arduino/Genuino Mega or Mega 2560" // Processor: "ATmega2560 (Mega 2560)" // Programmer: "AVRISP mkII" // include library, include base class, make path known #include <GxEPD.h> #include <GxGDEH029A1/GxGDEH029A1.h> // 2.9" b/w #include
in „Arduino-Library auf GitHub: Keine Dokumentation?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Sender_V1_3.ino
/* Ersteller: Bastian Schmidt Programmname: Sender V1.1 Changelog: V1.1 DMX Addressierung hinzugefügt V1.2 Statusanzeige für Kanäle hinzugefügt (noch nicht freigegeben) V1.3 5 Funkkanäle angesteuert */ #include <VirtualWire.h> #include <Conceptinetics.h> #define DMX_SLAVE_CHANNELS 5 DMX_Slave dmx_slave ( DMX_SLAVE_CHANNELS ); const int ledPin = 13; //**************************Zuweisung 230V Ausgänge und Statusanzeige Funkkanäle************************************** const int CH1 = 30; const int CH2 = 31; const int CH3 = 32; const int CH4 = 33; const int CH5 = 34; const int CH6 = 35; const int CH7
in „DMX Auswertung mit Arduino geht nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Sender_V1_4.ino
/* Ersteller: Bastian Schmidt Programmname: Sender V1.1 Changelog: V1.1 DMX Addressierung hinzugefügt V1.2 Statusanzeige für Kanäle hinzugefügt (noch nicht freigegeben) V1.3 5 Funkkanäle angesteuert */ #include <VirtualWire.h> #include <Conceptinetics.h> #define DMX_SLAVE_CHANNELS 5 DMX_Slave dmx_slave ( DMX_SLAVE_CHANNELS ); const int ledPin = 13; //**************************Zuweisung 230V Ausgänge und Statusanzeige Funkkanäle************************************** const int CH1 = 30; const int CH2 = 31; const int CH3 = 32; const int CH4 = 33; const int CH5 = 34; const int CH6 = 35; const int CH7
in „DMX Auswertung mit Arduino geht nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Plotclock_v1_2.ino
#include <Servo.h> #include <Wire.h> #include <Time.h> #include <DS1307RTC.h> // Plotclock // cc - by Johannes Heberlein 2014 // v 1.01 // thingiverse.com/joo wiki.fablab-nuernberg.de // units: mm; microseconds; radians // origin: bottom left of drawing surface // time library see http://playground.arduino.cc/Code/time // delete or mark the next line as comment when done with calibration //#define CALIBRATION // When in calibration mode, adjust the following factor until the servos move exactly 90 degrees #define SERVOFAKTOR 750 // Zero-position of left and right servo // When in calibration mode, adjust
in „Plotclock zusammenbauen und programmieren“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Motortest25.07._2.ino
const int analogInPin = A0; // Analog input pin that the LEM LTS 15-NP is attached to int IniB13 = 2; //Grundstellung int Hall1 = 3; //Hallspur 1 int Hall2 = 4; //Hallspur 2 struct sample_t{ uint16_t time; // Zeit in Mikrosekunden nach Startimpuls uint16_t stepcount; // Schritte vom Drehgeber int16_t strom; // ADC-Messwert }; #define NUMSAMPLES 10000 #define WARMUPTURNS 5 //Drehungen ohne Messung #define MEASURINGTURNS 3 //Drehungen mit Strommessung sample_t samples[NUMSAMPLES]; void setup() { Serial.begin(115200); pinMode (IniB13, INPUT); pinMode (Hall1, INPUT); pinMode (Hall2, INPUT); analogReadResolution
in „mit Arduino Due, DC-Motorstrom positionsabhängig erfassen und seriell ausgeben“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
steuern__ber_HTTP5.ino
// Ein einfacher Webserver um die Drehzahl von Inventer Lüftern zu steuern // Konfiguration des Webservers #include "etherShield.h" #include "ETHER_28J60.h" static uint8_t mac[6] = { 0x54, 0x55, 0x58, 0x10, 0x00, 0x24}; // diese MAC Adresse muss einzigartig im Netzwerk sein static uint8_t ip[4] = { 192, 168, 1, 6}; // die Statische IP der Lüftersteuerung static uint16_t port = 80; // Standard Port 80 für HTTP ETHER_28J60 e; // Neue Instanz e zuweisen int value; // 0 - 799 entspricht duty Cycle 0 - 100% bei 20kHz int mode; // 0 = Aus, 1 = Normal, 2 = Durchlüften long previousMillis = 0; // speichert
in „Inventer Lüfter Ansteuerung“ · Analoge Elektronik und Schaltungstechnik ·
-
Datei
Geschwindigkeitsmessung_Arduino_Leonardo_Mod.ino
#include <avr/io.h> #include <avr/interrupt.h> #include <avr/sleep.h> #include <avr/wdt.h> #include <avr/eeprom.h> #include <util/delay.h> #include <stdlib.h> #define BIT(x) (1<<x) #define DEF_BAUDRATE 9600 // Vielleicht hoeher gehen? z.B. 19200 #define F_CPU 16000000 // 16MHz ggf. an eff.Frequenz anpassen #define STELLEN 5 // ANPASSEN angezeigte Stellen #define SENSORABSTAND 0.3 // Weg in Meter #define STARTFLANKE 3 // Digital Pin 3 (INT0) #define STOPPFLANKE 2 // Digital Pin 2 (INT1) #define LCD_CMD 1 // wenn ein Befehl ausgegeben wird #define LCD_STROBE 2 // Schreibimpuls E fuers LCD #define ZEILE1
in „Stoppuhr – Geschwindigkeit – Pulsweite mit Atmega88“ · Projekte & Code ·
-
Datei
_7segment_Test_3.ino
/* ************************************************************** * Funktionstest - Sketch für Decoderschaltkreise V40511 * * aus Restbeständen der DDR - Produktion * ************************************************************** * (c) Gregor Hebecker gregor.hebecker(at)web.de * * mit Unterstützung * * http://www.mikrocontroller.net/topic/354077 * ************************************************************** 40511 in der Standartschaltung. Zuordnung: Arduino => V40511 pin 8 => E3 40511 pin 9 => E2 40511 pin 10 => E1 40511 pin 11 => E0 40511 */ byte PA = 8; byte PB = 9; byte PC = 10; byte PD
in „Bit und Bytemanipulation mit Arduino“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
WLAN-Server_LED_Steuerung.ino
//Aufruf, z.B. http://192.168.178.53/schalten/?wert=r1_on oder B. http://192.168.178.53/schalten/?wert=r1_off http://192.168.178.53/schalten/?wert=status1 http://192.168.178.53/schalten/?wert=DeepSleep30Sek #include <ESP8266WiFi.h> #include <ESP8266WebServer.h> #include <ESP8266WiFiMulti.h> // fuer I2C #include <Wire.h> //der pcf8574A hat andere Adresse als der pcf8574: //pcf8574 : 0 1 0 0 A2 A1 A0 R/W => wenn alle Adressenbit = 0: 01000001 für schreiben es werden aber nur 7 Bits verwendet => 00100000 = 20 //pcf8574A: 0 1 1 1 A2 A1 A0 R/W => wenn alle Adressenbit = 0: 01110001 für schreiben es
in „LED-Steuerung mit WLAN-Server, bistablen Relais und ZeroCrossSwitching“ · Projekte & Code ·
-
Datei
sketch_sep24a.ino
// MOSI 11 // MISO 12 // CLK 13 // CS/ SS/ SLAVESELECT 10 // WP 5V // HOLD 5V #include <SPI.h> int CS = 10; int framWriteData = 0; int framReadData = 0; byte readStat = 0; byte adress_1 = 0; byte adress_2 = 0; byte OPCODE_WREN = 0b00000110; /* Write Enable Latch */ byte OPCODE_WRDI = 0b00000100; /* Reset Write Enable Latch */ byte OPCODE_RDSR = 0b00000101; /* Read Status Register */ byte OPCODE_WRSR = 0b00000001; /* Write Status Register */ byte OPCODE_READ = 0b00000011; /* Read Memory */ byte OPCODE_WRITE = 0b00000010; /* Write Memory */ byte OPCODE_RDID = 0b10011111; /* Read Device ID */ void
in „FM25W256 funktioniert nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_oct14a.ino
#include <AFMotor.h> #include <Servo.h> Servo servo1; bool erkenneFlanke(const bool value) { static bool merker = true; if(merker == value) return false; merker = value; if(value) return true; return false; } void setup() { servo1.attach(10); pinMode(A1,INPUT); Serial.begin(9600); Serial.println(""); pinMode(A1,INPUT_PULLUP); } void loop() { if(erkenneFlanke(digitalRead(A1))){ servo1.write(30); delay(100); servo1.write(60); delay(100); } }
in „Alten Zustand eines Pins Abfragen (Arduino)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
IL9341_matrixRain.ino
/************************************************************************ 2.2' TFT Demonstration: The Matrix Rain Screen Saver QBasic Code from http://codegolf.stackexchange.com/questions/17285/make-the-matrix-digital-rain-using-the-shortest-amount-of-code TFT used: ILI9340C libraries used: https://github.com/adafruit/Adafruit_ILI9340 https://github.com/adafruit/Adafruit-GFX-Library Written by a MC-Net User 2016 license: free beer license recomended music while programming: https://www.youtube.com/watch?v=BQt6_hQwMsk ************************************************************************/ #include
in „2.2'TFT ILI9340 und Arduino“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_nov08a.ino
int taster=7; //Das Wort „taster" steht jetzt für den Wert 7. int relais1=3; int relais2=2; int tasterstatus; int Taststat=LOW; void setup() //Hier beginnt das Setup. { pinMode(taster, INPUT_PULLUP); //Der Pin mit der LED (Pin 7) ist jetzt ein Eingang INPUT pinMode(relais1, OUTPUT); //Der Pin mit dem Relay1 (Pin 1) ist jetzt ein Ausgang OUTPUT pinMode(relais2, OUTPUT); digitalWrite(relais1, HIGH); digitalWrite(relais2, HIGH); } void loop() { tasterstatus=digitalRead(taster); if (tasterstatus == LOW) //Taster drücken,LOW { Taststat=HIGH; digitalWrite(relais1, LOW); } if(Taststat) { delay (3000);
in „Arduino UNO an 4fach Relais“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_nov08b.ino
int taster=7; //Das Wort „taster" steht jetzt für den Wert 7. int relais1=3; int relais2=2; int Relstat1 = LOW; int Relstat2 = LOW; int tasterstatus = HIGH; int Taststat=LOW; unsigned long time; long previousMillis = 0; // will store last time LED was updated int Zaehler =0 ; long interval = 30000; // interval at which to blink (milliseconds) void setup() //Hier beginnt das Setup. { pinMode(taster, INPUT_PULLUP); //Der Pin mit der LED (Pin 7) ist jetzt ein Eingang INPUT pinMode(relais1, OUTPUT); //Der Pin mit dem Relay1 (Pin 1) ist jetzt ein Ausgang OUTPUT pinMode(relais2, OUTPUT); digitalWrite
in „Arduino UNO an 4fach Relais“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_nov08c.ino
int led = 8; int taster=7; int relais1=3; int relais2=2; int Relstat1 = LOW; int Relstat2 = LOW; int tasterstatus = HIGH; int Taststat=LOW; unsigned long time; long previousMillis = 0; // will store last time LED was updated int Zaehler =0 ; long interval = 30000; // interval at which to blink (milliseconds) void setup() //Hier beginnt das Setup. { pinMode(taster, INPUT_PULLUP); //Der Pin mit der LED (Pin 7) ist jetzt ein Eingang INPUT pinMode(relais1, OUTPUT); //Der Pin mit dem Relay1 (Pin 1) ist jetzt ein Ausgang OUTPUT pinMode(relais2, OUTPUT); pinMode(led, OUTPUT); digitalWrite(relais1, HIGH); digitalWrite
in „Arduino UNO an 4fach Relais“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ESP_Webserver_Home_3.ino
#include <ESP8266WiFi.h> const char* ssid = "XXXXXX"; const char* password = "XXXXXX"; unsigned long ulReqcount; unsigned long ulReconncount; // Create an instance of the server on Port 80 WiFiServer server(80); void setup() { // setup globals ulReqcount=0; ulReconncount=0; // prepare GPIO2 pinMode(13, OUTPUT); pinMode(5, OUTPUT); digitalWrite(13, 0); digitalWrite(5, 0); // start serial Serial.begin(9600); delay(1); // inital connect WiFi.mode(WIFI_STA); WiFiStart(); } void WiFiStart() { ulReconncount++; // Connect to WiFi network Serial.println(); Serial.println(); Serial.print("Connecting to
in „ESP8266 mehrere clients auf einer webseite“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
TEC6_Hubert3.ino
int led = 8; int taster=7; int relais1=3; int relais2=2; int relais3=4; int Relstat1 = LOW; int Relstat2 = LOW; int Relstat3 = LOW; int tasterstatus = HIGH; int Taststat= LOW; // laesst das Programm nicht laufen beim Anstecken unsigned long time; long previousMillis = 0; // will store last time LED was updated int Zaehler =0 ; long interval = 3000; // interval at which to blink(milliseconds) void setup() //Hier beginnt das Setup. { pinMode(taster, INPUT_PULLUP); //Pin7 am Taster ist jetzt ein Eingang beim Drücken pinMode(relais1, OUTPUT); //Pin3 am Relay1 ist jetzt ein Ausgang pinMode(relais2,
in „Arduino UNO an 4fach Relais“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_nov12b.ino
int led = 8; int taster=7; int relais1=3; int relais2=2; int relais3=4; int Relstat1 = LOW; int Relstat2 = LOW; int Relstat3 = LOW; int tasterstatus = HIGH; int Taststat= LOW; // laesst das Programm nicht laufen beim Anstecken unsigned long time; long previousMillis = 0; // will store last time LED was updated int Zaehler =0 ; long interval1 = 3000; // interval at which to blink(milliseconds) long interval2 = 1500; void setup() //Hier beginnt das Setup. { pinMode(taster, INPUT_PULLUP); //Pin7 am Taster ist jetzt ein Eingang beim Drücken pinMode(relais1, OUTPUT); //Pin3 am Relay1 ist jetzt ein
in „Arduino UNO an 4fach Relais“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_nov12c.ino
int led1 = 9; int led = 8; int taster=7; int relais1=3; int relais2=2; int relais3=4; int Relstat1 = LOW; int Relstat2 = LOW; int Relstat3 = LOW; int tasterstatus = HIGH; int Progaus = LOW; // Programm wird unterbrochen int Taststat= LOW; // laesst das Programm nicht laufen beim Anstecken int Tastaus = LOW; // Taste wird zum ausschalten gedrückt int Tasteaus1 = LOW; int Progaus1 = LOW; int Progaus2 = LOW; unsigned long time; long previousMillis1 = 0; // will store last time LED was updated long previousMillis2 = 0; long previousMillis3 = 0; long previousMillis4 = 0; int Zaehler =0 ; long interval1
in „Arduino UNO an 4fach Relais“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_nov15b.ino
/* The circuit: * LCD RS pin to digital pin 12 * LCD Enable pin to digital pin 11 * LCD D4 pin to digital pin 5 * LCD D5 pin to digital pin 4 * LCD D6 pin to digital pin 3 * LCD D7 pin to digital pin 2 * LCD R/W pin to ground * 10K resistor: * ends to +5V and ground * wiper to LCD VO pin (pin 3) */ // include the library code: #include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); int sensorPin1 = A0; // select the input pin for the Sensor int sensorPin2 = A1; int sensorValue1 = 0; // variable to store the value coming
in „Arduino UNO an 4fach Relais“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_nov18a.ino
/* The circuit: * LCD RS pin to digital pin 12 * LCD Enable pin to digital pin 11 * LCD D4 pin to digital pin 5 * LCD D5 pin to digital pin 4 * LCD D6 pin to digital pin 3 * LCD D7 pin to digital pin 2 * LCD R/W pin to ground * 10K resistor: * ends to +5V and ground * wiper to LCD VO pin (pin 3) */ // include the library code: #include <LiquidCrystal.h> //#include <LiquidCrystal_I2C.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //LiquidCrystal_I2C lcd(0x27); // Set the LCD I2C address int sensorPin1 = A0; // select the input pin for
in „Arduino UNO an 4fach Relais“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_nov18a.ino
/* The circuit: * LCD RS pin to digital pin 12 * LCD Enable pin to digital pin 11 * LCD D4 pin to digital pin 5 * LCD D5 pin to digital pin 4 * LCD D6 pin to digital pin 3 * LCD D7 pin to digital pin 2 * LCD R/W pin to ground * 10K resistor: * ends to +5V and ground * wiper to LCD VO pin (pin 3) */ // include the library code: #include <LiquidCrystal.h> //#include <LiquidCrystal_I2C.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //LiquidCrystal_I2C lcd(0x27); // Set the LCD I2C address int sensorPin1 = A0; // select the input pin for
in „Arduino UNO an 4fach Relais“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_nov19a.ino
/* The circuit: * LCD RS pin to digital pin 12 * LCD Enable pin to digital pin 11 * LCD D4 pin to digital pin 5 * LCD D5 pin to digital pin 4 * LCD D6 pin to digital pin 3 * LCD D7 pin to digital pin 2 * LCD R/W pin to ground * 10K resistor: * ends to +5V and ground * wiper to LCD VO pin (pin 3) */ // include the library code: #include <LiquidCrystal.h> //#include <LiquidCrystal_I2C.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //LiquidCrystal_I2C lcd(0x27); // Set the LCD I2C address int sensorPin1 = A0; // select the input pin for
in „Arduino UNO an 4fach Relais“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_nov26a.ino
/* * Programm so aufteilen das mit zwei Tasten verschiedene Zeitenabläufe gestartet werden The circuit: * LCD RS pin to digital pin 12 * LCD Enable pin to digital pin 11 * LCD D4 pin to digital pin 5 * LCD D5 pin to digital pin 4 * LCD D6 pin to digital pin 3 * LCD D7 pin to digital pin 2 * LCD R/W pin to ground * 10K resistor: * ends to +5V and ground * wiper to LCD VO pin (pin 3) */ // include the library code: #include <LiquidCrystal.h> //#include <LiquidCrystal_I2C.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //LiquidCrystal_I2C
in „Arduino UNO an 4fach Relais“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Bruno_Timer1_Pulsformen.ino
/* IDE 1.8.19 auf Arduino Mega2560 getestet für Arduino Leonardo ATmega32U4 23.04.2023 https://www.mikrocontroller.net/topic/553491#7395414 */ // Auf ATmega32U4 ist PB6 Arduino Pin 10 // const uint8_t pinPulsOut {12}; // OC1B bzw. PB6 invertiert const uint8_t ANZAHLTASTER {4}; const uint8_t ANZAHLPULSFORM {ANZAHLTASTER+1}; // wegen Default Dummy Pulsform const bool DEBUG {false}; const bool DEBUGTASTER {true}; const byte pinTaster [ANZAHLTASTER] {2, 3, 4, 5}; struct TasterDaten { uint8_t alt {ANZAHLTASTER}; // Default keine Taste gedrückt uint8_t neu {ANZAHLTASTER}; // }; TasterDaten taster; struct
in „Präzise Pulse aus Arduino Leonardo“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Steckspiel_Sound_15Titel.ino
//Sound mit 15 Titel #include "Arduino.h" #include "SoftwareSerial.h" #include "DFRobotDFPlayerMini.h" #define pinLedPlay 13 SoftwareSerial mySoftwareSerial(10, 11); // RX, TX DFRobotDFPlayerMini myDFPlayer; int buttonPins[15] = {2, 3, 4, 5, 6, 7, 8, 9, 12, 14, 15, 16, 17, 18, 19}; // Pins, an denen die Taster angeschlossen sind void setup() { mySoftwareSerial.begin(9600); // Start der SoftwareSerial Kommunikation Serial.begin(115200); // Start der "normalen" seriellen Kommunikation für den Serial Monitor pinMode(pinLedPlay, OUTPUT); if (!myDFPlayer.begin(mySoftwareSerial)) { // Verbindung der
in „Arduino Programmierung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Steckspiel_Sound_15Titel.ino
//Sound mit 15 Titel #include "Arduino.h" #include "SoftwareSerial.h" #include "DFRobotDFPlayerMini.h" #define pinLedPlay 13 SoftwareSerial mySoftwareSerial(10, 11); // RX, TX DFRobotDFPlayerMini myDFPlayer; int buttonPins[15] = {2, 3, 4, 5, 6, 7, 8, 9, 12, 14, 15, 16, 17, 18, 19}; // Pins, an denen die Taster angeschlossen sind bool buttonPressed[15]; void setup() { mySoftwareSerial.begin(9600); // Start der SoftwareSerial Kommunikation Serial.begin(115200); // Start der "normalen" seriellen Kommunikation für den Serial Monitor pinMode(pinLedPlay, OUTPUT); if (!myDFPlayer.begin(mySoftwareSerial
in „Arduino Programmierung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Steckspiel_Sound_15Titel.ino
//Sound mit 15 Titel #include "Arduino.h" #include "SoftwareSerial.h" #include "DFRobotDFPlayerMini.h" #define pinLedPlay 13 SoftwareSerial mySoftwareSerial(10, 11); // RX, TX DFRobotDFPlayerMini myDFPlayer; int buttonPins[15] = {2, 3, 4, 5, 6, 7, 8, 9, 12, 14, 15, 16, 17, 18, 19}; // Pins, an denen die Taster angeschlossen sind bool buttonPressed[15]; bool win; void setup() { mySoftwareSerial.begin(9600); // Start der SoftwareSerial Kommunikation Serial.begin(115200); // Start der "normalen" seriellen Kommunikation für den Serial Monitor pinMode(pinLedPlay, OUTPUT); if (!myDFPlayer.begin(mySoftwareSerial
in „Arduino Programmierung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
H_Encoder_entprellen_PeDa.ino
#include <Arduino.h> /************************************************************************/ /* */ /* Debouncing 8 Keys */ /* Sampling 4 Times */ /* With Repeat Function */ /* */ /* Author: Peter Dannegger */ /* danni@specs.de */ /* */ /************************************************************************/ #include <stdint.h> #include <avr/io.h> #include <avr/interrupt.h> uint8_t get_key_press( uint8_t key_mask ); uint8_t get_key_rpt ( uint8_t key_mask ); uint8_t get_key_state( uint8_t key_mask ); uint8_t get_key_short( uint8_t key_mask ); uint8_t get_key_long ( uint8_t key_mask ); void
in „Peter Dannegger´s ( PeDa ) Entprellroutine in ein Arduino Sketch einbinden“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
SM_Achse_1_OK.ino
#include <Arduino.h> /************************************************************************/ /* */ /* Reading rotary encoder */ /* one, two and four step encoders supported */ /* */ /* Author: Peter Dannegger */ /* target: ATmega16 */ /************************************************************************/ #include <stdint.h> #include <avr/io.h> #include <avr/interrupt.h> //#define XTAL 8e6 // 8MHz #define F_TIMER1 100 // Timer 1 frequency /Hz //////////////////////////////////////////////////////////////////////////////// // Tastenentprellung // #define KEY_DDR DDRC #define KEY_PORT PORTC
in „CRS Robotics A255 Roboterarm“ · Analoge Elektronik und Schaltungstechnik ·
-
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
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 ·