Bambino against ATtiny13A

Zápisník experimentátora

Hierarchy: ATtiny13A

Today it will be a lightweight topic. I used the ATtiny13A microcontroller in the project for our little bambino. He plays with a switch on the wall and watches the light on or off. Because he wants it every day, it's occasionally tiring to keep him at that wall waiting for him to be entertained.

That's why I put this project on the ATtiny13A microcontroller and three LEDs. It's a classic blink modification. All diodes are on the first three pins. It is packed in a plastic food box, a huge switch on the top and powered by a 4.5-volt battery.

A simple project, but the bambino is incredibly satisfied with the result. He sits at it and clicks on the switch. And he does not mind that it's not on the wall. He even turns his box and tries to figure out how it works. The video shows him in several scenes where he is playing with the box.

void setup() {
  for (uint8_t i = 0; i < 3; i++)
    pinMode(i, OUTPUT);
}

uint8_t x = 0;

void loop() {
  for (uint8_t i = 0; i < 3; i++)
    digitalWrite(i, x == i ? true : false);
  x++;
  x %= 3;
  delay(1000);
}

Source code

The source code is located on the server GitHub.

Video

Video is located on YouTube.


26.06.2018


Menu