This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.include "m328Pdef.inc" | |
ldi r16, 0b11111111 //alle output in Arbeitsregister 16 kopieren | |
out DDRB, r16 //Arbeitsregister 16 in DDRB kopieren | |
ldi r16, 0b00000000 //alle input in Arbeitsregister 16 kopieren(der alte Inhalt wird ueberschrieben) | |
out DDRD, r16 //Arbeitsregister 16 in DDRD kopieren | |
Endlosschleife: | |
in r16, PIND //die anliegenden Spannungen des Ports D in Arbeitsregister 16 kopieren(uberschreiben) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
SoftwareSerial serialbluetooth(2, 3); | |
void setup() { | |
serialbluetooth.begin(9600); | |
Serial.begin(9600); | |
} | |
void loop() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define NOTE_D5 587 | |
#define NOTE_A5 880 | |
void setup() { | |
pinMode(13, INPUT); | |
pinMode(12, INPUT); //sensoren | |
pinMode(10, OUTPUT); //blau | |
pinMode(9, OUTPUT); | |
pinMode(8, OUTPUT); //rot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import processing.serial.*; | |
Serial arduino; | |
boolean button = false; | |
int x = 200; | |
int y = 180; | |
int b = 100; | |
int h = 75; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
SoftwareSerial bluetooth(2, 3); | |
void setup() { | |
bluetooth.begin(9600); | |
pinMode(13, OUTPUT); | |
} | |
void loop() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftPWM.h> | |
void setup() { | |
SoftPWMBegin(); | |
SoftPWMSet(A0, 0); | |
} | |
void loop() { | |
int i = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int score = 0; | |
void setup() { | |
pinMode(2, OUTPUT); | |
pinMode(3, OUTPUT); | |
pinMode(4, OUTPUT); | |
pinMode(5, OUTPUT); | |
pinMode(6, INPUT); | |
pinMode(7, INPUT); | |
pinMode(8, INPUT); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import processing.serial.*; | |
Serial arduino; | |
String auto = "33"; | |
void setup() { | |
arduino = new Serial(this, "COM15", 9600); | |
size(1200, 900); | |
fill(0); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |