Arnov SharmaJLCPCB
Published © MIT

Getting started with Attiny84

learn how to program Attiny84 with this custom Breakout board with ams1117 for basic level projects like blinking LED and stuff.

BeginnerFull instructions provided24 minutes4,851

Things used in this project

Story

Read more

Custom parts and enclosures

Gerber data for PCB

Schematics

sch for pcb

sch for pcb

stepper motor wiring

wiring for Programming

Code

Blink sketch for D8

C/C++
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(8, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(8, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(8, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

stepper motor with attiny84

C/C++
const int stepPin = 8; //3 on nano and 8 on at84
const int dirPin = 7; //4 on nano and 7 on at84
 
void setup() {
  // Sets the two pins as Outputs
  pinMode(stepPin,OUTPUT); 
  pinMode(dirPin,OUTPUT);
}
void loop() {
  digitalWrite(dirPin,HIGH); // Enables the motor to move in a particular direction
  // Makes 300 pulses for making one full cycle rotation
  for(int x = 0; x < 1000; x++) {
    digitalWrite(stepPin,HIGH); 
    delayMicroseconds(1000); 
    digitalWrite(stepPin,LOW); 
    delayMicroseconds(1000); 
  }
}

Credits

Arnov Sharma

Arnov Sharma

308 projects • 306 followers
Just your average MAKER
JLCPCB

JLCPCB

73 projects • 42 followers
JLCPCB, is the largest PCB and PCB Assembly prototype enterprise in Asia. Coupon code "JLCPCBcom" for all and permanantly available.

Comments