Maker Pro
Arduino

Attiny85 based Keychain Board - DIY

June 07, 2022 by AFZAL REHMANI
Share
banner

In this tutorial we are going to discuss Attiny85 based Keychain Board - DIY

We all buy key chains and many of us have a crazy fascination with them to buy. Thus, there are different kinds of key chains available in the market for children and adults. Many keychain brands launch keychain that represents different passions that people are involved. For example, a person who loves cartoons would like to have his favorite cartoon keychain, those who love books would like to have a related keychain. Thus, it depends on obsessions or passions. So, today we are making the keychain for electronic learners. Those who are fond of microcontrollers, those who find electronics their joy. So, in this tutorial, we are going to make a simple "Keychain based on Attiny85 Microcontroller". Watch this step-by-step video below for complete details.

PCBWay commits to meeting the needs of its customers from different industries in terms of quality, delivery, cost-effectiveness, and any other demanding requests. As one of the most experienced PCB manufacturers in China. They pride themselves to be your best business partners as well as good friends in every aspect of your PCB needs. 

pcbway.JPG
void setup() {
  // put your setup code here, to run once:
pinMode(0,OUTPUT);
pinMode(1,OUTPUT);
pinMode(2,OUTPUT);
 digitalWrite(0,1);
  digitalWrite(1,1);
   digitalWrite(2,1);
   delay(1400);
   digitalWrite(0,0);
  digitalWrite(1,0);
   digitalWrite(2,0);
   delay(600);
}
int mod=5;
int pritisnuto=0;
void loop() {

for(int i=0;i<3;i++)
  {
    if(digitalRead(3)==0)
    {
      if(pritisnuto==0)
      {
        pritisnuto=1;
        mod=mod-1;
        if(mod==0)
        mod=5;
        }
      }else{ pritisnuto=0;}
    digitalWrite(i,1);
    delay((mod*80)-50);
    digitalWrite(i,0);
  }

}
attiny85-keychain-board-circuit.jpg

Related Content

Tags

Comments


You May Also Like