Skip to content
International Shipping
Wish Lists Cart
0 items

Count Up Project

17 Nov 2023
Count Up Project

Table of Contents

    Hey, have you ever tried your hand at DIY electronics? It’s like a playground where you can let your creativity run wild. And let me tell you, the coolest projects are the ones that just pop into your head. Today, we’re diving into something seriously exciting: the servo motor. It may not look like much, but this little gadget can do some serious heavy lifting and open up a whole new world of possibilities. With the DIY electronics kit like Picobricks platform and a trusty servo motor, you’re ready to create some seriously genius stuff, starting with your very own timer. Whether you want to make a game clock or a precision stopwatch, this dynamic duo has got your back and can turn your vision into reality. So, let’s hop aboard and embark on this awesome journey together! 

    Count Up Timer

    A count-up timer is a type of timer that typically counts the elapsed time from the start of an event or process. It displays the elapsed time in seconds, minutes, hours, or larger time intervals. For example, it can be used to track the time elapsed during a sports event or measure the completion time of a project. This type of timer uses a continuously increasing counter from the starting point to show how much time has passed.

    Details and Algorithm

    You can use a servo motor to count from 0 to 60 seconds. The arrow on the servo moves 3 degrees every second. It’s perfect for making a game clock or stopwatch. Just hit the button to stop the timer. And if you wanna switch it up and count down instead of up, just make a little tweak. if you want to try  flip the range block from -90 to 90 to 90 to -90, the arrow will move the other way.



    Wiring Diagram

    Count Up timer wiring diagram

    from time import sleep
    from machine import Pin
    from machine import PWM
    from math import fabs
    from machine import I2C
    from picobricks import SSD1306_I2C
    import time
    pwm_1 = PWM(Pin(21))
    def CalculateAngle(angle):
       angle = fabs((angle * (6000 / 180)) + 2000)
       angle = round(angle)
       return angle
    i2c = I2C(0, scl=Pin(5), sda=Pin(4), freq=200000)
    oled = SSD1306_I2C(128, 64, i2c, addr=0x3c)
    i = -90
    while i >= (-90) and i < (90):
        i = i + (3)
        oled.text("{}".format(i), 0, 0)

    Arduino Codes of The Count Up

    #include “ACROBOTIC_SSD1306.h”
    #define BUTTON_PIN 10
    Servo servo;
    void setup() {
      pinMode(BUTTON_PIN, INPUT);
      Wire.begin(); // SDA, SCL
    void loop() {
        for(int i=-90;i>=-90 && i<=90; i+=3 ){
        oled.setTextXY(4, 7);
        oled.putString(String(30+ i/3));
    Prev Post
    Next Post

    Thanks for subscribing!

    This email has been registered!

    Shop the look
    Choose Options

    Edit Option

    Have Questions?

    Back In Stock Notification


    Product SKUDescription Collection Availability Product Type Other Details

    Terms & Conditions

    What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Why do we use it? It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
    this is just a warning
    Shopping Cart
    0 items