Output Devices

This Week's assignment was to use any output device.So I changed my HelloWorld's circuits that I had used in other previous assignments with an ATTiny45 microcontroller, but this time I used an ATTiny44 microcontroller in a helloworld circuit and included a servo motor thet I was going to contol from my monitor through an HTMl interface.

For conducting this week's board programmiing I used arduino frame works to program my board where my servo device which is acting as an output device will be turning from 180 degree to 0 degree and vice versa based on the code written on chip memory. I used arduino IDE and Arduino based C programing.

Schematic of the circuit Board of the circuit png Traces png Outline Printed Board Servor Motor used and wires Servor Motor used and wires Servor Motor connected to the circuit

The Codes Used

     
            #include < Servo.h>

Servo myservo;  

int pos = 0;

void setup() {
  myservo.attach(PA6);
}

void loop() {
  for (pos = 0; pos <= 180; pos += 1) { 
    myservo.write(pos);
    delay(15);
  }
  
  for (pos = 180; pos >= 0; pos -= 1) {
    myservo.write(pos);
    delay(15);
  }
}