User talk:Arnithorleifs: Difference between revisions

From Fab Lab Wiki - by NMÍ Kvikan
Jump to navigation Jump to search
m Welcome!
 
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
You will probably want to read the [[Help:Contents|help pages]].
You will probably want to read the [[Help:Contents|help pages]].
Again, welcome and have fun! [[User:Frosti|Frosti]] ([[User talk:Frosti|talk]]) 15:31, 8 September 2013 (UTC)
Again, welcome and have fun! [[User:Frosti|Frosti]] ([[User talk:Frosti|talk]]) 15:31, 8 September 2013 (UTC)
Hi Arnithorleifs
the Main Page of the wiki is not exactly the best place to store your sketches or experiment with the wiki.  Please have your friends show you where to properly put your stuff.
--trox [at] fabfolk [.] com 17:07, 26 October 2013 (UTC)
== Arduino_Arni ==
#include <Servo.h>
Servo myservo;
int led = 13;
int lud = 12;
int lad = 11;
int potpin = 0;
int val;
void setup() {               
  pinMode(led, OUTPUT); 
  pinMode(lud, OUTPUT); 
  pinMode(lad, OUTPUT); 
  myservo.attach(9);
}
void loop() {
  digitalWrite(led, HIGH);
  delay(10);
  digitalWrite(led, LOW);
  delay(10);
  digitalWrite(lud, HIGH);
  delay(10);
  digitalWrite(lud, LOW);
  delay(10);
  digitalWrite(lad, HIGH);
  delay(10);
  digitalWrite(lad, LOW);
  delay(10);
  digitalWrite(lud, HIGH);
  delay(10);
  digitalWrite(lud, LOW);
  delay(10);
  val = analogRead(potpin);
  val = map(val, 0, 1023, 0, 179); 
  myservo.write(val);                 
  delay(0);                         
   
 
}

Latest revision as of 17:12, 28 October 2013

Welcome to NMÍ Kvikan! We hope you will contribute much and well. You will probably want to read the help pages. Again, welcome and have fun! Frosti (talk) 15:31, 8 September 2013 (UTC)


Hi Arnithorleifs

the Main Page of the wiki is not exactly the best place to store your sketches or experiment with the wiki. Please have your friends show you where to properly put your stuff.

--trox [at] fabfolk [.] com 17:07, 26 October 2013 (UTC)

Arduino_Arni

  1. include <Servo.h>

Servo myservo;


int led = 13; int lud = 12; int lad = 11; int potpin = 0; int val;



void setup() {

 pinMode(led, OUTPUT);   
 pinMode(lud, OUTPUT);   
 pinMode(lad, OUTPUT);  
 myservo.attach(9);

}


void loop() {

 digitalWrite(led, HIGH);
 delay(10); 
 digitalWrite(led, LOW);
 delay(10);
 digitalWrite(lud, HIGH);
 delay(10);
 digitalWrite(lud, LOW); 
 delay(10); 
 digitalWrite(lad, HIGH); 
 delay(10);
 digitalWrite(lad, LOW); 
 delay(10);
 digitalWrite(lud, HIGH);
 delay(10); 
 digitalWrite(lud, LOW);
 delay(10);
 val = analogRead(potpin); 
 val = map(val, 0, 1023, 0, 179);  
 myservo.write(val);                  
 delay(0);                           


}