das "eigentliche" Problem beheben kann. Fehlermeldung: ...\Arduino\sketch_may07a\sketch_may07a.ino: In function 'void setup()': sketch_may07a:5:5: error: 'Mouse' nicht gefunden. Beinhaltet Ihr Sketch die Zeile '#include <Mouse.h>'? Mouse.begin(); ...\Arduino\sketch_may07a\sketch_may07a.ino
#include <WiFi.h> #include <WiFiclient.h> #include "esp_camera.h" #define DEBUG #define DEBUG_FTP false // true #define DEBUG_CAM false // FTP-Userdaten direkt in Zeile 41 eintragen, also xxxx und yyyy anpassen // da wohl verschiedene Kameramodule im Umlauf sind ab Zeile 180 hmirror und vflip anpassen wenn das Bild falsch rum ist. // PIR-Cam ist das Modul mit PIR und OLED, M5Cam ist die kleine M5Stack-Cam, diese mit ESP32 Devkit ohne PSRAM compilieren. #define PIR_CAM // für M5Cam auskommentieren const char* ssid = "xxxxxxx"; const char* password = "yyyyyyyyy"; // DeepSleep Timer #define uS_TO_S_FACTOR
setup() or loop() in neo.h). Please try to ignore these issues when answering simplePCFInputTest.ino [c] #include "PCF8574.h" #include "input_pcf.h" #include "neo.h" // neopixel const int neo_data = D3; const int btn = 0; neo neo(2, neo_data); //input button(btn); PCF8574 pcf(0x20,
a second time (just tell me if you need the schematics of the second test below). simplePCFTest.ino [c] #include "PCF8574.h" #include "input.h" #include "neo.h" // neopixel const int neo_data = D3; const int btn = D4; const int pcf_led = 0; neo neo(2, neo_data); //input button(btn);
> Die meisten haben erkannt, daß mit "Arduino" die Entwicklungsumgebung > gemeint ist, die mit "ino"-Dateien arbeitet. Und das ist C++. "meine" *.ino haben c innen, denn c ist auch in c++ eine Untermenge und meine INO funktionieren mit dem C-Code seit Atari und PC. Es stimmt schon für c++ bin
>> Die meisten haben erkannt, daß mit "Arduino" die Entwicklungsumgebung >> gemeint ist, die mit "ino"-Dateien arbeitet. Und das ist C++. > > "meine" *.ino haben c innen, denn c ist auch in c++ eine Untermenge und > meine INO funktionieren mit dem C-Code seit Atari und PC. C ist KEINE Untermenge
/* ==================================================================== Copyright (c) 2018 Juerge Liegner All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
build6258311819034784612.tmp\geht_nicht.cpp -o c:\tmp\build6258311819034784612.tmp\geht_nicht.cpp.o geht_nicht.ino:20:56: error: 'IP_LEN' was not declared in this scope geht_nicht.ino:20:63: error: expected ')' before ',' token geht_nicht.ino:20:74: error: expected initializer before 'src_port' geht_nicht.ino
irgendwie so aus, als ob da Variablentypen durcheinander kommen / inkompatibel sind? Im Anhang beide .ino, im Ordner 'geht nicht' bzw. 'geht'!
wenn die implementation etwas gewoehungsbedrueftig ist. ;-) Arduino ist C++, hauptsächlich. Die *.ino ist immer C++. C geht auch, in eigenen Übersetzungseinheiten. Auch Assembler in Librarys ist nicht ganz unüblich. Dr. Sommer schrieb im Beitrag #5799069: > was mit blockierenden Funktionen wie
geschaltet werden. Parogramm läuft auf ATmega328 //(stand alone). // Markus Radtke 14.03.2019 servo_328.ino #include <Servo.h> // zugriff auf Servo Bibliothek const int BUTTON1 = 2; // Pushbutton Pin auf dem Board (2) const int BUTTON2 = 4; // Pushbutton Pin auf dem Board (4) int vala = 0; //
Achja... Ich vergesse immer, dass die Sketche mal .cpp hießen, bevor .ino eingeführt wurde....
Beitrag #5787153: > Achja... Ich vergesse immer, dass die Sketche mal .cpp hießen, > bevor > .ino eingeführt wurde.... *.pde hießen sie... ;-) *.cpp heißen sie, wenn der Builder alle *.ino eines Projektes verschmolzen hat. Und als *.cpp werden sie dann dem Compiler in den Rachen geworfen
// arduino mega 2560 int taster = 37; //37 ---> PC0 ( https://www.element14.com/community/docs/DOC-87013/l/arduino-mega-2560-rev3-pinout-atmega2560-pin-mapping-eagle-files-schematics-and-more ) //debounce Port C #define DEBOUNCE_PINS PINC int relaisA = 45; int relaisB = 43; int toggle = 0; // ------------- DEBOUNCER CLASS ------------- // debounce example // http://www.ganssle.com/debouncing-pt2.htm // http://www.ganssle.com/images/debouncecode.jpg #define DEBOUNCER_MAX_CHECKS 10 class Debouncer //use only one instance! { public: Debouncer(); void update(); //must be called in loop() int digitalRead
github.com/witnessmenow/Universal-Arduino-Telegram-Bot/blob/master/examples/ESP8266/FlashLED/FlashLED.ino Es wird vom esp dann quasi eine internet seite geöffnet und dabei daten mit übergeben. Wie als würdest du im browser google.de aufrufen. Darüber läuft die kommunikation mit den Telegram Servern.
github.com/witnessmenow/Universal-Arduino-Telegram-Bot/blob/master/examples/ESP8266/FlashLED/FlashLED.ino > Drei Jahre später: Das habe ich jetzt endlich mal ausprobiert und es ging auf Anhieb :) Ich hatte schon fast vergessen, dass ich das hier schon mal gefragt hatte und wollte fast schon im Arduino
#include <ESP8266WiFi.h> #include "oled.h" #define SSID "Muschikatze" #define PASSWORD "Geheim" #define SERVER "ptb.de" // There are 2 different versions of the board // static OLED display=OLED(2,14,4); static OLED display=OLED(4,5,16); static WiFiClient client; static char buffer[200]; /** * Sammle eine Zeile Text ein. * Rufe diese Funktion wiederholt auf, bis sie true zurück gibt. Dann hast * du eine Zeile im Puffer. Wenn die Zeile nicht in den Puffer passt, wird * sie abgeschnitten. * * @param source Der Quell-Stream. * @param buffer Der Ziel-Puffer, muss bereits mit '\0' terminiert sein. *
ist. https://github.com/GreyGnome/EnableInterrupt/blob/master/examples/ATtinyBlink/ATtinyBlink.ino Vor allem die Übergabe der Funktion, die im Falle eines Interrupts aufgerufen werden soll (Callback) und auch die Angabe über die Flanke des Interrupts.
SPL- und HAL-frei ;-) Andere IDEs sollten kein Problem sein. Anbei noch ein Programm "spi_tft.ino" für einen UNO R3. Mit ein paar Steckleitungen kann das Demoprogramm die Möglichkeiten aufzeigen. Zur Verwendung der touch-Funktion muß eine RS232-Verbindung per USART3 hergestellt werden. Höchste Baudrate
geschaltet werden. Parogramm läuft auf ATmega328 //(stand alone). // Markus Radtke 14.03.2019 servo_328.ino #include <Servo.h> // zugriff auf Servo Bibliothek const int BUTTON1 = 2; // Pushbutton Pin auf dem Board (2) const int BUTTON2 = 4; // Pushbutton Pin auf dem Board (4) int vala = 0; //
#include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); unsigned long previousaMillis = 0; unsigned long previousiMillis = 0; unsigned long previousfMillis = 0; const long intervala = 2000; // Sperrzeit in Millisekunden const long intervali = 2000; const long intervalf = 5000; int zukalt = 6; int feuchte = A2; //Feuchteanzeige int sensorwert; byte feuchtewert; int aussen = A1; // Außentemperatur int aussenwert; int innen = A0; // korrigierte Innentemperatur int freigabe = A3; int hanfun = 7; int exttimer = 10; // zur Synchronisation des timer Signals int timer =8; // Timer boolean e,
Bereich Dummheit [c] E:\Programme\arduino\portable\sketchbook\Forum\sketch_mar12a\sketch_mar12a.ino: In function 'void setup()': E:\Programme\arduino\portable\sketchbook\Forum\sketch_mar12a\sketch_mar12a.ino:10:22: warning: integer overflow in expression [-Woverflow] uint32_t i = 30000 *
stimmt so nicht wirklich! Es macht sich selber welche, wenn du keine baust. Das betrifft aber nur *.ino Dateien. Keine *.c, *.cpp und *.h Dateien, die stehen in deiner Verantwortung. Wieso überhaupt *.c? Nimm *.cpp, dann musst du nicht die Extrawürste backen um mit dem C++ Rest klar zu kommen.
int taster = 37; int relaisein = 45; int relaisaus = 43; int on = 0; int portstatus = 0; int rote_Taste() { int rt=digitalRead(37); if (rt==LOW) { delay(20); rt=digitalRead(37); if (rt==LOW) { return 1; } } return 0; } int relaiszustand() { int rt=digitalRead(31); if (rt==LOW) { delay(20); rt=digitalRead(31); if (rt==LOW) { return 1; } } return 0; } void setup() { // put your setup code here, to run once: pinMode(31,INPUT_PULLUP); pinMode(37,INPUT_PULLUP); pinMode(45,OUTPUT); pinMode(43,OUTPUT); } void loop() { digitalWrite(45,LOW); digitalWrite(43,LOW); Serial.begin(9600); Serial.println ("Relais"
int taster = 37; int relaisein = 45; int relaisaus = 43; int on = 0; void setup() { // put your setup code here, to run once: pinMode(37,INPUT_PULLUP); pinMode(45,OUTPUT); pinMode(43,OUTPUT); } void loop() { // put your main code here, to run repeatedly: //einschalten if (on == 0) { if (digitalRead(taster) ==LOW) { digitalWrite(relaisein,HIGH); if (digitalRead(taster) == HIGH) { digitalWrite(relaisein,LOW); } } on = 1; } //ausschalten if (on == 1) { if (digitalRead(taster) ==LOW) { digitalWrite(relaisaus,HIGH); if (digitalRead(taster) == HIGH) { digitalWrite(relaisaus,LOW); } } on = 0; } }
#include "SSD1306.h" #include <WiFi.h> #include <Wire.h> SSD1306 display(0x3c, 4, 15); unsigned MessungNr = 0; const char* ssid = "homewlan"; const char* password = "password"; // Set web server port number to 80 WiFiServer server(80); // Variable to store the HTTP request String header; // Auxiliar variables to store the current output state String output26State = "off"; String output27State = "off"; // Assign output variables to GPIO pins const int output26 = 26; const int output27 = 27; void udpSetup() { Serial.begin(115200); // Initialize the output variables as outputs pinMode(output26, OUTPUT
/m5stack/M5Stack/blob/master/examples/Fire/M5StackFire_NeoPixelVUmeter/M5StackFire_NeoPixelVUmeter.ino Den Logarithmus kann man sich sparen, weil die Tresholds über die Exponentialfunktione ( btw. Schrittweise Multiplikation ) berechnet werden können.
/m5stack/M5Stack/blob/master/examples/Fire/M5StackFire_NeoPixelVUmeter/M5StackFire_NeoPixelVUmeter.ino Ja, jeder Depp hat wohl schonmal sowas zusammengespaxt; das www ist voll davon. Ich nehm' mich da mal nicht aus:-) https://www.mikrocontroller.net/topic/419372 Gruss WK
Aufgebaut ist der Spass natürlich fliegend mit ein paar Drahtbrücken. Siehe Foto. Verschaltung ist im .ino zu lesen. Getestet hab ich bisher mit zwei Flashes: K9F2G08U0M aus einem uralten Flashdrive (256MiB) und dem "defekten" K9GAG08U0E aus dem TV (2GiB+). Prinzipiell funktioniert das auch ganz gut
atcnetz.blogspot.com/2018/10/linux-firmware-mit-arduino-bluepill-aus.html finde gerade leider nicht das ino file aber wenn ich es finde hänge ich es noch hier ran. habe aber einfach diesen code Bluepill kompatibel gemacht: https://github.com/james-tate/arduino_nand_reader
#include <SPI.h> //#include "test.h" #include <Time.h> #include <TimeLib.h> #include <Adafruit_GFX.h> // Core graphics library #include <Adafruit_ST7735.h> // Hardware-specific library for ST7735 // TFT display and SD card will share the hardware SPI interface. // Hardware SPI pins are specific to the Arduino board type and // cannot be remapped to alternate pins. For Arduino Uno, // Duemilanove, etc., pin 11 = MOSI, pin 12 = MISO, pin 13 = SCK. #define TFT_CS 7 // Chip select line for TFT display #define TFT_RST 6 // Reset line for TFT (or see below...) #define TFT_DC 5 // Data/command line for
Weiß jemand, wie man Eclipse dazu bring, für *.ino-Files die Syntaxhervorhebung einzuschalten? Wenn ich unter [c]Windows=>Preferences=>Editors=>FileAssociations=>ADD *.ino[/c] mache, wird der Syntax trotzdem nicht als cpp erkannt.
müsste noch einen Menüpunkt geben. Ich vermute, es gibt 3 Punkte: 1. Bei einem File mit der Endung *.ino wird der Editor aufgerufen Windows=>Preferences=>Editors=>FileAssociations=>ADD *.ino 2. Der Compiler weiß, dass ein *.ino File ein cpp file ist: C/C++->File Types gewesen. 3. Der Editor weiß
#include <SPI.h> //#include "test.h" #include <Time.h> #include <Adafruit_GFX.h> // Core graphics library #include <Adafruit_ST7735.h> // Hardware-specific library for ST7735 // TFT display and SD card will share the hardware SPI interface. // Hardware SPI pins are specific to the Arduino board type and // cannot be remapped to alternate pins. For Arduino Uno, // Duemilanove, etc., pin 11 = MOSI, pin 12 = MISO, pin 13 = SCK. #define TFT_CS 7 // Chip select line for TFT display #define TFT_RST 6 // Reset line for TFT (or see below...) #define TFT_DC 5 // Data/command line for TFT static const uint8
wtv020sd16p(resetPin,clockPin,dataPin,busyPin); ^ ...\Arduino\WTV020sd16_erster\WTV020sd16_erster.ino: In function 'void setup()': WTV020sd16_erster:26:2: error: 'wtv020sd16p' was not declared in this scope wtv020sd16p.reset(); ^ ...\Arduino\WTV020sd16_erster\WTV020sd16_erster.ino: In
es nicht. Hatte in die Libraries auch direkt kopiert. Im Ordner Examples sind aber nur fertige *.ino drin... In den Bibliotheken sind die Examples mit drin, in der von mir benutzten sind keine drin. Muss mir vielleicht eine andere Bibliothek laden. Hab jetzt mal mit einem DHT probiert und dabei