• Time perception

    MakerM008/10/2024 at 07:58 0 comments

    I've developed a small game designed to assess an individual's temporal perception skills, specifically focusing on the precision of second estimations and their awareness of the passage of time. The programming required for this game is quite straightforward. Upon pressing a key, a timer begins. The objective is to release the key when you believe the pre-determined time interval has passed. By analyzing the outcomes, we can evaluate a person's aptitude in perceiving time accurately.

    The primary programming used for development is CircuitPython.

    CircuitPython is an open-source firmware for microcontrollers that makes it easy to program hardware with Python. It's particularly popular for educational purposes and hobbyist projects because of its simplicity and the large community supporting it. 

    The image demonstrates an attempt at gauging 4 seconds of time passage. Ha!

    from magiclick import MagiClick
    import os,displayio,supervisor,gc,terminalio
    import rtc
    import time
    from adafruit_display_text import label
    import board,microcontroller
    
    
    mc = MagiClick()
    
    from adafruit_bitmap_font import bitmap_font
    font_file = "fonts/LeagueSpartan-Bold-16.bdf"
    font = bitmap_font.load_font(font_file)
    # font = terminalio.FONT
    
    
    main_group = displayio.Group()
    mc.display.root_group=main_group
    
    
    t_label = label.Label(terminalio.FONT, color=0x2f88ff, scale=3)
    t_label.anchor_point = (0.5, 0.5)
    t_label.anchored_position = (mc.display.width//2, mc.display.height//2)
    t_label.text = "Press"
    
    main_group.append(t_label)
    
    mc.display.auto_refresh=False
    mc.display.refresh()
    microcontroller.cpu.frequency=160000000
    
    mc.display.brightness = 1.0
    now = 0
    while True:
        time.sleep(0.001)
        key_event = mc.keys.events.get()
        if key_event:
            if key_event.pressed:
                key = key_event.key_number
            elif key_event.released:
                key = key_event.key_number+10
            
        else:
             key=-1
             
        if key==0:
            now = time.monotonic()
            t_label.text="Timing"
            print("Timing")
            mc.display.refresh()
        elif key == 10:
            t = time.monotonic()-now
            t_label.text= f'{t:.3f}'
            print("end")
            print(t)
            mc.display.refresh()
            
        elif key==2:
            print('exit')
            microcontroller.cpu.frequency=240000000
            mc.exit()

  • cpy 9.0.4

    MakerM006/13/2024 at 10:26 0 comments

    After some time of hard work, I installed cpy 9.0.4 to the latest version of button. 

    Meanwhile, the code was updated to include a storage function and some new features.

    Some issues have been fixed.

  • circuitpython and game

    MakerM004/26/2024 at 05:11 0 comments

    Drawing inspiration from the C language implementation of tinyflap, I successfully developed a Flappy Bird game utilizing CircuitPython. The debugging phase proved to be unexpectedly seamless, enabling me to swiftly create an initial prototype of the game.

    The ground and clouds were drawn using the adafruit_display_shapes  lib, whereas the bird and pipes were implemented directly using images.

  • first test

    MakerM004/19/2024 at 07:49 0 comments

    Primarily, I wish to sincerely thank PCBWay, a leading entity in the industry, for its perceptive vision in identifying the potential of my project and extending substantial backing. Your sponsorship has transcended material provision by equipping me with superior-grade, precision-crafted PCB products that have been instrumental in facilitating seamless advancement during the R&D process.

    Throughout our cooperative engagement, the dedicated technical team at PCBWay has upheld a stringent attitude and provided efficient services, guaranteeing faultless precision at each juncture, thereby significantly boosting my operational efficiency. The outstanding product quality and considerate customer service you deliver have undoubtedly been crucial factors contributing to achieving key developmental milestones in the project.

    The testing process has been largely smooth, during which we did identify a minor design oversight where the LDO (Low Drop-Out) section was not provided with a stable control signal, leading to an inability to completely shut down the system. However, this issue is relatively easy to rectify; it can be resolved by shorting two pins as indicated in the diagram. Currently, we are using CircuitPython version 8.x and have confirmed its successful operation. In the coming days, I will commence work on porting to version 9.x.

    A charging indicator LED has been integrated onboard, facilitating the observation of the charging status.

  • first version

    MakerM004/01/2024 at 03:03 0 comments

    Based on previous experience, after the schematic diagram was ready, the first version has finally been updated.

    The pcb has been checked and found to be without issues, so it's ready for sampling.  

    The components with small packages have been chosen as much as possible on the PCB, therefore, only one side needs to be soldered.