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() { | |
int i; | |
Serial.begin(9600); | |
for(i=2; i<10; i++) | |
{ | |
Serial.println(i); | |
pinMode(i, OUTPUT); | |
digitalWrite(i, HIGH); | |
delay(5000); | |
digitalWrite(i, LOW); |
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(2, OUTPUT); | |
pinMode(3, OUTPUT); | |
pinMode(4, OUTPUT); | |
pinMode(5, OUTPUT); | |
pinMode(6, OUTPUT); | |
pinMode(7, OUTPUT); | |
pinMode(8, OUTPUT); | |
pinMode(9, OUTPUT); | |
} |
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 <SPI.h> | |
void setup (void) | |
{ | |
digitalWrite(SS, HIGH); //SS Pin auf HIGH setzten | |
SPI.begin (); //Verbindung starten | |
SPI.setClockDivider(SPI_CLOCK_DIV8); //Geschwindigkeit verlangsamen |
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 <SPI.h> | |
char buf [100]; | |
volatile byte pos; | |
volatile boolean senden; | |
void setup (void) | |
{ | |
Serial.begin (9600); //starten der seriellen Verbindung | |
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
/* | |
* GccApplication2.cpp | |
* | |
* Created: 13.07.2015 14:24:32 | |
* Author: Michael | |
*/ | |
#ifndef F_CPU | |
#define F_CPU 16000000UL | |
#endif | |
#include <util/delay.h> |
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
/* | |
* Durchschnitt_erechnen.c | |
* | |
* Created: 15.07.2015 16:24:54 | |
* Author: Michael | |
*/ | |
#include <avr/io.h> | |
int function(void) |
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
/* | |
* GccApplication1.cpp | |
* | |
* Created: 15.07.2015 16:29:05 | |
* Author: Michael | |
*/ | |
#include <avr/io.h> | |
#include "C:\Users\Michael\Documents\Atmel Studio\6.2\Durchschnitt_erechnen\Durchschnitt_erechnen\Durchschnitt_erechnen.c" |
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 led = 13; | |
int opto = 7; | |
void setup() { | |
pinMode(led, OUTPUT); | |
pinMode(opto, INPUT); | |
} | |
void loop() { | |
if(digitalRead(opto) == HIGH) | |
{ |
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
{ | |
"name": "blinken", | |
"version": "1.0", | |
"description": "ein kleines Testprogramm", | |
"dependencies": { | |
"johnny-five": "^0.8.29" | |
} | |
} |
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
//nachladen von johnny-five | |
var five = require("johnny-five"); | |
//ArduinoBoard und LED | |
var Arduino, LED; | |
//verbinden mit dem Arduino | |
Arduino = new five.Board(); | |
//Programmcode nach erfolgreicher Verbindung | |
Arduino.on("ready", function() { |