-
Datei
Radarmessgereat_vs3__f.ino
/* I've tested it to be accurate to at least 96% (usually around 99.5%). It should be able to measure frequencies up to about 6.5MHz(8MHz optimally) Powered at 5V (5V LCD), Arduino running at 16MHz D2 - RS (LCD) D3 - R/W (LCD) D4 - E (LCD) D5 - Frequency input D6 - DB4 (LCD) D7 - DB5 (LCD) D8 - DB6 (LCD) D9 - DB7 (LCD) D10 - Gate of NPN transistor (Collector tied to 5V, emitter tied to LCD backlight pin) */ #include <LiquidCrystal.h> // initializieren der interface-pins vom LCD LiquidCrystal lcd(2, 3, 4, 6, 7, 8, 9); //int brightness; unsigned int tovf1 = 0; // Überlaufvariable des Zählers unsigned
in „Frequenzmessung für Radar-Geschwindigkeitsmessung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
RFM70_Transceiver_2.ino
#include "Arduino.h" #include <rfm70.h> pins::uc_pin ce( 8 ), csn( 10 ), mosi( 11 ), miso( 12 ), sck( 5 ); pins::uc_pin led_tx( 13 ); rfm70 radio( sck, mosi, miso, csn, ce ); #define SEND_STATE 0 #define RECEIVE_STATE 1 int state; void setup(){ Serial.begin(9600); } void loop(){ //variables unsigned char len,i,chksum, n = 0; unsigned char rx_buf[ 10 ]; unsigned char tx_buf[ 10 ]; //init hardware radio.init(); radio.channel( 10 ); //check if radio is present if( ! radio.is_present() ) for(;;){ delay( 300 ); led_tx.set( 1 ); delay( 300 ); led_tx.set( 0 ); Serial.write("No Radio\n"); } //got to main
in „RFM70 Arduino Probleme“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
web_button8_01.ino
/* WebRelay Server von Valerius Deifeld 28.06.2013 */ #include <EtherCard.h> #define RELAY1_PIN 2 #define RELAY2_PIN 3 #define RELAY3_PIN 4 #define RELAY4_PIN 5 #define RELAY5_PIN 6 #define RELAY6_PIN 7 #define RELAY7_PIN 9 #define RELAY8_PIN 10 PROGMEM prog_char relay_off[]= { 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x08, 0x04, 0x00, 0x00, 0x00, 0xB5, 0x41, 0xE5, 0x5A, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00, 0x00, 0x02, 0x62, 0x4B, 0x47, 0x44
in „Arduini PRO MINI 5V Ethercard“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
rf24_rd185.ino
/* inspect remote control for rd185, taken from misc sources, https://bitbucket.org/rivig/v202/src/ requires https://github.com/stanleyseow/arduino-nrf24l01 */ #include <SPI.h> #include "nRF24L01.h" #include "RF24.h" #include "printf.h" // Set up nRF24L01 radio on SPI bus (CE,CSN) RF24 radio(8,9); // Radio pipe addresses // uint8_t tx_address[5] = {0x66,0x88,0x68,0x68,0x68}; // uint8_t rx_address[5] = {0x88,0x66,0x86,0x86,0x86}; // need to change byte sequence 2,3 Test only const uint64_t pipes[4] = { 0x6868688866LL, 0x8686866688LL, 0x6688686868LL, 0x8866868686LL}; // data received uint8_t data
in „Hackbarer(?) 21 EUR Quadcopter“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
rf24_jd385.ino
/* inspect remote control for jd-385, taken from misc sources, https://bitbucket.org/rivig/v202/src/ requires https://github.com/maniacbug/RF24 put in libraries/RF24, */ #include <SPI.h> #include "nRF24L01.h" #include "RF24.h" #include "printf.h" // Set up nRF24L01 radio on SPI bus (CE,CSN) RF24 radio(8,9); // Radio pipe addresses // uint8_t tx_address[5] = {0x66,0x88,0x68,0x68,0x68}; // uint8_t rx_address[5] = {0x88,0x66,0x86,0x86,0x86}; // need to change byte sequence 2,3 Test only const uint64_t pipes[2] = { 0x6868688866LL, 0x8686866688LL}; uint8_t data[16]; long lastTime=0; // The various roles
in „Hackbarer(?) 21 EUR Quadcopter“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
AccelStepper_Steuerung2.ino
#include <AccelStepper.h> #include <Makeblock.h> #include <Arduino.h> #include <SoftwareSerial.h> #include <Wire.h> /* * Setzen der Ein- und Ausgänge des Arduino Boards */ AccelStepper stepperX(AccelStepper::DRIVER, 13, 12); // 13-PUL,12-DIR OR 2-PUL, 8-DIR AccelStepper stepperY(AccelStepper::DRIVER, 2, 8); int motorDrc = 4; //M1 int motorPwm = 5; //M1 MeLimitSwitch limitSwitchX(PORT_7); //Me_LimitSwitch module can only be connected to the PORT_3, PORT_4, PORT_6, PORT_7 and PORT_8 of Me - Base Shield. MeLimitSwitch limitSwitchY(PORT_8); /* * Benötigte Variablen */ long current_positionY; long
in „Arduino Funktionen in der Setup“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_mar16a.ino
int a =2; int b =3; int c =4; int d =5; int e =6; int f =7; int g =8; int h =9; int i =10; int alarm =1; void setup() { pinMode(1,OUTPUT); pinMode(2,OUTPUT); pinMode(3,OUTPUT); pinMode(4,OUTPUT); pinMode(5,OUTPUT); pinMode(6,OUTPUT); pinMode(7,OUTPUT); pinMode(8,OUTPUT); pinMode(9,OUTPUT); pinMode(alarm,OUTPUT); } void loop() { digitalWrite(a, HIGH); digitalWrite(b, HIGH); digitalWrite(c, HIGH); digitalWrite(e, HIGH); digitalWrite(f, HIGH); digitalWrite(g, HIGH); delay ( 18 000 000 ); digitalWrite(a, LOW); digitalWrite(b, LOW); digitalWrite(c, LOW); digitalWrite(e, LOW); digitalWrite(f, LOW); digitalWrite
in „Arduino Board UNO beim Upload kommt Fehlermeldung!“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Giga_008_Poti_Scala.ino
// Programm für Arduino Giga mit Bildschirm // Giga_008_Poti_Scala // LED_PR1 = D51/PE5, LED_PR2 = D40/PE6, PR1 = A11/PA0_C, PR2 = A10/PA1_C #include <Arduino_GigaDisplay_GFX.h> #include <Arduino_GigaDisplay.h> #include "Fonts/FreeMonoBold18pt7b.h" GigaDisplay_GFX display; // create the object #include <farbe16.h> #define PR1 A11 #define PR2 A10 #define LED_PR1 51 #define LED_PR2 40 #define DRE_A 35 #define DRE_B 36 #define DRE_KN 34 #define GIGA_RED 86 #define GIGA_GREEN 87 #define GIGA_BLUE 88 // Einstellungen für Scala und Rahmen #define SCALAEIN 0 // 1 = Scala eingeschaltet (Scala selbst, ohne
in „Arduino GIGA + GigaDisplay Scala Problem“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_mar14f.ino
struct TxBox { int x1, y1; //class/struct Point int x2, y2; //class/struct Point int upBorderAttr; int dwnBorderAttr; int txFieldAttr; }; TxBox tbox { x1: 0, y1: 0, x2: 40, y2: 10, upBorderAttr: 0x70, dwnBorderAttr: 0xae, txFieldAttr: 0x2e }; void ansiTxBox(const TxBox &box) { int x; x= box.x1; Serial.println("\n\r Nur eine Testausgabe \n\r"); } void setup() { Serial.begin(115200); tbox = { x1: 5, y1: 6, x2: 40, y2: 10, upBorderAttr: 0x70, dwnBorderAttr: 0xae, txFieldAttr: 0x2e }; tbox.x2 = 85; ansiTxBox(tbox); } void loop() { }
in „Arduino und struct gefallen sich nicht !“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
I2c_scanner.ino
/* I2C Scanner Boardeinstellung in Arduino IDE ESP32 Wrover Module Ergebnis 19.3.2026 Alle möglichen I2C pins probiert, kein Device Antwortet Scanning... No I2C devices found */ #include <Wire.h> //#define IIC_CLK 27 //#define IIC_DATA 25 //#define IIC_CLK 32 //#define IIC_DATA 33 #define IIC_CLK 18 #define IIC_DATA 23 #define GPIO_PA_EN 21 void setup() { Serial.begin(115200); pinMode(IIC_CLK, INPUT_PULLUP); // Force ESP32 internal pull-ups pinMode(IIC_DATA, INPUT_PULLUP); //pinMode(0, OUTPUT); digitalWrite(0, HIGH); // Boot0 to power ES8388 codec // Enable amplifier //pinMode(GPIO_PA_EN, OUTPUT
in „ESP32 WAV-Player: Praxiswert der CPU-Geschwindigkeit gesucht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Giga_009_Poti_Scala.ino
// Programm für Arduino Giga mit Bildschirm // Giga_009_Poti_Scala // LED_PR1 = D51/PE5, LED_PR2 = D40/PE6, PR1 = A11/PA0_C, PR2 = A10/PA1_C #include <Arduino_GigaDisplay_GFX.h> #include <Arduino_GigaDisplay.h> #include "Fonts/FreeMonoBold18pt7b.h" GigaDisplay_GFX display; // create the object #include <farbe16.h> #define PR1 A11 #define PR2 A10 #define LED_PR1 51 #define LED_PR2 40 #define DRE_A 35 #define DRE_B 36 #define DRE_KN 34 #define GIGA_RED 86 #define GIGA_GREEN 87 #define GIGA_BLUE 88 // Einstellungen für Scala und Rahmen #define SCALAEIN 0 // 1 = Scala eingeschaltet (Scala selbst, ohne
in „Lib für Arduino Giga machen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Giga_010_Poti_Scala.ino
// Programm für Arduino Giga mit Bildschirm // Giga_010_Poti_Scala // LED_PR1 = D51/PE5, LED_PR2 = D40/PE6, PR1 = A11/PA0_C, PR2 = A10/PA1_C // Arbeit mit class #include <Arduino_GigaDisplay_GFX.h> #include <Arduino_GigaDisplay.h> #include "Fonts/FreeMonoBold18pt7b.h" GigaDisplay_GFX display; // create the object #include <farbe16.h> #define PR1 A11 #define PR2 A10 #define LED_PR1 51 #define LED_PR2 40 #define DRE_A 35 #define DRE_B 36 #define DRE_KN 34 #define GIGA_RED 86 #define GIGA_GREEN 87 #define GIGA_BLUE 88 class Maxim_scala{ public: // Beschreibung von Konstruktor. xo,yo,xu,yu - äußere Maße
in „Lib für Arduino Giga machen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Giga_011_Poti_Scala.ino
// Programm für Arduino Giga mit Bildschirm // Giga_011_Poti_Scala // LED_PR1 = D51/PE5, LED_PR2 = D40/PE6, PR1 = A11/PA0_C, PR2 = A10/PA1_C // Arbeit mit class als Lib #include <Arduino_GigaDisplay_GFX.h> #include <Arduino_GigaDisplay.h> #include "Fonts/FreeMonoBold18pt7b.h" #include <Maxim_scala.h> #include <farbe16.h> #define PR1 A11 #define PR2 A10 #define LED_PR1 51 #define LED_PR2 40 #define DRE_A 35 #define DRE_B 36 #define DRE_KN 34 #define GIGA_RED 86 #define GIGA_GREEN 87 #define GIGA_BLUE 88 uint16_t WERT_L, WERT_R; long meintime = 0; int16_t zaehler = 0; long dauer = 0; #define SYMB_LINKE_ZAHL
in „Lib für Arduino Giga machen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Giga_012_Poti_Scala.ino
// Programm für Arduino Giga mit Bildschirm // Giga_012_Poti_Scala // LED_PR1 = D51/PE5, LED_PR2 = D40/PE6, PR1 = A11/PA0_C, PR2 = A10/PA1_C // Arbeit mit class als Lib, Variante mit Referenz // Sketch uses 160320 bytes (8%) of program storage space. Maximum is 1966080 bytes. // Global variables use 55336 bytes (10%) of dynamic memory, leaving 468288 bytes for local variables. Maximum is 523624 bytes. #include <Arduino_GigaDisplay_GFX.h> #include <Arduino_GigaDisplay.h> #include "Fonts/FreeMonoBold18pt7b.h" #include <Maxim_scala_ref.h> #include <farbe16.h> #define PR1 A11 #define PR2 A10 #define
in „Lib für Arduino Giga machen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Giga_011_Poti_Scala.ino
// Programm für Arduino Giga mit Bildschirm // Giga_011_Poti_Scala // LED_PR1 = D51/PE5, LED_PR2 = D40/PE6, PR1 = A11/PA0_C, PR2 = A10/PA1_C // Arbeit mit class als Lib, Variante mit Zeiger // Sketch uses 160320 bytes (8%) of program storage space. Maximum is 1966080 bytes. // Global variables use 55336 bytes (10%) of dynamic memory, leaving 468288 bytes for local variables. Maximum is 523624 bytes. #include <Arduino_GigaDisplay_GFX.h> #include <Arduino_GigaDisplay.h> #include "Fonts/FreeMonoBold18pt7b.h" #include <Maxim_scala.h> #include <farbe16.h> #define PR1 A11 #define PR2 A10 #define LED_PR1
in „Lib für Arduino Giga machen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Timer4_HighSpeed.ino
#include <arduino.h> byte intVar_OC4 = 61; void timer4_ctc_init(void); void setup() { // put your setup code here, to run once: Serial.begin(115200); Serial.println(F("HALLO")); pinMode(13,OUTPUT); digitalWrite(13,LOW); delay(1000); digitalWrite(13,HIGH); delay(1000); digitalWrite(13,LOW); delay(1000); digitalWrite(13,HIGH); timer4_ctc_init(); } void loop() { // put your main code here, to run repeatedly: if (Serial.available()>0) intVar_OC4 =Serial.parseInt(); OCR4C= intVar_OC4; Serial.println(intVar_OC4); delay(500); } void timer4_ctc_init(void) { PLLCSR=(1<<PINDIV) | (1<<PLLE) | (0<<PLOCK);
in „Wie baut man eine Endstufe für einen Mittelwellensender (160m Band)?“ · HF, Funk und Felder ·
-
Datei
Lambdacontroller_ai_claude_2.ino
#include <Arduino.h> #include <SPI.h> #include <avr/io.h> #include <util/delay.h> #include <avr/pgmspace.h> // ----------------------------- // Pin-Zuordnung MegaCore AT90CAN64 // ----------------------------- #define CJ125_CS_PIN 8 // PB0 #define HEATER_OUTPUT_PIN 12 // PB4, Low-Side MOSFET #define LED_ONOFF_PIN 15 // PB7 #define LED_STATUS_POWER 7 // PE7 #define LED_STATUS_HEATER 6 // PE6 #define UB_ANALOG_INPUT_PIN 48 // PF3 -> UBatt #define UR_ANALOG_INPUT_PIN 49 // PF4 -> UR #define UA_ANALOG_INPUT_PIN 50 // PF5 -> UA // ----------------------------- // CJ125 Register / Konstanten // ----
in „Bosch CJ125 mit AVR AT90CAN64“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Arduino_Compare_Match_Test.ino
// ************************************** // Timwer1 Compare Match Test // ************************************** volatile uint8_t irq_flag = 0; volatile uint16_t temp_count; // ************************************** void flash_led() { digitalWrite(LED_BUILTIN, HIGH); delay(200); digitalWrite(LED_BUILTIN, LOW); } // ************************************** void setup() { TCCR1A = 0; // bei Arduino wichtig TCCR1B = 0; //TCCR1C = 0; // initialize digital pin LED_BUILTIN as an output. pinMode(LED_BUILTIN, OUTPUT); Serial.begin(115200); // ---------------------------------------------- //pinMode(PinMotorRight
in „Simpler Timer-CTC-Code funktioniert nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Print_test_Function_call.ino
#include <SPI.h> #include <Wire.h> #include "DS3231.h" #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include "thermalprinter.h" #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels #define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); Epson TM88(&Serial1); // init the Printer with HW-Serial (Serial1) RTClib RTC; DateTime time_now; void setup() { // put your setup code here, to run once: Serial1.begin(9600); //open Printer connection
in „Arduino: Ausgabe Zeit als Funktionsaufruf für mehreren "Devices"“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
EinkStromMessenFunktioniert.ino
#include <Arduino.h> #include <U8g2lib.h> #include <Wire.h> #define iddAddr 0x42 #define EPD_CS PA15 #define EPD_DC PB11 #define EPD_RESET PB2 #define EPD_BUSY PA8 #define EPD_POWER PB10 #define EPD_SPI_MOSI PB5 #define EPD_SPI_MISO PB4 #define EPD_SPI_SCK PB3 U8G2_SSD1606_172X72_F_4W_SW_SPI u8g2(U8G2_R0, EPD_SPI_SCK, EPD_SPI_MOSI, EPD_CS, EPD_DC, EPD_RESET); volatile int stron; String power = "No Data"; void setup(void) { pinMode(EPD_POWER, OUTPUT); digitalWrite(EPD_POWER, 0); pinMode(LED_BUILTIN, OUTPUT); Serial.begin(115200); Serial.println("ATCnetz.de"); Wire.begin(); pinMode(PC13, INPUT); Idd_Init
-
Datei
Mini-Cam-Server-Test.ino
#include <WiFi.h> #include <WiFiClient.h> #include <WebServer.h> #include "esp_camera.h" #include "SPIFFS.h" #include "FS.h" const char* ssid = "xxxxxxxxx"; const char* password = "xxxxxxxxxxx"; WebServer server(80); //Camera #define PWDN_GPIO_NUM 26 #define RESET_GPIO_NUM -1 #define XCLK_GPIO_NUM 32 #define SIOD_GPIO_NUM 13 #define SIOC_GPIO_NUM 12 #define Y9_GPIO_NUM 39 #define Y8_GPIO_NUM 36 #define Y7_GPIO_NUM 23 #define Y6_GPIO_NUM 18 #define Y5_GPIO_NUM 15 #define Y4_GPIO_NUM 4 #define Y3_GPIO_NUM 14 #define Y2_GPIO_NUM 5 #define VSYNC_GPIO_NUM 27 #define HREF_GPIO_NUM 25 #define PCLK_GPIO_NUM
in „ov2640 Bild schießen und speichern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
KidsMP3Player.ino
#include <Arduino.h> #include <SoftwareSerial.h> #include <avr/sleep.h> #include <avr/eeprom.h> #include "DFMiniMp3.h" #define EEPROM_CFG 1 #define EEPROM_FOLDER 2 #define EEPROM_TRACK 4 #define BUTTON_TOLERANCE 25 #define LONG_KEY_PRESS_TIME_MS 2000L #define VOLUME_CHECK_INTERVAL_MS 200L #define PLAY_DELAY_MS 500L #define FADE_OUT_MS 3L * 1000L * 60L #define PIN_KEY A3 #define PIN_VOLUME A2 #define PIN_VOLUME_INTERNAL A1 // Uncomment to use button 11 as button "previous" // #define USE_PREVIOUS_BUTTON #define NO_FOLDERS 11 #ifdef USE_PREVIOUS_BUTTON #define NO_FOLDERS 10 #endif void playFolderOrNextInFolder
in „Projekt fertiggestellt: MP3 Player für Kinder auf ATTiny-Basis“ · Projekte & Code ·
-
Datei
sketch_may21a.ino
#include <avr/sleep.h> const byte unbenutzt1 = 0; const byte IN1 = 1; const byte unbenutzt2 = 2; const byte IN0 = 3; const byte OUT1 = 4; const unsigned int Frequenz1 = 100; // ms const unsigned int Frequenz2 = 3000; const unsigned int Frequenz3 = 100; void setup() { pinMode(IN0, INPUT); pinMode(IN1, INPUT); pinMode(OUT1, OUTPUT); pinMode(unbenutzt1, INPUT_PULLUP); pinMode(unbenutzt2, INPUT_PULLUP); GIMSK |= _BV(PCIE); // Enable Pin Change Interrupts } void sleep() { cli(); PCMSK |= _BV(PCINT3) |_BV(PCINT1); // Use as interrupt pin ACSR |= _BV(ACD); ADCSRA &= ~(1<<ADEN); // Testweise ADC off Befehl
in „Attiny13A Stromverbrauch im Standby vermindern - wie?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
servoTestRudi3.ino
#include <Servo.h> Servo W1; int T1 = A0; int L1 = 8; int S1 = 7; char SW1 = '0'; void setup() { pinMode(A0, INPUT); pinMode(8, OUTPUT); } void loop() { if(digitalRead(T1) == HIGH) { if (SW1 == 'R') { W1.attach(S1); digitalWrite(L1, HIGH); for (int i = 200; i >=0; i--){ W1.write(i); delay (10); // Slow } SW1 = 'L'; // bin Links delay(500); W1.detach(); } else { W1.attach(S1); digitalWrite(L1, LOW); for (int i = 0; i <=200; i++){ //und langsam W1.write(i); delay (10); //Slow } //W1.write(200); SW1 = 'R'; // bin Rechts delay(500); W1.detach(); } while (digitalRead(T1) == HIGH) delay(1); } }
in „Servo am Arduino Positionsanzeige mit LED“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
KidsMP3Player.ino
#include <Arduino.h> #include <SoftwareSerial.h> #include <avr/sleep.h> #include <avr/eeprom.h> #include "DFMiniMp3.h" #define EEPROM_CFG 1 #define EEPROM_FOLDER 2 #define EEPROM_TRACK 4 #define BUTTON_TOLERANCE 25 #define LONG_KEY_PRESS_TIME_MS 2000L #define VOLUME_CHECK_INTERVAL_MS 200L #define PLAY_DELAY_MS 500L #define FADE_OUT_MS 3L * 1000L * 60L #define PIN_KEY A3 #define PIN_VOLUME A2 #define PIN_VOLUME_INTERNAL A1 // Uncomment to use button 11 as button "previous" // #define USE_PREVIOUS_BUTTON // Uncomment to make player pause playback on minimum volume // #define PAUSE_ON_MIN_VOLUME #define NO_FOLDERS
in „Projekt fertiggestellt: MP3 Player für Kinder auf ATTiny-Basis“ · Projekte & Code ·
-
Datei
FlipDot_Test6.ino
///////////////// Flipdot 28x28 ////////////////////// // // Testsoftware für ein LAWO-Modul // // Hardware: Arduino Nano // // Pinbelegung: // Digital 8 PB0 -> FP2800 A0 Zeile // Digital 9 PB1 -> FP2800 A1 Zeile // Digital 10 PB2 -> FP2800 A2 Zeile // Digital 11 PB3 -> FP2800 B0 Zeile // Digital 12 PB4 -> FP2800 B1 Zeile // Analog 0 PC0 -> FP2800 A0 Spalte // Analog 1 PC1 -> FP2800 A1 Spalte // Analog 2 PC2 -> FP2800 A2 Spalte // Analog 3 PC3 -> FP2800 B0 Spalte // Analog 4 PC4 -> FP2800 A1 Spalte // Analog 5 PC5 -> FP2800 DATA Spalte // Digital 5 PD5 -> FP2800 Enable1 Spalte // Digital 6 PD6
in „Arduino Nano Bitmanipulation“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
FlankenErkennenLangKurz.ino
#include <CombiePin.h> #include <CombieTimer.h> #include <CombieTools.h> using Combie::Tools::FlankenErkennung; using Combie::Timer::EntprellTimer; using Combie::Timer::RisingEdgeTimer; using EingabeTaster = Combie::Pin::TasterGND<2>; // Taster zwischen Pin und GND(invertierend) EingabeTaster taster; EntprellTimer entprellen(20); RisingEdgeTimer ton(1000); //ms langer Tastendruck FlankenErkennung flankenerkennungkurz; FlankenErkennung flankenerkennunglang; void setup() { Serial.begin(9600); taster.initPullup(); } void loop() { bool druck = entprellen = taster; if(flankenerkennungkurz = druck)
in „Long Button Press“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
-
Datei
sketch_sep06a.ino
#include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display void setup() { lcd.init(); // initialize the lcd lcd.init(); // Print a message to the LCD. lcd.backlight(); lcd.setCursor(1,0); lcd.print("hello everyone"); lcd.setCursor(1,1); lcd.print("konichiwaa"); } void loop() { }
in „I2C Display an arduino uno“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
test_PWM_esp32.ino
int freq = 1000; // int resolution = 7; // 0-127 int PWMPins[] = {12,14,15,2,4,27,16,13,18,21,26,25,23,19,33,32} ; //int PWMPins[] = {12,14,15,2 ,4,27,16,13, 18,21,26,25, 23,19,33,32} ;; // Pins für Lolin32 !!!! void setup() { Serial.begin(115200); // Initialize the output variables as output for(int i = 0; i < 16; i++) { //Set PWM pinMode(PWMPins[i], OUTPUT); ledcSetup(i, freq, resolution); ledcAttachPin(PWMPins[i], i); } Serial.println("End Setup"); } // end setup // *************************************************************************** void loop(){ ledcWrite(8, 126); delay(2000); ledcWrite
in „ESP32 LED Steuerung mit 16 PWM Kanälen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Pluggit_Drucksensorboard_V3.ino
// Ersatzboard Drucksensor für Pluggit V3 // https://www.mikrocontroller.net/topic/477458 // Eingesetzer Controller: ArduinoProMini 3.3V/8MHz // Sensoren: 2 Stück Sensirion SDP-810-500Pa // Erstellt: 30.06.20 Daniel F. // neu V2: Testfunktion um beide Ausgänge auf 10V zu schalten // neu V2: Dämpfung des Sensorsignals // neu V3: PWM nun auf Pins 9&10 mit 12bit Auflösung // neu V3: Nachbildung auch von der neueren SDP1000-L05-Platine wenn Pin2 auf GND gesetzt ist const int PWM10VS1 = 3930; //PWM(0...4095) für Justage 10V-Ausgangsspannung Sensor1 (Abgleich Analogschaltung Spannungsverstärker) const
in „Eigenentwicklung Ersatzplatine Drucksensorboard für Pluggit“ · Haus & Smart Home ·
-
Datei
timestamp2DateTime.ino
/*********************************************************** * convert a Unix-time-stamp into bytes as single value * function works up to 1972 until 19.01.2038 * this code is free-ware and can modified by every-one * in: time-stamp in variable * out: single values into separated variables like declarations ***********************************************************/ void Timestamp2DateTime(){ // declaration outside of this function as it can cause a stack overflow if they are declared in the function // unsigned int year =0; byte month =0; int day =0; int years=0; // byte hour =0; byte minute =0; byte
in „ESP8266 Code für timestamp 2 date & time“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Example1_DisplayTest.ino
/* Verify that your Qwiic Transparent Grahical OLED is connected correctly and working. By: Owen Lyke SparkFun Electronics Date: February 26, 2019 License: MIT. See license file for more information but you can basically do whatever you want with this code. Feel like supporting open source hardware? Buy a board from SparkFun! https://www.sparkfun.com/products/15173 The graphics library is like a 3-layer cake. Here they are from top-down https://github.com/sparkfun/SparkFun_HyperDisplay https://github.com/sparkfun/HyperDisplay_SSD1309_ArduinoLibrary https://github.com/sparkfun/HyperDisplay_UG2856KLBAG01
in „Arduino OLED Display Ansteuern & "Hello World" Programme gehen nicht.“ · Softwareentwicklung ·
-
Datei
sketch_nov14a.ino
const byte BUFLEN = 20; char readData[BUFLEN]; const char *INIT_COMMAND = "re"; const char *TABLE_LAYOUT_COMMAND = "tl"; const char *HIGHLIGHT_BOX_COMMAND = "hb"; const char *DELIMITER = "|"; const byte ANZAHL_LEDS = 8; const byte pin_indices[ANZAHL_LEDS] = {9, 8, 7, 6, 5, 4, 3, 2}; void setup() { for (byte i = 0; i < ANZAHL_LEDS; i++) { pinMode(pin_indices[i], OUTPUT); } TCCR1B = 0; TCCR1A = 0; TIMSK1 = 0; TCCR1B = _BV(CS12) | _BV(CS10); Serial.begin(9600); } void loop() { if (readSerial() ) { processReadData(); } } bool readSerial() { bool state = false; static byte index = 0; while (Serial.available
in „Arduino Uno Serial stört Timer1 Interrupts?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_nov14a.ino
#include <Wire.h> // auch einmal auskommentieren wegen DWARF Error const byte BUFLEN = 20; char readData[BUFLEN]; const char *INIT_COMMAND = "re"; const char *TABLE_LAYOUT_COMMAND = "tl"; const char *HIGHLIGHT_BOX_COMMAND = "hb"; const char *DELIMITER = "|"; const byte ANZAHL_LEDS = 8; const byte pin_indices[ANZAHL_LEDS] = {9, 8, 7, 6, 5, 4, 3, 2}; void setup() { for (byte i = 0; i < ANZAHL_LEDS; i++) { pinMode(pin_indices[i], OUTPUT); } TCCR1B = 0; TCCR1A = 0; TIMSK1 = 0; TCCR1B = _BV(CS12) | _BV(CS10); Serial.begin(9600); } void loop() { if (readSerial() ) { processReadData(); } } bool readSerial() {
in „DWARF error: invalid abstract instance DIE ref“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ESP_IN-9-asyncMQTT.ino
/*-------------------------------------------------- v1.0 MSoft 14.05.2016 ESP-01 - 1MBit-Flash Mno 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 "xxxxxxx" #define WIFI_PASSWORD "xxxxxxx" #define MQTT_HOST IPAddress(192, 168, 0, 99) #define MQTT_PORT 1883 // WiFi WiFiEventHandler
in „ESP Frage zu Setup-Code, mit reconnect, etc.“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
_P168_ThermOLED.ino
/*########################################################################################## ##################### Plugin 168: OLED SSD1306 display for Thermostat #################### ########################################################################################## This is a modification to Plugin_036 with graphics library provided from squix78 github https://github.com/squix78/esp8266-oled-ssd1306 Features : - Displays and use current temperature from specified Device/Value (can be a Dummy for example) - Displays and maintains setpoint value - on power down/up this plugin maintains and
in „ESPEasy Sketch Kompilierungsfehler“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
AsyncUDPServer_AccessPoint.ino
#include "WiFi.h" #include "AsyncUDP.h" AsyncUDP udp; #define MODE_AP #ifdef MODE_AP // For AP mode: const char *ssid = "LK8000"; // You will connect your phone to this Access Point const char *pw = "Flightcomputer"; // and this is the password IPAddress ip(192, 168, 4, 1); // From RoboRemo app, connect to this IP IPAddress netmask(255, 255, 255, 0); #endif #define SERIAL0_UDP_PORT 8880 // Wifi Port UART0 void setup() { Serial.begin(115200); //WiFi.mode(WIFI_STA); #ifdef MODE_AP Serial.println("Open ESP Access Point mode"); //AP mode (phone connects directly to ESP) (no router) WiFi.mode(WIFI_AP);
in „ESP32 UDP Server“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sketch_dec23a.ino
#define COMP_RES 10000 unsigned int readDummy; volatile unsigned int noEventCntr = 0, logOnPPM = 0, channels[7], chnlCntr = 0, chnlCntrOld = 0; unsigned int serCntr = 0, tmp, multiSwCntr = 0, multiSwCntrOld = 0, perCntr = 0, perCntrOld = 0; volatile static unsigned int pulseBegin = 0, pulseEnd = 0, result, resultOld; uint16_t duty = 0; void handler_channel_1(void); class ActuatorPin{ public: #define MAX_SERVO_VAL 9000 #define MIN_SERVO_VAL 3000 #define PWM_MODE 0 #define SERVO_MODE 1 ActuatorPin(uint16_t mode = 0, volatile uint32_t *pinCntrlReg = &GPIOA_BASE->CRH, uint16_t portPin = 0, volatile
in „Blue Pill unter Arduino und RC-Model Servo-Signale“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ESP8266_WifiDmx.ino
#include "Arduino.h" #include <ESP8266WiFi.h> #include <ESP8266WebServer.h> #include <ESPDMX.h> #include <EEPROM.h> /* debug request string on web page */ #define WEBSITE_DEBUG_REQUEST 0 /* pin definitions for LEDs and cfg-reset */ #define PIN_LEDG 4 #define PIN_LEDR 5 #define PIN_CFGR 0 #define PIN_DMXO 2 /* define web page content */ static const String webSite = /* website general preface */ "<!DOCTYPE HTML>\n" "<HTML>\n" "<HEAD>\n" "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n" "</HEAD>\n" /* java scripting */ "<SCRIPT>\n" "var xmlFirst=1;\n" "var xmlHttp=createXmlHttpObject
in „FreeRTOS - ESP8266 "vergisst" Bytes beim Senden über SPI“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
OLED_LCD_Testcode_mit_Drehgeber.ino
/* This is an example of how to use the OLED 128x64 I2C with SSD1306 driver using the Adafruit library. It also applies to the 128x32 version, but not all components would fit the smaller screen. Pins: * GND = GND * VCC = 5V * SCL = A5 * SDA = A4 You can connect VCC to 3.3V to reduce the amount of high pitched noise that the display produces. It's a good idea to put a resistor between A4-5V and A5-5V to help stabilize the connection. What that does is pull-up the I2C pins to make it more reliable and prevents lock-ups. Libraries needed: https://github.com/adafruit/Adafruit_SSD1306 https://github.com
in „Arduino OLED Display hakt bei zu schneller Werteingabe“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ssd1306_interrupt_Beispiel.ino
/* This is an example of how to use the OLED 128x64 I2C with SSD1306 driver using the Adafruit library. It also applies to the 128x32 version, but not all components would fit the smaller screen. Pins: GND = GND VCC = 5V SCL = A5 SDA = A4 You can connect VCC to 3.3V to reduce the amount of high pitched noise that the display produces. It's a good idea to put a resistor between A4-5V and A5-5V to help stabilize the connection. What that does is pull-up the I2C pins to make it more reliable and prevents lock-ups. Libraries needed: https://github.com/adafruit/Adafruit_SSD1306 https://github.com/adafruit
in „Arduino OLED Display hakt bei zu schneller Werteingabe“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
KidsMP3Player.ino
#include <Arduino.h> #include <SoftwareSerial.h> #include <DFRobotDFPlayerMini.h> #include <avr/sleep.h> #include <avr/eeprom.h> #define EEPROM_CFG 1 #define EEPROM_FOLDER 2 #define EEPROM_TRACK 4 #define BUTTON_TOLERANCE 25 #define LONG_KEY_PRESS_TIME_MS 2000L #define VOLUME_CHECK_INTERVAL_MS 200L #define PLAY_DELAY_MS 500L #define FADE_OUT_MS 3L * 1000L * 60L #define READ_RETRIES 3 #define PIN_KEY A3 #define PIN_VOLUME A2 #define PIN_VOLUME_INTERNAL A1 // Uncomment to use button 11 as button "previous" // #define USE_PREVIOUS_BUTTON // Uncomment to make player pause playback on minimum volume
in „Projekt fertiggestellt: MP3 Player für Kinder auf ATTiny-Basis“ · Projekte & Code ·
-
Datei
KidsMP3Player.ino
#include <Arduino.h> #include <SoftwareSerial.h> #include <avr/sleep.h> #include <avr/eeprom.h> #include "DFMiniMp3-new.h" #define EEPROM_CFG 1 #define EEPROM_FOLDER 2 #define EEPROM_TRACK 4 #define BUTTON_TOLERANCE 25 #define LONG_KEY_PRESS_TIME_MS 2000L #define VOLUME_CHECK_INTERVAL_MS 200L #define PLAY_DELAY_MS 500L #define FADE_OUT_MS 3L * 1000L * 60L #define PIN_KEY A3 #define PIN_VOLUME A2 #define PIN_VOLUME_INTERNAL A1 // Uncomment to use button 11 as button "previous" // #define USE_PREVIOUS_BUTTON // Uncomment to make player pause playback on minimum volume // #define PAUSE_ON_MIN_VOLUME
in „Projekt fertiggestellt: MP3 Player für Kinder auf ATTiny-Basis“ · Projekte & Code ·
-
Datei
commu_rs485_A.ino
/* please add MCP_CAN_LIB to your library first........ MCP_CAN_LIB file in M5stack lib examples -> modules -> COMMU -> MCP_CAN_lib.rar */ #include <M5Stack.h> #include <mcp_can.h> #include "m5_logo.h" //Defines //----------------------------- #define rxPin 17 //--> Define from Pin #define txPin 16 //--> Define from Pin /* test RS485 first by default */ /** * variable for loop */ byte data[8] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}; /** * variable for RS485 */ // FH len fun data CRC // 01 aa 00 09 00 01 00 01 b6 char uart_buffer[9] = {0x01, 0xaa, 0x00, 0x09, 0x00, 0x01, 0x00, 0x01,
in „M5Stack COMMU Modul“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
CameraWebServer_mit2640.ino
#include "esp_camera.h" #include <WiFi.h> // // WARNING!!! Make sure that you have either selected ESP32 Wrover Module, // or another board which has PSRAM enabled // // Select camera model //#define CAMERA_MODEL_WROVER_KIT //#define CAMERA_MODEL_ESP_EYE //#define CAMERA_MODEL_M5STACK_PSRAM //#define CAMERA_MODEL_M5STACK_WIDE //#define CAMERA_MODEL_AI_THINKER #define CAMERA_MODEL_T_JOURNAL #include "camera_pins.h" const char* ssid = "Seestr16.1"; const char* password = "Abc112233445566"; void startCameraServer(); void setup() { Serial.begin(115200); Serial.setDebugOutput(true); Serial.println()
in „Türklingel per ESP32 (WLAN, SIP) an Fritzbox“ · Projekte & Code ·
-
Datei
KidsMP3Player.ino
#include <Arduino.h> #include <SoftwareSerial.h> #include <avr/sleep.h> #include <avr/eeprom.h> #include "DFMiniMp3.h" #define EEPROM_CFG 1 #define EEPROM_FOLDER 2 #define EEPROM_TRACK 4 #define BUTTON_TOLERANCE 25 #define LONG_KEY_PRESS_TIME_MS 2000L #define VOLUME_CHECK_INTERVAL_MS 200L #define PLAY_DELAY_MS 500L #define FADE_OUT_MS 3L * 1000L * 60L #define PIN_KEY A3 #define PIN_VOLUME A2 #define PIN_VOLUME_INTERNAL A1 // Uncomment to use button 11 as button "previous" // #define USE_PREVIOUS_BUTTON // Uncomment to make player pause playback on minimum volume // #define PAUSE_ON_MIN_VOLUME #define NO_FOLDERS
in „Projekt fertiggestellt: MP3 Player für Kinder auf ATTiny-Basis“ · Projekte & Code ·
-
Datei
KidsMP3Player.ino
#include <Arduino.h> #include <SoftwareSerial.h> #include <avr/sleep.h> #include <avr/eeprom.h> // #define DEBUG_DFPLAYER_COMMUNICATION #include "DFMiniMp3.h" #define EEPROM_CFG 1 #define EEPROM_FOLDER 2 #define EEPROM_TRACK 4 #define EEPROM_INIT_MAGIC 8 #define MAGIC_MARKER 0xCAFE #define BUTTON_TOLERANCE 25 #define LONG_KEY_PRESS_TIME_MS 2000L #define VOLUME_CHECK_INTERVAL_MS 200L #define PLAY_DELAY_MS 500L #define FADE_OUT_MS 3L * 1000L * 60L #define PIN_KEY A3 #define PIN_VOLUME A2 #define PIN_VOLUME_INTERNAL A1 // Uncomment to use button 11 as button "previous" // #define USE_PREVIOUS_BUTTON //
in „Projekt fertiggestellt: MP3 Player für Kinder auf ATTiny-Basis“ · Projekte & Code ·
-
Datei
BINGO_RG_1_neu.ino
//Bingozahlen bool num [76]; byte quant = 0; #include <LiquidCrystal.h> #define buzzer 10 LiquidCrystal lcd(12, 11, 5, 4, 3, 2); const int ledPin = 6; int LONG_WAIT = 2000; //Begrüßung, danach Start int START = 7; char line01 [] = "* Bingo Zahlen *"; char line02 [] = "*Samariterstift*"; char line03 [] = " Druecke Taster"; char line04 [] = "Start der Zahlen"; void eingeben() { byte n; do { n = random(75) + 1; } while (num[n] == HIGH); num[n] = HIGH; quant++; digitalWrite(ledPin, HIGH); delay(200); digitalWrite(ledPin, LOW); lcd.clear(); lcd.setCursor(2, 0); lcd.print("Zahl: "); // zeigen... lcd.println
in „BINGO Zahlen mit Arduino“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Sinus_Kondensatormotor_20200321e.ino
int potipluspin = 12; // atmega pin 18 Poti Pluspol int potischleiferpin = A5; // atmega pin 28 Poti Schleifer Über RC-TP int enuppin = 2; // atmega pin 4, Katode Optoled int enunpin = 3; // atmega pin 5, Katode Optoled int enzppin = 4; // atmega pin 6, Katode Optoled int upin = 9; // atmega pin 15, Anode Optoled int zpin = 10; // atmega pin 16, Anode Optoled int enznpin = 7; // atmega pin 13, Katode Optoled int relaispin = 8; // atmega pin 14 schaltet Relais ein int zwkpin = 13; // atmega pin 19 wird HIGH wenn die Zwischenkreisspannung größer 750VDC wird. int netzpin = 11; // atmega pin 17 über
in „Arduino Kondensatormotor Drehzahlsteuerung“ · Analoge Elektronik und Schaltungstechnik ·