PCB etching

From XPUB & Lens-Based wiki
Revision as of 14:01, 4 April 2024 by Louisa (talk | contribs) (Created page with "<pre style="font-weight: bold"> _______ _______ ______ _______ _________ _______ _________ _ _______ ( ____ )( ____ \( ___ \ ( ____ \\__ __/( ____ \|\ /|\__ __/( ( /|( ____ \ | ( )|| ( \/| ( ) ) | ( \/ ) ( | ( \/| ) ( | ) ( | \ ( || ( \/ | (____)|| | | (__/ / | (__ | | | | | (___) | | | | \ | || | | _____)| | | __ ( | __) | | | | | ___ | | |...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

_______  _______  ______     _______ _________ _______          _________ _        _______ 
(  ____ )(  ____ \(  ___ \   (  ____ \\__   __/(  ____ \|\     /|\__   __/( (    /|(  ____ \
| (    )|| (    \/| (   ) )  | (    \/   ) (   | (    \/| )   ( |   ) (   |  \  ( || (    \/
| (____)|| |      | (__/ /   | (__       | |   | |      | (___) |   | |   |   \ | || |      
|  _____)| |      |  __ (    |  __)      | |   | |      |  ___  |   | |   | (\ \) || | ____ 
| (      | |      | (  \ \   | (         | |   | |      | (   ) |   | |   | | \   || | \_  )
| )      | (____/\| )___) )  | (____/\   | |   | (____/\| )   ( |___) (___| )  \  || (___) |
|/       (_______/|/ \___/   (_______/   )_(   (_______/|/     \|\_______/|/    )_)(_______)
                                                                                            
                                                                    


Introduction

1. PCB Etching

2.

Hello World!

void setup() {
}

void loop() {
  Serial.println("Hello World!");   //sends a message to the computer
}

Simple Led blink example

int ledPin = 13;               //the int ledPin is 13

void setup() {
  pinMode(ledPin,OUTPUT);      //ledPin is a OUTPUT
}

void loop() {
  digitalWrite(ledPin,HIGH);   //turns pin 13 on
  delay(500);                  //stops the loop for 500 milliseconds
  digitalWrite(ledPin,LOW);    //turns pin 13 off
  delay(500);                  //stops the loop for 500 milliseconds
}

Traffic light example

int RedLedPin = 13;                 //the int RedLedPin is 13
int GreenLedPin = 12;               //the int GreenLedPin is 12

void setup() {
  pinMode(RedLedPin,OUTPUT);        //ledPin is a OUTPUT
  pinMode(GreenLedPin,OUTPUT);      //ledPin is a OUTPUT

}

void loop() {
  digitalWrite(GreenLedPin,HIGH);   //turns green led  on
  delay(5000);                      //stops the loop for 5000 milliseconds
  for(int i = 0; i < 5; i++){       //this for loop gets 5 times repeated
    digitalWrite(GreenLedPin,LOW);  //turns green led off
    delay(500);                     //stops the loop for 500 milliseconds
    digitalWrite(GreenLedPin,HIGH); //turns green led off
    delay(500);                     //stops the loop for 500 milliseconds
  }
  digitalWrite(GreenLedPin,LOW);    //turns green led off
  digitalWrite(RedLedPin,HIGH);     //turns red led on
  delay(5000);                      //stops the loop for 5000 milliseconds
  digitalWrite(RedLedPin,LOW);      //turns red led on
}

Speaker example

int speaker = 13;                   //int speaker is 13

void setup() {
  pinMode(speaker, OUTPUT);         //pin 13 is an output
}

void loop() {
  for(int i = 100; i< 1000;i++){    //for loop counts from 100 to 1000
    tone(speaker, i);               //generates a tone on pin 13 with the frequency of int i
    delay(10);                      //stops the code for 10 milliseconds
  }
}
  • WH.02.110 (Instruction Room IAS) 9:00 - 16:00