Skip to content

Instantly share code, notes, and snippets.

View michaelsarduino's full-sized avatar

michaelsarduino

View GitHub Profile
void setup() {
//starten der seriellen Kommunikation
Serial.begin(9600);
}
void loop() {
//auslesen des Wertes von Pin A0 und senden an PC
Serial.println(analogRead(A0));
//kurz warten
delay(2);
import processing.serial.*;
Serial arduino;
int xPos = 1;
void setup () {
size(500, 300);
arduino = new Serial(this, Serial.list()[0], 9600);
import time
import serial
import smtplib
TO = 'EMPFAENGER HIER EINGEBEN'
GMAIL_USERNAME = 'ABSENDER HIER EINGEBEN'
GMAIL_PASSWORD = 'PASSWORT ABSENDER HIER EINGEBEN'
BETREFF = 'Arduino'
TEXT = 'Hier den Email Text eingeben'
#include <SoftPWM.h>
#include <SoftPWM_timer.h>
int status_pin = 1;
int richtung = 1;
boolean bewegung = false;
int counter = 0;
void setup() {
pinMode(2, INPUT);
#include <MemoryFree.h>
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println(freeMemory());
delay(100);
void setup()
{
Serial.begin(9600);
}
void loop()
{
int button;
int status_A0 = analogRead(A0);
if(status_A0 < 10)
const int button = 12; // Button Pin
const int led = 13; // LED Pin
int led_status = HIGH;
int button_status;
int vorheriger_button_status = LOW;
long letztes_prellen = 0;
long entprellzeit = 60;
void setup() {
pinMode(13, OUTPUT);
unsigned long zeit_bei_beginn = millis();
unsigned long zeit_aktualisiert = millis();
while((zeit_bei_beginn + 10000) > zeit_aktualisiert)
{
digitalWrite(13, HIGH);
delay(100);
digitalWrite(13, LOW);
delay(100);
import processing.serial.*;
Serial arduino;
String auto = "33";
void setup() {
arduino = new Serial(this, "COM15", 9600);
size(1200, 900);
fill(0);
#include <SoftwareSerial.h>
SoftwareSerial bluetooth(8, 9);
int motor1_A = 4;
int motor1_B = 2;
int motor1_speed = 3;
int motor2_A = 5;
int motor2_B = 7;