Uploading code ATTiny13A-SSU 8 bit

I am trying to upload the below code .my question is how can I check memory related to above ic

I am looking low cost Atmel ic.where I can upload below program

Atmel ic price must me around 20 to 40Rs.
It must be compatible with arduino ide

Allow me to program using avr programmer.

int Sound = 1;
int i;
int SW1 = 2;
int SW2 = 3;



void Police_Alarm()
{
  for (i = 440; i < 1000; i++)
  {
    tone(Sound, i, 50);
    delay(5);
  }
  for (i = 1000; i > 440; i--)
  {
    tone(Sound, i, 50);
    delay(5);
  }
}


void Fire_Alarm()
{
  tone(Sound, 800, 800);
  delay(200);
  tone(Sound, 600, 800);
  delay(200);

}


void setup() {
  // put your setup code here, to run once:
  pinMode(SW1, INPUT);
  pinMode(SW2, INPUT);
  
}

void loop() {
  // put your main code here, to run repeatedly:

  if ((SW1 == 1) && (SW2 == 1))
  {
    Police_Alarm();
  }

  if ((SW1 == 0) && (SW2 == 0))
  {
    Fire_Alarm();
  }



}

SW1 and SW2 are the pin numbers not the pin states.

void loop() {
  // put your main code here, to run repeatedly:

  if ((SW1 == 1) && (SW2 == 1))
  {
    Police_Alarm();
  }

  if ((SW1 == 0) && (SW2 == 0))
  {
    Fire_Alarm();
  }
}

I could not able to recognise board in board

can you suggest me where I could find board

IS there any MCU with 8PIN IC which support Arduino IDE for Programming

int Sound = 13;
int i;
int SW1 = 3;
int SW2 = 4;
void Police_Alarm()
{
  for (i = 440; i < 1000; i++)
  {
    tone(Sound, i, 50);
    delay(5);
  }
  for (i = 1000; i > 440; i--)
  {
    tone(Sound, i, 50);
    delay(5);
  }
}
void Fire_Alarm()
{
  tone(Sound, 800, 800);
  delay(200);
  tone(Sound, 600, 800);
  delay(200);

}


void setup() {
  // put your setup code here, to run once:
  pinMode(SW1, INPUT);
  pinMode(SW2, INPUT);

}

void loop() {
  // put your main code here, to run repeatedly:

  if (digitalRead(SW1) == 1)
  {
    if (digitalRead(SW2) == 1)
    {
      Police_Alarm();
    }
  }
  if (digitalRead(SW1) == 0)
  {
    if (digitalRead(SW2) == 0)
    {
      Fire_Alarm();
    }
  }
}

All of the ATtiny family chips meet your requirements. (except for the price , that may vary)this is a good tutorial for uploading to an ATtiny13 (for other types of ATtiny you will need to install a different core, but the method is is the same) [Check this tutorial](https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
http://drazzy.com/package_drazzy.com_index.json)

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.