Skip to content

🔦 Larger gadget with batteries & commercial AnyBeam projector & stereo camera & Orange Pi 5.

Notifications You must be signed in to change notification settings

FolkComputer/gadget2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gadget2

still very WIP; instructions may be inaccurate.

Bill of materials

Tools

  • M2.5 driver

Construction

  1. Install Wi-Fi card in Orange Pi 5

  2. Solder jumper cables to the 3.5mm socket

  3. Use a soldering iron to sink the threaded inserts (1x 1/4in for bottom tripod, 4x M2.5 2.5mm for front panel, 4x M2.5 2.5mm for back panel) into the chassis / front panel

  4. Glue neoprene rubber to the inside of the chassis to keep the projector stable

  5. Attach standoffs to the Pi and battery.

    • Battery should be oriented with jumper pins (not the ports you plug into, the exposed pins) in front (same side as projector lens, camera). See image at top of page
    • Pi should be oriented with microSD in front
  6. Connect GPIO pins on Pi to battery pins

  7. Remove the charger and power button cables from the battery and take off the rings. Attach the charger and power buttons to the back panel

  8. Put the battery and Pi into the chassis. Bolt the battery and Pi standoffs in

  9. Screw the camera into the chassis (screws go directly into the plastic)

  10. Put the projector into the chassis, bolt it in with 1/4 in bolt with washers both inside and outside the chassis to keep it from warping

Grip construction

Print the dial and internal block from the original grip files, and the grip file from this repo which has a cutout for trigger button.

Software setup

Use Joshua Riek Ubuntu.

$ sudo systemctl enable ssh && sudo systemctl start ssh

sudo adduser folk i2c for battery check

Set up device tree overlays -- at end of /etc/default/u-boot, for I2C and Wi-Fi card:

U_BOOT_FDT_OVERLAYS="device-tree/rockchip/overlay/orangepi-5-ap6275p.dtbo device-tree/rockchip/overlay/rk3588-i2c5-m3.dtbo"

Graphics

Install Vulkan: https://github.com/Bleach665/Mali610Vulkan

Wi-Fi

sudo apt install network-manager

/etc/netplan/50-cloud-init.yaml

network:
  version: 2
  ethernets:
    zz-all-en:
      match:
        name: "en*"
      optional: true
      dhcp4: true
    zz-all-eth:
      match:
        name: "eth*"
      optional: true
      dhcp4: true
  wifis:
    wlan0:
      dhcp4: true
      access-points:
        YOUR-WIFI-SSID:
          password: YOUR-WIFI-PASSWORD

Folk

compile wiringOP in ~/wiringOP

HACK for /dev/mem access:

$ sudo setcap cap_sys_rawio+ep `which tclsh8.6`

setup.folk:

Assert $this wishes $::thisNode uses camera "/dev/video0" with \
    width 3200 height 1200 \
    crop {x 500 y 0 width 1000 height 800}

Assert $this wishes $::thisNode uses display 0

set fd [open |[list python3 "/home/folk/UPS_Module_3S_Code/RaspberryPi/UPS Module 3S/INA219.py"] r]
fconfigure $fd -buffering line
fileevent $fd readable [list apply {{fd} {
    if {[gets $fd line] < 0} {
        if {[eof $fd]} {
            close $fd
        }
    }

    if {[regexp {Percent:\s*([0-9\.]+)%} $line -> percent]} {
        Hold battery {Claim the battery percentage is $percent}
    }
}} $fd]

When display /disp/ has width /w/ height /h/ {
    When the button is /state/ {
        When the clock time is /t/ {
            set color [expr {$state eq "pressed" ? "green" : "white"}]
            Wish to draw a dashed stroke with points \
                [list [list 0 0] \
                     [list $w 0] \
                     [list $w $h] \
                     [list 0 $h] \
                     [list 0 0]] \
                color $color width 10 dashlength 40 dashoffset [expr {fmod($t, 10)*-120}]
        }
    }
}
When the battery percentage is /percent/ {
    Wish to draw text with text "$percent%" x 40 y 40
}

set cc [c create]
$cc include <wiringPi.h>
$cc proc gpioInit {} void {
    // gpio mode 16 up
    FOLK_ENSURE(wiringPiSetup() != -1);
    pinMode(16, INPUT);
    pullUpDnControl(16, PUD_UP);
}
$cc proc gpioRead {} int {
    // gpio read 16
    return digitalRead(16);
}

c loadlib /home/folk/wiringOP/wiringPi/libwiringPi.so.2.58
$cc compile
exec sudo chmod 666 /dev/mem

gpioInit
When the clock time is /t/ {
    set pressed [expr {![gpioRead]}]
    Hold button \
        {Claim the button is [expr {$pressed ? "pressed" : "unpressed"}]}
}

About

🔦 Larger gadget with batteries & commercial AnyBeam projector & stereo camera & Orange Pi 5.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published