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
// // 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
256000" Build-Optionen wurden verändert, alles wird neu kompiliert K:\ESP8266\WetterOled\tools.ino: In function 'int GetWeatherData()': tools:186: error: ambiguous overload for 'operator=' (operand types are 'String' and 'ArduinoJson::Internals::EnableIf<true, ArduinoJson::Internals::JsonObjectSubscript
Rufus Τ. F. schrieb im Beitrag #5729007: > Was passiert dann? K:\ESP8266\WetterOled\tools.ino: In function 'int GetWeatherData()': tools:186: error: call of overloaded 'String(ArduinoJson::Internals::EnableIf<true, ArduinoJson::Internals::JsonObjectSubscript<const char*> >::type)' is ambiguous
// // 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
/* * 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
flashen ging schonmal ausversehen. jetzt habe ich anstatt ein blaues Ladezeichen ein weisses.. Das Ino selbst kan nicht geflasht werden. Rein erfahrungsgemäss würde ich sagen der reset fehlt :/ Aber im Video werden ja auch nur dei 2 SWD benutzt?
jetzt hab ich ein bisschen was gefunden. Meine Uhr ist wieder zu. - Frage wie kann ich "ATCwatchP8.ino.zip" erzeugen ? - Hast du Codeschnippsel für den SC7A20 ? - Kann ich mit einem Script mit ardunino auch über Bluetooth flashen ? kannst du chinesisch :)
/** * * LED Schaltfolge * * Ein Taster, zwei LEDs * * Startzustand beide aus. * Erster Tastendruck, led1 geht an * Zweiter Tastendruck, led2 geht an * Dritter Tastendruck, beide LEDs gehen aus, Automat geht in den Startzustand * * * */ #include <CombiePin.h> #include <CombieTimer.h> #include <CombieTools.h> using namespace Combie::Tools; using namespace Combie::Timer; using namespace Combie::Pin; using CounterType = Counter<byte>; TasterGND<2> taster; // Taster gegen GND geschaltet OutputPin<13> led1; OutputPin<12> led2; EntprellTimer entprellen(20); FlankenErkennung flankenerkennung; CounterType counter
Aber als ich das gemacht habe, hat der compiler wieder geschimpft: "In function 'void setup' : ino :15:21: error: assignment of read-only variable 'relaisPin'" ino:15:29: error: too few arguments to function 'void pinMode(uint8_t, uint8_t)' In file included from /home/pi/sketchbook/libraries/OneWire
from /home/pi/sketchbook/libraries/ArduinoTemperature/DallasTemperature.h:25, fromsketch_jan23a.ino:2: /usr/share/arduino/hardware/arduino/cores/arduino/Arduino.h:98:6: note: declared here void pinMode(uint8_t, uint8_t); ^ " * Bei dieser Meldung verstehe ich zwar jedes Wort, aber nicht
https://github.com/MajicDesigns/MD_Parola/blob/master/examples/Parola_Scrolling/Parola_Scrolling.ino Auch auf Youtube sind jede Menge Tutorials und Demos zu dieser Lib zu finden. Ich habe es schonmal überflogen und eventuell reicht es in der Initialisierung in setup() den ScrollMode zu setzen und
/* Basic ESP8266 MQTT example This sketch demonstrates the capabilities of the pubsub library in combination with the ESP8266 board/library. It connects to an MQTT server then: - publishes "hello world" to the topic "outTopic" every two seconds - subscribes to the topic "inTopic", printing out any messages it receives. NB - it assumes the received payloads are strings not binary - If the first character of the topic "inTopic" is an 1, switch ON the ESP Led, else switch it off It will reconnect to the server if the connection is lost using a blocking reconnect function. See the 'mqtt_reconnect_nonblocking
der Compiler (mit dem 3-Byte Array) erzeugt hat: avr-objdump -h -S /tmp/arduino_build_482746/test.ino.elf > test.txt Die Ausgabe von avr-size /tmp/arduino_build_482746/test.ino.elf ist: [pre] text data bss dec hex filename 712 4 9 725 2d5 /
dec hex filename 656 0 9 665 299 /tmp/arduino_build_482746/test.ino.elf [/pre] Ebenso, wenn ich die beiden kürzeren Arrays einkommentiere. Ich bin jetzt auch ratlos.
// #include <ESP8266WiFi.h> const char* ssid = "TEST"; // Setzt den Netzwerknamen, der später sichtbar ist const char* password = ""; // Setzt das Passwort, das später verwendet wird. Sollte kein Passwort gewünscht sein nur " " unsigned long ulReqcount; WiFiServer server(80); // Erzeugt eine Insatanz auf dem Server. In dem Fall auf Port 80 IPAddress apIP(192, 168, 1, 1); // Hiermit lässt sich die IP einstellen für die Website void setup() // Einstellungen und Parameter setzen { ulReqcount = 0; // Globale Variable setzen pinMode(2, OUTPUT); // Schutz des Pins GPIO2, der für die Schaltung des Relais
funktioniert es so nicht folgendes wird als fehler angezeigt: C:\Users\Notebook\Desktop\test\test.ino: In function 'void loop()': test:96: error: expected '(' before 'blitzCounter' if blitzCounter == 0 { ^ test:103: error: expected '(' before 'blitzCounter' if blitzCounter
Markus R. schrieb im Beitrag #5692561: > C:\Users\Notebook\Desktop\test\test.ino: In function 'void loop()': > > test:96: error: expected '(' before 'blitzCounter' > > if blitzCounter == 0 { > > ^ > > test:103: error: expected '(' before 'blitzCounter' >
github.com/pcbreflux/espressif/blob/master/esp32/arduino/sketchbook/ESP32_ArduinoISP/ESP32_ArduinoISP.ino Das ist 1:1 das Beispiel aus der ArduinoIDE lediglich ein Pin geändert und ein Befehl auskommentiert.
verlinkt: > > https://github.com/bigjosh/MultiBitBangPOC/blob/master/Arduino/MultiBitBang/MultiBitBang.ino Oh ja, Inlineassember! Der letzte Unsinn für Sowas. Außerdem ist das auch nur ein Quick & Dirty Test, kein wirklich durchdachtes Beispiel.
#include <NmraDcc.h> //#include "PinPulser.h" // This Example shows how to use the library as a DCC Accessory Decoder to drive 8 Pulsed Turnouts // You can print every DCC packet by un-commenting the line below //#define NOTIFY_DCC_MSG // You can print every notifyDccAccTurnoutOutput call-back by un-commenting the line below #define NOTIFY_TURNOUT_MSG // You can also print other Debug Messages uncommenting the line below #define DEBUG_MSG // Un-Comment the line below to force CVs to be written to the Factory Default values // defined in the FactoryDefaultCVs below on Start-Up //#define FORCE_RESET_FACTORY_DEFAULT_CV
#include <EEPROM.h> #include <Streaming.h> /** * Etwas komplexeres Beispiel mit Reset Counter * * setup() zeigt wie ein ganzer Datensatz gelesen und geschrieben wird * serialEvent() verändert nur einen Teilbereich * * EEPROM.put() ruft intern EEPROM.update() auf, schreibt also nur die * wirklich veraenderten Daten * * Die "ADC Referenz Spannung" wird erst beim schreiben der *.eep mit * gueltigem Wert besetzt. */ struct EepromData { float adcReferenzSpannung; // Volt uint16_t resetCounter; }; // Struktur vorbesetzen, mit Eintag in *.eep Datei EepromData datenSatz EEMEM {1.08,0}; void serialEvent() { if(
und PlatformIO. Der Projekt-Ordner ist durch das PlatformIO etwas aufgebläht, daher hängt nur die .ino mit an. Und tolle Dinger diese APA102, der SPI läuft hier gerade so mit 24MHz vor sich hin. Als natives Projekt würde der Code um die APA102 LED zu beschreiben nicht anders aussehen. Dazu kommen
/* 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