Suchergebnisse für ".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
·
25.04.2023 19:00
#define IN1 2 #define IN2 3 #define IN3 4 #define IN4 5 uint8_t taste, taste_alt, pulselimit; volatile uint16_t counter = 0; volatile bool limit_pulses; volatile uint8_t tccr1b_setup, tccr1b_tmp; void setup() { sei(); // allow interrupts TIMSK1 = 0 | (1 << OCIE1B); resetTimer1(); pinMode(IN1, INPUT_PULLUP); pinMode(IN2, INPUT_PULLUP); pinMode(IN3, INPUT_PULLUP); pinMode(IN4, INPUT_PULLUP); pinMode(13, OUTPUT); digitalWrite(13, HIGH); // VCC close to PB6 for indicator LED active LOW DDRB |= (1 << PB6); // Enable OUTPUT PB6 } void loop() { taste = 0; if (!digitalRead(IN1)) taste = 1; // highest priority
in
„Präzise Pulse aus Arduino Leonardo“
·
Mikrocontroller und Digitale Elektronik
·
25.04.2023 15:01
#define IN1 2 #define IN2 3 #define IN3 4 #define IN4 5 uint8_t taste, taste_alt, pulselimit; volatile uint16_t counter=0; volatile bool limit_pulses; void setup() { sei(); // allow interrupts TIMSK1 = 0 | (1 << OCIE1B); resetTimer1(); pinMode(IN1, INPUT_PULLUP); pinMode(IN2, INPUT_PULLUP); pinMode(IN3, INPUT_PULLUP); pinMode(IN4, INPUT_PULLUP); pinMode(13, OUTPUT); digitalWrite(13, HIGH); // VCC close to PB6 for indicator LED active LOW PORTB |= (1 << PB6); // PulsePin HIGH DDRB |= (1 << PB6); // Enable OUTPUT PB6 DDRF = B11111111; PORTF = 0; } void loop() { taste = 0; if(!digitalRead(IN1)) taste
in
„Präzise Pulse aus Arduino Leonardo“
·
Mikrocontroller und Digitale Elektronik
·
25.04.2023 12:06
#define IN1 2 #define IN2 3 #define IN3 4 #define IN4 5 uint8_t taste, taste_alt, pulselimit; uint16_t counter=0; bool limit_pulses; void setup() { sei(); // allow interrupts TIMSK1 = 0 | (1 << OCIE1B); resetTimer1(); pinMode(IN1, INPUT_PULLUP); pinMode(IN2, INPUT_PULLUP); pinMode(IN3, INPUT_PULLUP); pinMode(IN4, INPUT_PULLUP); pinMode(13, OUTPUT); digitalWrite(13, HIGH); // VCC close to PB6 for indicator LED active LOW PORTB |= (1 << PB6); // PulsePin HIGH DDRB |= (1 << PB6); // Enable OUTPUT PB6 DDRF = B11111111; PORTF = 0; } void loop() { taste = 0; if(!digitalRead(IN1)) taste = 1; // highest
in
„Präzise Pulse aus Arduino Leonardo“
·
Mikrocontroller und Digitale Elektronik
·
25.04.2023 10:27
Thread
? Welche Toolchain ist besser für den Umstieg auf RTOS. Arduino ist das mit dem Schicki-Klicki-Ino -Gedöns, aber es wir auch mit GCC kompiliert. Wäre um Ratschläge dankbar. Grüße Runout
Mikrocontroller und Digitale Elektronik
· Thomas T.
· 27.04.2023 18:01
· 8 Antworten
#define pulsPin 10 // OC1B bzw. PB6 #define IN1 0 #define IN2 1 #define IN3 2 #define IN4 3 uint8_t taste, taste_alt; void setup() { pinMode(pulsPin, OUTPUT); digitalWrite(pulsPin, HIGH); // OC1B bzw. PB6 pinMode(IN1, INPUT_PULLUP); pinMode(IN2, INPUT_PULLUP); pinMode(IN3, INPUT_PULLUP); pinMode(IN4, INPUT_PULLUP); pinMode(13, OUTPUT); digitalWrite(13, HIGH); // VCC close to pulsPin for indicator LED active LOW DDRF = B11111111; PORTF = 0; } void loop() { taste = 0; if(!digitalRead(IN1)) taste = 1; // höchste Priorität else if(!digitalRead(IN2)) taste = 2; else if(!digitalRead(IN3)) taste = 3;
in
„Präzise Pulse aus Arduino Leonardo“
·
Mikrocontroller und Digitale Elektronik
·
24.04.2023 11:49
variants\\mega" "C:\\Users\\Worker\\AppData\\Local\\Temp\\arduino_build_863307\\sketch\\sketch_apr23a.ino .cpp" -o "C:\\Users\\Worker\\AppData\\Local\\Temp\\arduino_build_863307\\sketch\\sketch_apr23a.ino .cpp.o" Compiling libraries... Compiling core... "C:\\avrToolchain\\avr-gcc-12.2.0_mingw32_binutils2.40
in
„Was ist mit dem avr-gcc 12.x passiert? Internal Compiler Errors“
·
Mikrocontroller und Digitale Elektronik
·
23.04.2023 12:00
#include "Arduino.h" #include <avr/interrupt.h> //------------------------------------------------------------------------------ // 16-bit Timer/Counter 1 Overflow Interrupt alle 4ms (16Mhz/2^16) //------------------------------------------------------------------------------ ISR( TIMER1_OVF_vect ) { // r1 = interrupt Arbeitsregister // r2 = key_state ;Entprellter Tasterzustand invertiert // r3 = key_ct0 ;2-Bit Abwaertszaehler Bit0 // r4 = key_ct1 ;2-Bit Abwaertszaehler Bit1 // r5 = key_press ;Taster entprellt gedrueckt gespeichert asm volatile ( "in r1,0x0C ;PINE \n\t" "com r1 ;low activ \n\t
in
„Mit dem ATMEL STUDIO 7 klarkommen“
·
Mikrocontroller und Digitale Elektronik
·
22.04.2023 19:10
#include "Arduino.h" #include <avr/interrupt.h> //------------------------------------------------------------------------------ // 16-bit Timer/Counter 1 Overflow Interrupt alle 4ms (16Mhz/2^16) //------------------------------------------------------------------------------ ISR( TIMER1_OVF_vect ) { volatile byte r2 = 0xFF, r5 = 0; //Werden in Timer1 Compare A ISR und Main verwendet static uint8_t r1, r3 = 0xFF, r4 = 0xFF; //Fuer Timer1 Compare A ISR reserviert // r1 = interrupt Arbeitsregister // r2 = key_state ;Entprellter Tasterzustand invertiert // r3 = key_ct0 ;2-Bit Abwaertszaehler Bit0
in
„Mit dem ATMEL STUDIO 7 klarkommen“
·
Mikrocontroller und Digitale Elektronik
·
22.04.2023 12:06
#define pulsPin 10 // OC1B bzw. PB6 #define IN1 0 #define IN2 1 #define IN3 2 #define IN4 3 uint8_t taste, taste_alt; void setup() { pinMode(pulsPin, OUTPUT); digitalWrite(pulsPin, HIGH); // OC1B bzw. PB6 pinMode(IN1, INPUT_PULLUP); pinMode(IN2, INPUT_PULLUP); pinMode(IN3, INPUT_PULLUP); pinMode(IN4, INPUT_PULLUP); pinMode(13, OUTPUT); digitalWrite(13, HIGH); // VCC close to pulsPin for indicator LED active LOW DDRF = B11111111; PORTF = 0; } void loop() { taste = 0; if(!digitalRead(IN1)) taste = 1; // höchste Priorität else if(!digitalRead(IN2)) taste = 2; else if(!digitalRead(IN3)) taste = 3;
in
„Präzise Pulse aus Arduino Leonardo“
·
Mikrocontroller und Digitale Elektronik
·
21.04.2023 13:06
#define pulsPin 10 // OC1B bzw. PB6 #define IN1 0 #define IN2 1 #define IN3 2 #define IN4 3 uint8_t taste, taste_alt; void setup() { pinMode(pulsPin, OUTPUT); digitalWrite(pulsPin, HIGH); // OC1B bzw. PB6 pinMode(IN1, INPUT_PULLUP); pinMode(IN2, INPUT_PULLUP); pinMode(IN3, INPUT_PULLUP); pinMode(IN4, INPUT_PULLUP); pinMode(13, OUTPUT); digitalWrite(13, HIGH); // VCC close to pulsPin for indicator LED active LOW } void loop() { taste = 0; if(!digitalRead(IN1)) taste = 1; // niedrigste Priorität if(!digitalRead(IN2)) taste = 2; if(!digitalRead(IN3)) taste = 3; if(!digitalRead(IN4)) taste = 4; //
in
„Präzise Pulse aus Arduino Leonardo“
·
Mikrocontroller und Digitale Elektronik
·
20.04.2023 21:30
#define pulsPin 10 // OC1B bzw. PB6 #define IN1 0 #define IN2 1 #define IN3 2 #define IN4 3 uint8_t taste, taste_alt; void setup() { pinMode(pulsPin, OUTPUT); digitalWrite(pulsPin, HIGH); // OC1B bzw. PB6 pinMode(IN1, INPUT_PULLUP); pinMode(IN2, INPUT_PULLUP); pinMode(IN3, INPUT_PULLUP); pinMode(IN4, INPUT_PULLUP); pinMode(13, OUTPUT); digitalWrite(13, HIGH); // VCC close to pulsPin for indicator LED active LOW } void loop() { taste = 0; if(!digitalRead(IN1)) taste = 1; // niedrigste Priorität if(!digitalRead(IN2)) taste = 2; if(!digitalRead(IN3)) taste = 3; if(!digitalRead(IN4)) taste = 4; //
in
„Präzise Pulse aus Arduino Leonardo“
·
Mikrocontroller und Digitale Elektronik
·
20.04.2023 20:59
// ---------------------------------- // EPROM auslesen // von Wastl (hartundweichware) uint16_t addressCounter = 0; uint8_t byte_read = 0; uint8_t pin39_CS, pin40_CE2, pin41_CE1; char prbuff[64]; #define DATA_IN_PORT PINL void setup() { DDRA = B11111111; // A0-A7 1= output DDRL = B00000000; // Q0-Q7 DDRC = B00000001; // A8 pinMode(LED_BUILTIN, OUTPUT); // --> hier einmal korrekt zuweisen <-- pin39_CS = 39; // CS pin41_CE1 = 41; // CE1 pin40_CE2 = 40; // CE2 pinMode(pin41_CE1, OUTPUT); // CE1 pinMode(pin40_CE2, OUTPUT); // CE2 pinMode(pin39_CS, OUTPUT); // CS digitalWrite(pin40_CE2, HIGH); digitalWrite
in
„Altes EPROM auslesen Intersil 6654A (2xCE) mit Arduino“
·
Mikrocontroller und Digitale Elektronik
·
20.04.2023 14:32
Thread
eine Funktion "setfilterValues" erzeugen (in der CPP) und dann setze ich den filterValues in der ino auf getRed? Kennt sich da jemand aus? Hier hab ich noch folgende Zeile gefunden: ```cpp float meanDiffResIR = meanDiff( dcFilterIR.result, &meanDiffIR); ``` PS: Sry wie füge ich Code
Softwareentwicklung
· Mann T.
· 20.04.2023 14:23
· 5 Antworten
Thread
Hallo, Dich. Deine gezeigte .ino .
Veit D. schrieb im Beitrag #7397485: > Dich. Deine gezeigte .ino . Was ist da verstümmelt? Die Formatierung ist ein wenig verkorkst, weil ich echte TABs drin hab. OK. Die restlichen Funktionen sind UNVERÄNDERT!
Mikrocontroller und Digitale Elektronik
· Brüno
· 25.04.2023 22:04
· 48 Antworten
/* Encryption function for AES128-GCM without authentifications ** created by Peter (meinzaehler.com) ** free for everyone ;-) ** tested on ESP8266 ** according of example by https://www.michaelreitbauer.at/kaifa-ma309-auslesen-smart-meter-evn/ ** and explanations of https://community.symcon.de/uploads/short-url/scJg8Irz6VRWPUcftQYr5LhPWwV.pdf ** next step is to support KAIFA Current Meter for StromLog */ #include <Crypto.h> #include <AES.h> #include <string.h> //key cotains 16 byte for encryption and the very important advice is... for GMC there is only encryption for booth (encrypt and also decrypt
in
„C source code zum DLMS Security (Suite 0) dechiffrieren?“
·
Mikrocontroller und Digitale Elektronik
·
17.04.2023 22:46
#include <stdint.h> //abgewandelt von EPROM5.ino #define LEDPin 13 word EPROMSize=511; #define addr_A00_pin 40 #define addr_A01_pin 41 #define addr_A02_pin 42 #define addr_A03_pin 43 #define addr_A04_pin 44 #define addr_A05_pin 45 #define addr_A06
in
„Altes EPROM auslesen Intersil 6654A (2xCE) mit Arduino“
·
Mikrocontroller und Digitale Elektronik
·
12.04.2023 19:10
#include <stdint.h> #include "PLA.h" // prüf ob PLA // Use Mega as it has enough digital inputs // Uses 28 pin ZIF socket wired as follows // ROM PLA Pinouts // Chip Pin Arduino | 1702A | 2704 6654 2716 2732 2764 27128 27256 27512 PLA 8316A 6830A 2102 2101 // 1 49 | -- | -- -- -- -- VPP VPP VPP A15 FE -- // 2 48 | -- | -- -- -- -- A12 A12 A12 A12 I07 -- // 3 1 47 | A02 | A07 A07 A07 A07 A07 A07 A07 A07 I06 A07 GND // 4 2 1 46 | A01 | A06 A06 A06 A06 A06 A06 A06 A06 I05 A08 D0 A03 // 5 3 2 45 | A00 | A05 A05 A05 A05 A05 A05 A05 A05 I04 A09 D1 A02 // 6 4 3 44 | D0 | A04 A04 A04 A04 A04 A04 A04 A04
in
„Altes EPROM auslesen Intersil 6654A (2xCE) mit Arduino“
·
Mikrocontroller und Digitale Elektronik
·
12.04.2023 12:12
/* ROM Reader. Quick Arduino program to read a parallel-accessed ROM and dump it to the serial port in hex. Oddbloke. 16th Feb 2014. */ // How I've wired the digital pins on my Arduino to the address and data pins on // the ROM. static const int kPin_A0 = 40; static const int kPin_A1 = 41; static const int kPin_A2 = 42; static const int kPin_A3 = 43; static const int kPin_A4 = 44; static const int kPin_A5 = 45; static const int kPin_A6 = 46; static const int kPin_A7 = 47; static const int kPin_A8 = 25; static const int kPin_D0 = 39; static const int kPin_D1 = 38; static const int kPin_D2 = 37; static
in
„Altes EPROM auslesen Intersil 6654A (2xCE) mit Arduino“
·
Mikrocontroller und Digitale Elektronik
·
12.04.2023 11:42
Thread
. mit den Pinbelegungen) und überflüssige EPROM-typen gekürzt. Das Original habe ich ja als EPROM5.ino verlinkt.
Mikrocontroller und Digitale Elektronik
· Armin
· 03.05.2023 14:40
· 176 Antworten
#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
·
11.04.2023 15:22
Thread
installierten Win10 hat der Defender beim Kopieren eine Datei als gefährlich eingestuft. Der Hineris kommt als Ino und steht im Info-Fenster wenn man reinschaut. Unter Schutzverlauf wird auch die konkrete Date angezeigt, default wird in Quarantäe versschoben. Man kann die da auch direkt wiederherstellen, man kann
Softwareentwicklung
· Frank E.
· 13.04.2023 22:25
· 21 Antworten
Thread
die Intensität anpassen und/oder die Form der Lautstärkekurve auswerten: [code] t4-audio-adc-dma.ino ,Apr 11 2023 15:11:41 Originalgeräusch: 745 3265.9 5190.4 2359.0 938.9 420.2 221.4 163.9 133.7 71.6 46.2 60.3 46.0 107.0 91.8 43.1 Ping.wav vorgespielt: 4450 1619.8 4278.3 1611.4 331.0 289.7
Analoge Elektronik und Schaltungstechnik
· Sebastian W.
· 19.04.2023 23:55
· 47 Antworten
Thread
genutzt. Dies hat tadellos funktioniert. Den zugehörigen Arduino Code habe ich angehängt: Test_PPM.ino . Somit scheint die Kette bis zum Eingang HF-Modul korrekt zu funktionieren. **Und nun zu meinem Problem:** In meinem Test bespiele ich alle acht Kanäle mit einem Sinus-Signal, sodass sich an jedem
Mikrocontroller und Digitale Elektronik
· Christian S.
· 22.05.2023 23:22
· 3 Antworten
// Input-Ports #define TRIMMER1 A0 #define JOYSTICK1 A1 #define TRIMMER2 A2 #define JOYSTICK2 A3 #define TRIMMER3 A4 #define JOYSTICK3 A5 #define AKKUSTATUS A7 // Generierung PPM-Signal #define PPM_PORT 13 // Output-Pin #define FRAME_LENGTH 20000 // 23ms Paketlänge #define PULSE_LENGTH 350 // 420µs Pulslänge (200µs..500µs) (gemessen an FM6014) #define PRESCALER CS11 // Prescaler 8, 0.5µs-Takt des Timers #define MIKRO_SECONDS 2 // Korrektur des Output-Compare-Registers: interner Takt mit Prescaler 8 ist 0,5µs, daher Faktor 2 um auf 1µs Taktzähler umzurechnen #define PPM_CENTER_VALUE 1500 // 1,5ms
in
„Eigenbau Fernsteuerung mit HF-Modul Frsky XJT: Anbindung Empfänger X8R/S8R“
·
Mikrocontroller und Digitale Elektronik
·
07.04.2023 12:37
Thread
Minimalprogramm (https://github.com/sui77/rc-switch/blob/master/examples/ReceiveDemo_Simple/ReceiveDemo_Simple.ino ). Nun zum Problem: Ich sehe kein empfangenes Paket auf dem Arduino welcher die Daten mittels Serialport an den PC sendet. Egal wie nahe ich mit dem Sender zum Empfänger gehe. Wenn ich jedoch
HF, Funk und Felder
· C. H.
· 26.09.2024 17:01
· 10 Antworten
Thread
angibst, was ein Verzeichnis ist. Da aber "Sketch File" gefragt wird, solltest Du auch Dein "blink.ino " dort angeben.
Üblich für Arduino-Projekte ist es, daß die *.ino -Datei in einem gleichnamigen Verzeichnis liegt. Dein blink.ino gehört also in ein Verzeichnis namens blink, genauer: "D:\Arduino\ARDUINO IDE\Arduino\examples\blink" Das musst Du anlegen und
Mikrocontroller und Digitale Elektronik
· Bernd S.
· 26.05.2023 05:58
· 167 Antworten
//#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
·
05.04.2023 16:56
Thread
Segger- und > Arduino-IDE. Bei diesen Version findet sich in der Datei 'mess_fm_as65.c' bzw. *.ino noch Schmutz vom Debugging. Bitte die Zeilen 1321 und 1322 löschen oder die aktuelle Version herunterladen. Nur bei der Anzeige von "Frequenz" wurde ein Offset von 0,1 Hz addiert und damit der korrekte
Projekte & Code
· Mi N.
· 21.04.2024 11:49
· 34 Antworten
#include <Wire.h> #define DS3231_I2C_ADDRESS 104 // SCL - pin A5 // SDA - pin A4 // To set the clock, run the sketch and use the serial monitor. // Enter T1124154091014; the code will read this and set the clock. See the code for full details. // byte seconds, minutes, hours, day, date, month, year; char weekDay[4]; byte tMSB, tLSB; float temp3231; const byte Pin_hour_up = 2; const byte Pin_minute_up = 3; // For Arduino Nano or Arduino UNO the PWM pins are 3,5,6,9,10 and 11. // The pins 3, 9, 10 and 11 generates PWM frequency of 490Hz and pins 5 and 6 generates PWM frequency of 980Hz. // The value
in
„Physikprojekte“
·
Offtopic
·
28.03.2023 12:54
Thread
libraries\\Wire\\src" "C:\\Users\\mails\\AppData\\Local\\Temp\\arduino_build_341851\\sketch\\sketch_mar27c.ino .cpp" -o "C:\\Users\\mails\\AppData\\Local\\Temp\\arduino_build_341851\\sketch\\sketch_mar27c.ino .cpp.o" C:\Users\mails\AppData\Local\Temp\arduino_modified_sketch_446020\sketch_mar27c.ino : In function
Serial ^~~~~~~~ C:\Users\mails\AppData\Local\Temp\arduino_modified_sketch_446020\sketch_mar27c.ino :359:3: note: suggested alternative: 'delay' display1.init(115200); // enable diagnostic output on Serial ^~~~~~~~ delay sketch_mar27c:360:3: error: 'display2' was not declared in this scope
Mikrocontroller und Digitale Elektronik
· Egon M.
· 08.05.2023 22:17
· 43 Antworten
Thread
} | ^ E:\Programme\arduino\portable\sketchbook\sketch_mar25f\sketch_mar25f.ino :3:6: note: previous declaration 'bool bar' 3 | bool bar(Foo arg) { return arg == Foo::bar; } | ^~~ cc1plus.exe: warning: unrecognized command line option '-Wno-volatile' exit status
Mikrocontroller und Digitale Elektronik
· Thomas F.
· 26.03.2023 11:06
· 6 Antworten
#include <SoftwareSerial.h> SoftwareSerial mySerial(4, 5); // RX, TX void check(long speed) { Serial.print("Speed "); Serial.print(speed); Serial.print(", _tx_delay "); mySerial.begin(speed); } void setup() { const char info[] = "soser TX 5 " __DATE__ " " __TIME__; Serial.print(info); Serial.begin(38400); Serial.println(info); } void loop() { check(9600); check(38400); check(115200); check(250000); check(256000); check(460800); check(38400); check(230400); mySerial.println("Alle meine Entchen jump over the lazy dog"); delay(2000); }
in
„Arduino: High Speed Soft Serial (nur RX benötigt)“
·
Mikrocontroller und Digitale Elektronik
·
25.03.2023 21:05
Thread
Sicher? https://reference.arduino.cc/reference/en/libraries/ld2410/ Dort steht (setupSensor.ino Z.66): [pre]RADAR_SERIAL.begin(256000); //UART for monitoring the radar[/pre]
Mikrocontroller und Digitale Elektronik
· Frank E.
· 26.03.2023 11:04
· 17 Antworten
/* * Debounce of up to keys using method of Peter Dannegger * * https://www.mikrocontroller.net/articles/Entprellung#Komfortroutine_(C_f%C3%BCr_AVR) * * adapted to Arduino style, almost 100% portable * only timer ISR needs to be adapted manually to NON-AVR Arduinos * */ #include "debounce.h" // Arduino IOs #define LED0 14 #define LED1 15 #define LED2 16 void setup() { pinMode(LED0, OUTPUT); pinMode(LED1, OUTPUT); pinMode(LED2, OUTPUT); init_debounce(); } void loop() { if ( get_key_short(KEY0)) digitalWrite(LED0, !digitalRead(LED0)); // reaction on key release if ( get_key_long(KEY1)) digitalWrite
in
„Tasterverarbeitung mit ARDUINO-C“
·
Mikrocontroller und Digitale Elektronik
·
25.03.2023 11:43
/* * Entprellung von bis zu 8 Tastern nach Methode Peter Dannegger * */ #include "entprell.h" #define LED_DDR DDRC #define LED_PORT PORTC #define LED0 0 #define LED1 1 #define LED2 2 void setup() { LED_PORT = 0; // LED outputs LED_DDR = 0xFF; init_entprell(); } void loop() { if ( get_key_short( 1<<KEY0 )) LED_PORT ^= 1<<LED0; // reaction on key release if ( get_key_long( 1<<KEY1 )) LED_PORT ^= 1<<LED1; // reaction after REPEAT_START ms // single press and repeat, running light if( get_key_press( 1<<KEY2 )){ // reaction on key press uint8_t i = LED_PORT; i = (i & 0x03) | ((i & ~0x03) << 1); if( (i
in
„Tasterverarbeitung mit ARDUINO-C“
·
Mikrocontroller und Digitale Elektronik
·
23.03.2023 11:16
Thread
steht es geschrieben. Natürlich kann man mit Arduino auch C und ASM Dateien übersetzen. Aber die *.ino und *.cpp Dateien sind C++. Bei den *.ino läuft nur ein Präprozessor drüber, dann wird kompiliert. Ich rate dir, dich mit den Konzepten vertraut zu machen. Du machst es dir selber schwer, wenn
Gruesse > > Th. Über den Grad der Abstrahierung hat man ja freie Wahl. Als CPP Projekt ohne INO hat man ja alle GCC Ressourcen zur Verfügung. Aber dann kann man gleich andere Werkzeuge wählen und nur die Bords nutzen. Für die meisten Projekte fühle ich keine nennenswerten Beschränkungen von
Mikrocontroller und Digitale Elektronik
· Bernd S.
· 06.05.2023 10:17
· 163 Antworten
/* * Anzeige des Gangs im Motorad * Messung des Gangs per Spannungsteiler und ADC * Anzeige über 6 LEDs per Charliplexing * ATtiny25 */ // Widerstände der Gänge /Ohm #define GANG1 560 #define GANG2 1000 #define GANG3 2000 #define GANG4 3000 #define GANG5 5000 #define GANG6 15000 // externer Widerstand für Spannungsteiler /Ohm #define REXT 7500 #define ADCWERT(x) ((1024L*x)/(x+REXT)) uint16_t schwelle[5]; // Schaltschwellen zwischen den Gängen // Codes für LEDs, charliplexing // oberes Nibble Tristate, unteres Nibble Zustand const uint8_t led[6] = {0x31, 0x32, 0x51, 0x54, 0x62, 0x64}; // setze Ausgänge
in
„Spannung durch Spannungsteiler messen. Arduino“
·
Mikrocontroller und Digitale Elektronik
·
15.03.2023 19:32
Thread
_243817\GxEPD2_HelloWorld.ino :27:3: note: suggested alternative: 'delay' display.init(115200); ^~~~~~~ delay C:\Users\mails\AppData\Local\Temp\arduino_modified_sketch_243817\GxEPD2_HelloWorld.ino : In function 'void
_HelloWorld\GxEPD2_HelloWorld.ino :26:3: note: suggested alternative: 'delay' display.init(115200); ^~~~~~~ delay K:\Dat-KPC2\Arduino-Prgm\libraries\GxEPD2\examples\GxEPD2_HelloWorld\GxEPD2_HelloWorld.ino : In function 'void
Mikrocontroller und Digitale Elektronik
· Egon M.
· 15.03.2023 00:05
· 22 Antworten
Thread
w:C:\Users\chris\AppData\Local\Temp\arduino\sketches\052BDB0EFC0DDF785872F2948AAA9BFF/sketch_mar7a.ino .with_bootloader.hex:i" avrdude: Version 7.1-arduino.1 Copyright the AVRDUDE authors; see https://github.com/avrdudes/avrdude/blob/main/AUTHORS System wide configuration
Mikrocontroller und Digitale Elektronik
· Christoph
· 10.03.2023 14:37
· 59 Antworten
void loop() { CAN_msg_t CAN_TX_msg; CAN_msg_t CAN_RX_msg; CAN_TX_msg.data[0] = 0x00; CAN_TX_msg.data[1] = 0x01; CAN_TX_msg.data[2] = 0x02; CAN_TX_msg.data[3] = 0x03; CAN_TX_msg.data[4] = 0x04; CAN_TX_msg.data[5] = 0x05; CAN_TX_msg.data[6] = 0x06; CAN_TX_msg.data[7] = 0x07; CAN_TX_msg.len = frameLength; unsigned long currentMillis = millis(); if (currentMillis - previousMillis >= interval) { previousMillis = currentMillis; if ( ( counter % 2) == 0) { CAN_TX_msg.type = DATA_FRAME; if (CAN_TX_msg.len == 0) CAN_TX_msg.type = REMOTE_FRAME; CAN_TX_msg.format = EXTENDED_FORMAT; CAN_TX_msg.id = 0x32F103
in
„Arduino Blue Pill & CAN mit SN65HVD230“
·
Mikrocontroller und Digitale Elektronik
·
07.03.2023 14:16
#include <assert.h> #define DEBUG 0 /* Symbolic names for bit rate of CAN message */ typedef enum {CAN_50KBPS, CAN_100KBPS, CAN_125KBPS, CAN_250KBPS, CAN_500KBPS, CAN_1000KBPS} BITRATE; /* Real speed for bit rate of CAN message */ uint32_t SPEED[6] = {50*1000, 100*1000, 125*1000, 250*1000, 500*1000, 1000*1000}; /* Symbolic names for formats of CAN message */ typedef enum {STANDARD_FORMAT = 0, EXTENDED_FORMAT} CAN_FORMAT; /* Symbolic names for type of CAN message */ typedef enum {DATA_FRAME = 0, REMOTE_FRAME} CAN_FRAME; typedef struct { uint32_t id; /* 29 bit identifier */ uint8_t data[8]; /* Data
in
„Arduino Blue Pill & CAN mit SN65HVD230“
·
Mikrocontroller und Digitale Elektronik
·
07.03.2023 12:46
/********************************************************************** Arduino Ethernet Webserver nach: https://werner.rothschopf.net/202001_arduino_webserver_post.htm This version: - don't uses Arduino String class - read parameters POST - care about non defined pages - keeps the loop tidy - handle favicon.ico - don't use F-Makro in client.print **********************************************************************/ #define CS 53 // Pin 53 für CS Ethernet-Shield OKY3487 #include <SPI.h> #include <Ethernet.h> #include <StreamLib.h> // https://github.com/jandrassy/StreamLibdownload byte mac[] {
in
„Leichte Probleme mit Arduino Webserver und HTML-Implementierung“
·
Mikrocontroller und Digitale Elektronik
·
06.03.2023 12:26
#include <Wire.h> #include <SoftwareSerial.h> #include <LiquidCrystal_I2C.h> #define DEBUG true #define STARTUP true #define RX 10 //pin layout #define TX 11 // #define measureO A0// #define measureU A1// #define relay 8 // #define button 4 // #define dimmer 9 // SoftwareSerial Esp8266(RX, TX); String ssid = "FRITZ!Box 6591 Cable VW"; String pwd = "15974136204554170633"; int connectionId; bool skipWifiSetup = false; bool on = true;//is pump regulation turned on LiquidCrystal_I2C lcd(0x27, 16, 2); int displayPage; int disTimeout = 10000; //display timeout time in milliseconds unsigned long disTimer
in
„HTML code not working on Ipad“
·
Mikrocontroller und Digitale Elektronik
·
26.02.2023 19:36
#include <Wire.h> #include <SoftwareSerial.h> #include <LiquidCrystal_I2C.h> #define DEBUG true #define STARTUP true #define RX 10 //pin layout #define TX 11 // #define measureO A0// #define measureU A1// #define relay 8 // #define button 4 // #define dimmer 9 // SoftwareSerial Esp8266(RX, TX); String ssid = "FRITZ!Box 6591 Cable VW"; String pwd = "15974136204554170633"; int connectionId; bool skipWifiSetup = false; bool on = true;//is pump regulation turned on LiquidCrystal_I2C lcd(0x27, 16, 2); int displayPage; int disTimeout = 10000; //display timeout time in milliseconds unsigned long disTimer
in
„HTML code not working on Ipad“
·
Mikrocontroller und Digitale Elektronik
·
26.02.2023 19:35
Thread
ccV87F6x.ltrans0.ltrans.o: In function `LEDon': D:\Arduino\Programme\Assembler\Neuer Ordner\AssPort/AssPort.ino :37: undefined reference to `PORTD' collect2.exe: error: ld returned 1 exit status exit status 1 Fehler beim Kompilieren für das Board Arduino Uno. Vielen Dank
Mikrocontroller und Digitale Elektronik
· Hans K.
· 26.02.2023 17:37
· 9 Antworten
/** * 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
·
24.02.2023 19:37
// Read File from SPIFFS String readFile(fs::FS &fs, const char * path){ Serial.printf("Reading file: %s\r\n", path); File file = fs.open(path); if(!file || file.isDirectory()){ Serial.println("- failed to open file for reading"); return String(); } String fileContent; while(file.available()){ fileContent = file.readStringUntil('\n'); break; } return fileContent; } // Write file to SPIFFS void writeFile(fs::FS &fs, const char * path, const char * message){ Serial.printf("Writing file: %s\r\n", path); File file = fs.open(path, FILE_WRITE); if(!file){ Serial.println("- failed to open file for writing"
in
„ESP32 Watchdog Problem“
·
Mikrocontroller und Digitale Elektronik
·
24.02.2023 16:52
void handleRoot(AsyncWebServerRequest *request) { if (getDatafromMemoryAndConnect() == true || WiFi.isConnected()) { // Redirect to setupmanager. requestForWiFiList == true; request->redirect("/setupmanager.html"); } else { // Otherwise, redirect to Auth. requestForWiFiList == true; request->redirect("/setupmanager.html"); } } void serverHandles(){ server.on("/", handleRoot); server.on("/setupmanager", HTTP_POST, [](AsyncWebServerRequest *request) { request->send(SPIFFS,"setupmanager.html", "text/html"); }); server.on("/api/networks", HTTP_GET, [](AsyncWebServerRequest *request) { requestForWiFiList
in
„ESP32 Watchdog Problem“
·
Mikrocontroller und Digitale Elektronik
·
24.02.2023 16:51
will be the contnbution of the se· cond stage 10 (he overallnorse lIgure Fro! S,nIN,n F = (I) SoutINo ., 2.5. Measuring the Noise Figure The norse figure is given in dB and IS obtained The mOSI tavorabte alignmenl of preamphliers Irom the norse lactor with tne aid of logarithms: with a conunuous noise
in
„R&S URV-3 HF-Millivoltmeter“
·
HF, Funk und Felder
·
24.02.2023 14:48