Skip to content

Instantly share code, notes, and snippets.

View michaelsarduino's full-sized avatar

michaelsarduino

View GitHub Profile
float Ausgangsspannung = 5.0;
int MessPin = 5;
int R1=1000.0;
long Messwert;
float SpannungR2;
float Widerstand;
void setup()
{
Serial.begin(9600);
void setup() {
delay(3000);
Serial.begin(9600);
delay(3000);
Serial.print("AT+CWMODE=2<CR>");
delay(5000);
Serial.print("AT+CWSAP=\"esp8266_ap_\",\"passwort123\",1,4<CR>");
delay(5000);
}
long readTemp() {
long result;
// Read temperature sensor against 1.1V reference
ADMUX = _BV(REFS1) | _BV(REFS0) | _BV(MUX3);
delay(2); // Wait for Vref to settle
ADCSRA |= _BV(ADSC); // Convert
while (bit_is_set(ADCSRA,ADSC));
result = ADCL;
result |= ADCH<<8;
result = (result - 125) * 1075;
#include <CapacitiveSensor.h>
CapacitiveSensor cs_4_2 = CapacitiveSensor(4,2); //Touch Sensor mit Pin 4 als Sender und Pin 2 als Empfaenger
void setup()
{
cs_4_2.set_CS_AutocaL_Millis(0xFFFFFFFF);
Serial.begin(9600);
}
/*
SD card test
This example shows how use the utility libraries on which the'
SD library is based in order to get info about your SD card.
Very useful for testing a card when you're not sure whether its working or not.
The circuit:
* SD card attached to SPI bus as follows:
** MOSI - pin 11 on Arduino Uno/Duemilanove/Diecimila
#include <SPI.h>
#include <SD.h>
File Datei;
void setup() {
Serial.begin(9600);
if(!SD.begin(10))
{
#include <SPI.h>
#include <SD.h>
File Datei;
void setup() {
Serial.begin(9600);
if(!SD.begin(10))
{
#include <SPI.h>
#include <SD.h>
#include <Time.h>
File Datei;
void setup() {
Serial.begin(9600);
setTime(13,58,10,01,11,15);
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
if(analogRead(3) < 50)
{
for(int x = 0;x < 100; x++)
{
/*
* IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
* An IR detector/demodulator must be connected to the input RECV_PIN.
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff
* http://arcfn.com
*/
#include <IRremote.h>