├── Orb4x4 ├── Code │ ├── bubbles.py │ ├── code.py │ ├── coordinates.py │ ├── imu.py │ ├── lib │ │ ├── adafruit_ble │ │ │ ├── __init__.mpy │ │ │ ├── advertising │ │ │ │ ├── __init__.mpy │ │ │ │ ├── adafruit.mpy │ │ │ │ └── standard.mpy │ │ │ ├── attributes │ │ │ │ └── __init__.mpy │ │ │ ├── characteristics │ │ │ │ ├── __init__.mpy │ │ │ │ ├── float.mpy │ │ │ │ ├── int.mpy │ │ │ │ ├── json.mpy │ │ │ │ ├── stream.mpy │ │ │ │ └── string.mpy │ │ │ ├── services │ │ │ │ ├── __init__.mpy │ │ │ │ ├── circuitpython.mpy │ │ │ │ ├── microbit.py │ │ │ │ ├── midi.mpy │ │ │ │ ├── nordic.mpy │ │ │ │ ├── sphero.mpy │ │ │ │ └── standard │ │ │ │ │ ├── __init__.mpy │ │ │ │ │ ├── device_info.mpy │ │ │ │ │ └── hid.mpy │ │ │ └── uuid │ │ │ │ └── __init__.mpy │ │ ├── adafruit_ble_adafruit │ │ │ ├── __init__.py │ │ │ ├── accelerometer_service.mpy │ │ │ ├── adafruit_service.mpy │ │ │ ├── addressable_pixel_service.mpy │ │ │ ├── barometric_pressure_service.mpy │ │ │ ├── button_service.mpy │ │ │ ├── color_sensor_service.mpy │ │ │ ├── gesture_service.mpy │ │ │ ├── gyroscope_service.mpy │ │ │ ├── humidity_service.mpy │ │ │ ├── light_sensor_service.mpy │ │ │ ├── magnetometer_service.mpy │ │ │ ├── microphone_service.mpy │ │ │ ├── proximity_service.mpy │ │ │ ├── quaternion_service.mpy │ │ │ ├── temperature_service.mpy │ │ │ └── tone_service.mpy │ │ ├── adafruit_bluefruit_connect │ │ │ ├── __init__.mpy │ │ │ ├── _xyz_packet.mpy │ │ │ ├── accelerometer_packet.mpy │ │ │ ├── button_packet.mpy │ │ │ ├── color_packet.mpy │ │ │ ├── gyro_packet.mpy │ │ │ ├── location_packet.mpy │ │ │ ├── magnetometer_packet.mpy │ │ │ ├── packet.mpy │ │ │ ├── quaternion_packet.mpy │ │ │ └── raw_text_packet.mpy │ │ ├── adafruit_bus_device │ │ │ ├── __init__.py │ │ │ ├── i2c_device.mpy │ │ │ └── spi_device.mpy │ │ ├── adafruit_debouncer.mpy │ │ ├── adafruit_dotstar.mpy │ │ ├── adafruit_fancyled │ │ │ ├── __init__.py │ │ │ ├── adafruit_fancyled.mpy │ │ │ └── fastled_helpers.mpy │ │ ├── adafruit_led_animation │ │ │ ├── __init__.mpy │ │ │ ├── animation │ │ │ │ ├── __init__.mpy │ │ │ │ ├── blink.mpy │ │ │ │ ├── chase.mpy │ │ │ │ ├── colorcycle.mpy │ │ │ │ ├── comet.mpy │ │ │ │ ├── customcolorchase.mpy │ │ │ │ ├── grid_rain.mpy │ │ │ │ ├── pulse.mpy │ │ │ │ ├── rainbow.mpy │ │ │ │ ├── rainbowchase.mpy │ │ │ │ ├── rainbowcomet.mpy │ │ │ │ ├── rainbowsparkle.mpy │ │ │ │ ├── solid.mpy │ │ │ │ ├── sparkle.mpy │ │ │ │ └── sparklepulse.mpy │ │ │ ├── color.mpy │ │ │ ├── grid.mpy │ │ │ ├── group.mpy │ │ │ ├── helper.mpy │ │ │ └── sequence.mpy │ │ ├── adafruit_lsm6ds │ │ │ ├── __init__.mpy │ │ │ ├── ism330dhcx.mpy │ │ │ ├── lsm6ds3.mpy │ │ │ ├── lsm6ds33.mpy │ │ │ ├── lsm6ds3trc.mpy │ │ │ ├── lsm6dso32.mpy │ │ │ └── lsm6dsox.mpy │ │ ├── adafruit_pixelbuf.mpy │ │ ├── adafruit_register │ │ │ ├── __init__.py │ │ │ ├── i2c_bcd_alarm.mpy │ │ │ ├── i2c_bcd_datetime.mpy │ │ │ ├── i2c_bit.mpy │ │ │ ├── i2c_bits.mpy │ │ │ ├── i2c_struct.mpy │ │ │ └── i2c_struct_array.mpy │ │ ├── adafruit_ticks.mpy │ │ ├── neopixel.mpy │ │ ├── simpleio.mpy │ │ ├── tilt.py │ │ └── twinkle.py │ ├── orb.py │ └── tilt.py ├── Design │ ├── BatteryHolder14250.stl │ ├── Corner Bracket Print_2.stl │ ├── Magnet Holder Body Print_2.stl │ ├── Magnet Holder Lid Print_2.stl │ ├── Shell Print_6.stl │ ├── Side Bracket Print_2.stl │ ├── Side Bracket Xiao Holder Print_1.stl │ └── Tiles Print_6.stl ├── Pictures │ ├── BatteryHolderOrientation.JPG │ ├── CubeBodyAndLid.JPG │ ├── CubeBodyAndLidLabelled.JPG │ ├── CubeBodyWithBatteryHolder.JPG │ ├── CubeBodyWithoutBatteryHolder.JPG │ ├── CubeLidWithConnectors.JPG │ ├── CubebodyWithoutController.JPG │ ├── GluingTiles4x4.jpg │ ├── Illuminated4x4.jpg │ ├── Interior4x4.jpg │ └── Wiring.png └── README.md ├── Orb4x4_V2 ├── Design │ ├── AllConnectors4x4V2.stl │ ├── BatHolder.stl │ ├── Shell4x4V2.stl │ └── Tiles4x4V2.stl └── README.md ├── Orb5x5 ├── Code │ └── CircuitPython │ │ ├── bubbles.py │ │ ├── code.py │ │ ├── coordinates.py │ │ ├── imu.py │ │ ├── lib │ │ ├── adafruit_ble │ │ │ ├── __init__.mpy │ │ │ ├── advertising │ │ │ │ ├── __init__.mpy │ │ │ │ ├── adafruit.mpy │ │ │ │ └── standard.mpy │ │ │ ├── attributes │ │ │ │ └── __init__.mpy │ │ │ ├── characteristics │ │ │ │ ├── __init__.mpy │ │ │ │ ├── float.mpy │ │ │ │ ├── int.mpy │ │ │ │ ├── json.mpy │ │ │ │ ├── stream.mpy │ │ │ │ └── string.mpy │ │ │ ├── services │ │ │ │ ├── __init__.mpy │ │ │ │ ├── circuitpython.mpy │ │ │ │ ├── microbit.py │ │ │ │ ├── midi.mpy │ │ │ │ ├── nordic.mpy │ │ │ │ ├── sphero.mpy │ │ │ │ └── standard │ │ │ │ │ ├── __init__.mpy │ │ │ │ │ ├── device_info.mpy │ │ │ │ │ └── hid.mpy │ │ │ └── uuid │ │ │ │ └── __init__.mpy │ │ ├── adafruit_ble_adafruit │ │ │ ├── __init__.py │ │ │ ├── accelerometer_service.mpy │ │ │ ├── adafruit_service.mpy │ │ │ ├── addressable_pixel_service.mpy │ │ │ ├── barometric_pressure_service.mpy │ │ │ ├── button_service.mpy │ │ │ ├── color_sensor_service.mpy │ │ │ ├── gesture_service.mpy │ │ │ ├── gyroscope_service.mpy │ │ │ ├── humidity_service.mpy │ │ │ ├── light_sensor_service.mpy │ │ │ ├── magnetometer_service.mpy │ │ │ ├── microphone_service.mpy │ │ │ ├── proximity_service.mpy │ │ │ ├── quaternion_service.mpy │ │ │ ├── temperature_service.mpy │ │ │ └── tone_service.mpy │ │ ├── adafruit_bluefruit_connect │ │ │ ├── __init__.mpy │ │ │ ├── _xyz_packet.mpy │ │ │ ├── accelerometer_packet.mpy │ │ │ ├── button_packet.mpy │ │ │ ├── color_packet.mpy │ │ │ ├── gyro_packet.mpy │ │ │ ├── location_packet.mpy │ │ │ ├── magnetometer_packet.mpy │ │ │ ├── packet.mpy │ │ │ ├── quaternion_packet.mpy │ │ │ └── raw_text_packet.mpy │ │ ├── adafruit_bus_device │ │ │ ├── __init__.py │ │ │ ├── i2c_device.mpy │ │ │ └── spi_device.mpy │ │ ├── adafruit_debouncer.mpy │ │ ├── adafruit_fancyled │ │ │ ├── __init__.py │ │ │ ├── adafruit_fancyled.mpy │ │ │ └── fastled_helpers.mpy │ │ ├── adafruit_led_animation │ │ │ ├── __init__.mpy │ │ │ ├── animation │ │ │ │ ├── __init__.mpy │ │ │ │ ├── blink.mpy │ │ │ │ ├── chase.mpy │ │ │ │ ├── colorcycle.mpy │ │ │ │ ├── comet.mpy │ │ │ │ ├── customcolorchase.mpy │ │ │ │ ├── grid_rain.mpy │ │ │ │ ├── pulse.mpy │ │ │ │ ├── rainbow.mpy │ │ │ │ ├── rainbowchase.mpy │ │ │ │ ├── rainbowcomet.mpy │ │ │ │ ├── rainbowsparkle.mpy │ │ │ │ ├── solid.mpy │ │ │ │ ├── sparkle.mpy │ │ │ │ └── sparklepulse.mpy │ │ │ ├── color.mpy │ │ │ ├── grid.mpy │ │ │ ├── group.mpy │ │ │ ├── helper.mpy │ │ │ └── sequence.mpy │ │ ├── adafruit_lsm6ds │ │ │ ├── __init__.mpy │ │ │ ├── ism330dhcx.mpy │ │ │ ├── lsm6ds3.mpy │ │ │ ├── lsm6ds33.mpy │ │ │ ├── lsm6ds3trc.mpy │ │ │ ├── lsm6dso32.mpy │ │ │ └── lsm6dsox.mpy │ │ ├── adafruit_pixelbuf.mpy │ │ ├── adafruit_register │ │ │ ├── __init__.py │ │ │ ├── i2c_bcd_alarm.mpy │ │ │ ├── i2c_bcd_datetime.mpy │ │ │ ├── i2c_bit.mpy │ │ │ ├── i2c_bits.mpy │ │ │ ├── i2c_struct.mpy │ │ │ └── i2c_struct_array.mpy │ │ ├── adafruit_ticks.mpy │ │ ├── neopixel.mpy │ │ └── simpleio.mpy │ │ ├── orb.py │ │ └── tilt.py ├── Design │ ├── AllConnectors5x5.3mf │ ├── BatteryHolder16340.stl │ ├── BatteryHolder16340Bambulag.3mf │ ├── BatteryHolder16340WithSwitch.stl │ ├── PointTiles5x5.stl │ ├── PointTiles5x5BambulabSlicer.3mf │ ├── Shell5x5.stl │ ├── Shell5x5BambulabSlicer.3mf │ ├── ShellForPointyTiles.stl │ ├── Tiles5x5.stl │ ├── Tiles5x5All.3mf │ └── Tiles5x5Thinner.3mf ├── Pictures │ ├── Orb5x5.JPG │ ├── OrbTiltPattern5x5.jpg │ └── OrbWithCube5x5.jpg └── README.md ├── Orb8x8 ├── SK9822 │ ├── Design │ │ ├── CubeOrbSK9822Connectors.stl │ │ └── CubeSphereSK9822Connectors.3mf │ ├── Pictures │ │ ├── ConnectorsOnly.JPG │ │ ├── MatrixBodyWithConnectors.JPG │ │ ├── MatrixBodyWithConnectorsAndLatch.JPG │ │ └── MatrixLidWithConnectors.JPG │ └── Pixelblaze │ │ └── mapper.txt └── WS2812 │ ├── Design │ ├── CubeSphere8x8MatrixConnectors.stl │ ├── CubeSphere8x8WS2812Connectors.3mf │ ├── Shell.stl │ ├── Tiles.stl │ └── orb_holder.svg │ ├── Pictures │ ├── ConnectorsOnly.JPG │ ├── CubeWithOrb8x8.jpg │ ├── MatrixBodyConnectorsWithoutLock.JPG │ ├── MatrixBodyLayout.JPG │ ├── MatrixBodyWithBatteryLock.JPG │ ├── MatrixBodyWithoutLock.JPG │ ├── MatrixLid.JPG │ ├── MatrixLidWithConnectors.JPG │ ├── OpenOrb8x8.jpg │ └── Orb8x8.jpg │ ├── Pixelblaze │ ├── CubeSpherePixelblazeMap.txt │ └── README.md │ └── README.md ├── Pictures └── ThreeOrbs.jpg └── README.md /Orb4x4/Code/bubbles.py: -------------------------------------------------------------------------------- 1 | from adafruit_led_animation.animation import Animation 2 | from coordinates import * 3 | import board, time 4 | import math 5 | import random 6 | 7 | #NOTE: Work in progress. Currently doesn't make use of the IMU, but will eventually 8 | # move the bubbles around so they float to the top of the orb 9 | 10 | #returns angular distance between two angular positions 11 | def angular_separation(theta1, phi1, theta2, phi2): 12 | return math.acos(math.cos(phi1)*math.cos(phi2) + 13 | math.sin(phi1)*math.sin(phi2)*math.cos(theta1 - theta2)) 14 | 15 | class Bubble: 16 | def __init__(self, radius, color, pos): 17 | # radius is angular in radians 18 | self.radius = radius 19 | self.color = color 20 | #position on the surface of a sphere, theta, phi 21 | self.pos = pos 22 | self.velocity = [random.random()/20, random.random()/20] 23 | 24 | class Bubbles(Animation): 25 | """ 26 | Tilt Animation 27 | :param pixel_object: The initialised LED object. 28 | :param float speed: Animation speed in seconds, e.g. ``0.1``. 29 | :param color: Animation color in ``(r, g, b)`` tuple, or ``0x000000`` hex format. 30 | :param twinklechance: chance of turning on at any moment 31 | """ 32 | def __init__( 33 | self, 34 | pixel_object, 35 | coord_list, #Angular coordinates (r, theta, phi) 36 | imu, 37 | speed=.03, 38 | color=(255,0,0), 39 | name=None 40 | ): 41 | super().__init__(pixel_object, speed, color=color, name=name) 42 | self.imu = imu 43 | self.coords = coord_list 44 | self.bubbles = [Bubble(math.pi/4, (255,0,0), [math.pi/5,math.pi/8]), 45 | Bubble(math.pi/4, (0,255,0), [math.pi/3, math.pi/9]), 46 | Bubble(math.pi/5, (0,0,255), [-math.pi/3, 0])] 47 | 48 | 49 | def reset(self): 50 | self.pixel_object.fill((0,0,0)) 51 | 52 | # Base color on pitch, position on roll 53 | def draw(self): 54 | x,y,z = self.imu.acceleration 55 | pitch = math.atan2(x,z) 56 | roll = math.atan2(y, math.sqrt(z*z + x*x)) 57 | #print("Acceleration: X:%.2f, Y: %.2f, Z: %.2f m/s^2" % (self.imu.acceleration)) 58 | #print("Gyro X:%.2f, Y: %.2f, Z: %.2f radians/s" % (imu.gyro)) 59 | #print("Pitch:%.2f, Roll:%.2f" % (pitch, roll)) 60 | #droll = math.degrees(roll) 61 | #dpitch = math.degrees(pitch) 62 | #print(" roll ",droll, " pitch ", dpitch) 63 | npix = self.pixel_object.n 64 | self.pixel_object.fill((0,0,0)) 65 | for i in range(npix): 66 | for b in self.bubbles: 67 | sep = angular_separation(b.pos[0], b.pos[1], self.coords[i][0], self.coords[i][1]) 68 | if sep < b.radius: 69 | v = math.pow((1-sep/b.radius),2) 70 | self.pixel_object[i] = [int(self.pixel_object[i][k] + b.color[k]*v) for k in range(3)] 71 | 72 | for b in self.bubbles: 73 | b.pos[1] += b.velocity[1] 74 | if b.pos[1] >= math.pi: 75 | b.pos[1] = math.pi - b.pos[1] 76 | b.velocity[1] = -b.velocity[1] 77 | b.pos[0] += b.velocity[0] 78 | if b.pos[0] >= math.pi: 79 | b.pos[0] -= 2*math.pi 80 | -------------------------------------------------------------------------------- /Orb4x4/Code/code.py: -------------------------------------------------------------------------------- 1 | # Write your code here :-) 2 | from tilt import Tilt 3 | from adafruit_led_animation.animation.rainbowsparkle import RainbowSparkle 4 | from adafruit_led_animation.color import RAINBOW 5 | from bubbles import Bubbles 6 | from orb import * 7 | import imu 8 | import board 9 | import neopixel 10 | import time, random 11 | 12 | RED = (255,0,0) 13 | BLACK = (0,0,0) 14 | 15 | # Update to match the pin connected to your NeoPixels 16 | pixel_pin = board.D4 17 | # Update to match the number of NeoPixels you have connected 18 | pixel_num = 96 19 | 20 | pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=0.3, auto_write=False) 21 | pixels.fill((0,0,0)) 22 | 23 | def orb4x4(): 24 | width = 4 25 | gap = 0.25 26 | X = Matrix.X 27 | Y = Matrix.Y 28 | Z = Matrix.Z 29 | npix = width*width 30 | maxv = width-1 #largest coordinate valhe 31 | #definition of matrix defaults to alternating rows 32 | #The reference coodrinate frame for the orb is the one in which the 33 | #XIAO X-axis is along the short board axis, the positive Y axis is along 34 | #the long axis with positive direction pointed towards the USB connector 35 | #and positive Z axis is above the top of the board 36 | 37 | #Standard matrix with alternating row directions 38 | front = Matrix([0, -gap, 0], X, Z, 0, width) 39 | right = Matrix([maxv + gap, 0, maxv], -Z, Y, 1*npix, width) 40 | bottom = Matrix([maxv, 0, -gap], -X, Y, 2*npix, width) 41 | left = Matrix([-gap, 0, 0], Z, Y, 3*npix, width) 42 | top = Matrix([maxv, 0, maxv+gap], Y, -X, 4*npix, width) 43 | back = Matrix([maxv, maxv+gap, maxv], -Z, -X, 5*npix, width) 44 | """ 45 | # This is my weird cube with some alternating, some non-alternating matrices 46 | front = Matrix([0, -gap, 0], X, Z, 0, width, alternating=False) 47 | right = Matrix([maxv + gap, 0, maxv], -Z, Y, 1*npix, width, alternating=False) 48 | bottom = Matrix([maxv, maxv, -gap], -X, -Y, 2*npix, width, alternating=True) 49 | left = Matrix([-gap, maxv, 0], Z, -Y, 3*npix, width, alternating=True) 50 | top = Matrix([maxv, 0, maxv+gap], Y, -X, 4*npix, width, alternating=False) 51 | back = Matrix([maxv, maxv+gap, maxv], -Z, -X, 5*npix, width, alternating=False) 52 | """ 53 | orb = Orb(width,[front, right, bottom, left, top, back], 54 | ["front", "right", "bottom", "left", "top", "back"], pixels) 55 | return orb 56 | 57 | #Create orb object 58 | orb=orb4x4() 59 | 60 | #useful when mapping the layout of the pixels in each matrix 61 | def do_pixel(color=RED): 62 | for i in range(pixel_num): 63 | pixels[i] = color 64 | pixels.show() 65 | pixels[i] = BLACK 66 | time.sleep(0.1) 67 | 68 | def do_matrix(color=RED): 69 | for i in range(6): 70 | name = orb.matrix_name(i) 71 | orb.fill_matrix(i,color) 72 | time.sleep(.5) 73 | orb.fill_matrix(i, BLACK) 74 | 75 | def fill_half(coord=0, color=RED): 76 | for i in range(pixel_num): 77 | if orb.cart[i][coord] > 0.05: 78 | pixels[i] = color 79 | else: 80 | pixels[i] = BLACK 81 | 82 | 83 | imu = imu.IMU() 84 | tilt = Tilt(orb.pixels, orb.cart, imu) 85 | bubbles = Bubbles(orb.pixels, orb.spher, imu, color=RED) 86 | rainbow_sparkle = RainbowSparkle(pixels, speed = 0.075, step=10, period=20, num_sparkles = 30, background_brightness = 0) 87 | 88 | while True: 89 | #do_pixel() 90 | tilt.animate() 91 | #rainbow_sparkle.animate() 92 | #bubbles.animate() 93 | -------------------------------------------------------------------------------- /Orb4x4/Code/coordinates.py: -------------------------------------------------------------------------------- 1 | #Functions to transform 3D coordinates 2 | import math 3 | 4 | def sphericalToCartesian(rho, theta, phi) : 5 | x = rho*math.sin(phi)*math.cos(theta) 6 | y = rho*math.sin(phi)*math.sin(theta) 7 | z = rho*math.cos(phi) 8 | return [x, y, z] 9 | 10 | def cartesianToSpherical(x, y, z) : 11 | rho = math.sqrt(x*x + y*y + z*z) 12 | theta = math.atan2(y,x) 13 | phi = math.acos(z/rho) 14 | return [rho, theta, phi] 15 | 16 | # rotate points in Cartesian coordinates by an angle theta around the x axis 17 | def rotateCartesianPtsX(pts, theta): 18 | c = math.cos(theta) 19 | s = math.sin(theta) 20 | rotated = [] 21 | for p in pts: 22 | rotated.append([p[0], c*p[1] - s*p[2], s*p[1] + c*p[2]]) 23 | return rotated 24 | 25 | def rotateCartesianPtsY(pts, theta): 26 | c = math.cos(theta) 27 | s = math.sin(theta) 28 | rotated = [] 29 | for p in pts: 30 | rotated.append([c*p[0] +s*p[2], p[1], c*p[2] - s*p[0]]) 31 | return rotated 32 | 33 | 34 | #Centers values at origin in 3d and normalized values to [-1,1] 35 | def normalize(pts): 36 | pmin = pts[0].copy() 37 | pmax = pts[0].copy() 38 | np = len(pmin) 39 | 40 | for pt in pts: 41 | for i in range(np): 42 | if pt[i] < pmin[i]: 43 | pmin[i] = pt[i] 44 | if pt[i] > pmax[i]: 45 | pmax[i] = pt[i] 46 | 47 | for i in range(np): 48 | mid = (pmin[i] + pmax[i])/2 49 | spread = (pmax[i] - pmin[i])/2 50 | for p in pts: 51 | p[i] = (p[i] - mid)/spread 52 | return pts 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Orb4x4/Code/imu.py: -------------------------------------------------------------------------------- 1 | from adafruit_lsm6ds.lsm6ds3 import LSM6DS3 2 | import board, time, digitalio, busio 3 | 4 | # Copied from https://forum.seeedstudio.com/t/imu-i2c-error-with-circuitpython-using-xiao-ble-sense/265020 5 | class IMU(LSM6DS3): 6 | def __init__(self): 7 | dpwr = digitalio.DigitalInOut(board.IMU_PWR) 8 | dpwr.direction = digitalio.Direction.OUTPUT 9 | dpwr.value = 1 10 | time.sleep(1) 11 | i2c = busio.I2C(board.IMU_SCL, board.IMU_SDA) 12 | super().__init__(i2c) -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/__init__.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/advertising/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/advertising/__init__.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/advertising/adafruit.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/advertising/adafruit.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/advertising/standard.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/advertising/standard.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/attributes/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/attributes/__init__.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/characteristics/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/characteristics/__init__.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/characteristics/float.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/characteristics/float.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/characteristics/int.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/characteristics/int.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/characteristics/json.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/characteristics/json.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/characteristics/stream.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/characteristics/stream.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/characteristics/string.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/characteristics/string.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/services/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/services/__init__.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/services/circuitpython.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/services/circuitpython.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/services/microbit.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/services/microbit.py -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/services/midi.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/services/midi.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/services/nordic.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/services/nordic.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/services/sphero.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/services/sphero.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/services/standard/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/services/standard/__init__.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/services/standard/device_info.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/services/standard/device_info.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/services/standard/hid.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/services/standard/hid.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble/uuid/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble/uuid/__init__.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/__init__.py -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/accelerometer_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/accelerometer_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/adafruit_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/adafruit_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/addressable_pixel_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/addressable_pixel_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/barometric_pressure_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/barometric_pressure_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/button_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/button_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/color_sensor_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/color_sensor_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/gesture_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/gesture_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/gyroscope_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/gyroscope_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/humidity_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/humidity_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/light_sensor_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/light_sensor_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/magnetometer_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/magnetometer_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/microphone_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/microphone_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/proximity_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/proximity_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/quaternion_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/quaternion_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/temperature_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/temperature_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ble_adafruit/tone_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ble_adafruit/tone_service.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_bluefruit_connect/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_bluefruit_connect/__init__.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_bluefruit_connect/_xyz_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_bluefruit_connect/_xyz_packet.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_bluefruit_connect/accelerometer_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_bluefruit_connect/accelerometer_packet.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_bluefruit_connect/button_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_bluefruit_connect/button_packet.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_bluefruit_connect/color_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_bluefruit_connect/color_packet.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_bluefruit_connect/gyro_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_bluefruit_connect/gyro_packet.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_bluefruit_connect/location_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_bluefruit_connect/location_packet.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_bluefruit_connect/magnetometer_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_bluefruit_connect/magnetometer_packet.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_bluefruit_connect/packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_bluefruit_connect/packet.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_bluefruit_connect/quaternion_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_bluefruit_connect/quaternion_packet.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_bluefruit_connect/raw_text_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_bluefruit_connect/raw_text_packet.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_bus_device/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_bus_device/__init__.py -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_bus_device/i2c_device.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_bus_device/i2c_device.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_bus_device/spi_device.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_bus_device/spi_device.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_debouncer.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_debouncer.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_dotstar.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_dotstar.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_fancyled/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_fancyled/__init__.py -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_fancyled/adafruit_fancyled.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_fancyled/adafruit_fancyled.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_fancyled/fastled_helpers.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_fancyled/fastled_helpers.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/__init__.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/animation/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/animation/__init__.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/animation/blink.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/animation/blink.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/animation/chase.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/animation/chase.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/animation/colorcycle.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/animation/colorcycle.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/animation/comet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/animation/comet.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/animation/customcolorchase.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/animation/customcolorchase.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/animation/grid_rain.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/animation/grid_rain.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/animation/pulse.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/animation/pulse.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/animation/rainbow.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/animation/rainbow.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/animation/rainbowchase.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/animation/rainbowchase.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/animation/rainbowcomet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/animation/rainbowcomet.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/animation/rainbowsparkle.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/animation/rainbowsparkle.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/animation/solid.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/animation/solid.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/animation/sparkle.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/animation/sparkle.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/animation/sparklepulse.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/animation/sparklepulse.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/color.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/color.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/grid.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/grid.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/group.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/group.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/helper.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/helper.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_led_animation/sequence.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_led_animation/sequence.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_lsm6ds/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_lsm6ds/__init__.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_lsm6ds/ism330dhcx.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_lsm6ds/ism330dhcx.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_lsm6ds/lsm6ds3.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_lsm6ds/lsm6ds3.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_lsm6ds/lsm6ds33.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_lsm6ds/lsm6ds33.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_lsm6ds/lsm6ds3trc.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_lsm6ds/lsm6ds3trc.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_lsm6ds/lsm6dso32.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_lsm6ds/lsm6dso32.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_lsm6ds/lsm6dsox.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_lsm6ds/lsm6dsox.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_pixelbuf.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_pixelbuf.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_register/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_register/__init__.py -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_register/i2c_bcd_alarm.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_register/i2c_bcd_alarm.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_register/i2c_bcd_datetime.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_register/i2c_bcd_datetime.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_register/i2c_bit.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_register/i2c_bit.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_register/i2c_bits.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_register/i2c_bits.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_register/i2c_struct.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_register/i2c_struct.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_register/i2c_struct_array.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_register/i2c_struct_array.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/adafruit_ticks.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/adafruit_ticks.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/neopixel.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/neopixel.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/simpleio.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Code/lib/simpleio.mpy -------------------------------------------------------------------------------- /Orb4x4/Code/lib/tilt.py: -------------------------------------------------------------------------------- 1 | from adafruit_led_animation.animation import Animation 2 | from adafruit_led_animation.color import calculate_intensity 3 | from adafruit_led_animation.color import RAINBOW 4 | from adafruit_lsm6ds.lsm6ds3 import LSM6DS3 5 | import board, time, digitalio, busio 6 | from math import atan2, sqrt 7 | import random 8 | 9 | def clamp(n, mn, mx): 10 | return min(max(n,mn),mx) 11 | 12 | # Copied from https://forum.seeedstudio.com/t/imu-i2c-error-with-circuitpython-using-xiao-ble-sense/265020 13 | class IMU(LSM6DS3): 14 | def __init__(self): 15 | dpwr = digitalio.DigitalInOut(board.IMU_PWR) 16 | dpwr.direction = digitalio.Direction.OUTPUT 17 | dpwr.value = 1 18 | time.sleep(1) 19 | i2c = busio.I2C(board.IMU_SCL, board.IMU_SDA) 20 | super().__init__(i2c) 21 | 22 | 23 | class Tilt(Animation): 24 | """ 25 | Tilt Animation 26 | :param pixel_object: The initialised LED object. 27 | :param float speed: Animation speed in seconds, e.g. ``0.1``. 28 | :param color: Animation color in ``(r, g, b)`` tuple, or ``0x000000`` hex format. 29 | :param twinklechance: chance of turning on at any moment 30 | """ 31 | brightsteps = [x/10 for x in range(0,10)] + [x/10 for x in range(10,0,-1)] 32 | nsteps = len(brightsteps) 33 | 34 | def __init__( 35 | self, 36 | pixel_object, 37 | imu, 38 | speed=.05, 39 | name=None 40 | ): 41 | super().__init__(pixel_object, speed, color=(0,0,0), name=name) 42 | self.imu = imu 43 | self.reset() 44 | 45 | 46 | def reset(self): 47 | self.pixel_object.fill((0,0,0)) 48 | 49 | # Base color on pitch, position on roll 50 | def draw(self): 51 | x,y,z = self.imu.acceleration 52 | NRAINBOW = len(RAINBOW) 53 | roll = atan2(x,z)*57.3 54 | pitch = atan2(-y, sqrt(z*z + x*x))*57.3 55 | #print("Acceleration: X:%.2f, Y: %.2f, Z: %.2f m/s^2" % (self.imu.acceleration)) 56 | #print("Gyro X:%.2f, Y: %.2f, Z: %.2f radians/s" % (imu.gyro)) 57 | #print("Pitch:%.2f, Roll:%.2f" % (pitch, roll)) 58 | npix = self.pixel_object.n 59 | middle = int(round(npix/2)) 60 | degperpix = 100/middle 61 | tilt = clamp(abs(pitch)/90.0,0,1.0) 62 | index = int(tilt*NRAINBOW) 63 | color = RAINBOW[index] 64 | #spread = 1+int(tilt*middle) 65 | spread = 2 66 | 67 | #for i in range(npix): 68 | self.pixel_object.fill((0,0,0)) 69 | if roll < 0: 70 | roll += 360 71 | #Constrain to 72 | pix = clamp(middle + int((roll - 120)/degperpix),0,npix-1) 73 | self.pixel_object[pix] = RAINBOW[(index + NRAINBOW//2) % NRAINBOW] 74 | #self.pixel_object[pix] = color 75 | idrop = 0.8/spread 76 | for i in range(1,spread): 77 | #color = RAINBOW[int(i*len(RAINBOW)/spread)] 78 | softcolor = calculate_intensity(color, 1-i*idrop) 79 | lo = pix - i 80 | hi = pix + i 81 | if hi < npix - 1: 82 | self.pixel_object[hi] = softcolor 83 | if lo > 0: 84 | self.pixel_object[lo] = softcolor 85 | -------------------------------------------------------------------------------- /Orb4x4/Code/lib/twinkle.py: -------------------------------------------------------------------------------- 1 | from adafruit_led_animation.animation import Animation 2 | from adafruit_led_animation.color import calculate_intensity 3 | from adafruit_led_animation.color import RAINBOW 4 | import random 5 | 6 | 7 | class Twinkle(Animation): 8 | """ 9 | Twinkle Animation 10 | :param pixel_object: The initialised LED object. 11 | :param float speed: Animation speed in seconds, e.g. ``0.1``. 12 | :param color: Animation color in ``(r, g, b)`` tuple, or ``0x000000`` hex format. 13 | :param twinklechance: chance of turning on at any moment 14 | """ 15 | brightsteps = [x/10 for x in range(0,10)] + [x/10 for x in range(10,0,-1)] 16 | nsteps = len(brightsteps) 17 | 18 | 19 | def __init__( 20 | self, 21 | pixel_object, 22 | speed, 23 | color, 24 | twinklechance=None, 25 | name=None 26 | ): 27 | super().__init__(pixel_object, speed, color, name=name) 28 | if twinklechance==None: 29 | self.twinklechance = 0.01 30 | else: 31 | self.twinklechance = twinklechance 32 | self.reset() 33 | self.pix_state = [-1]*self.pixel_object.n 34 | 35 | 36 | 37 | def reset(self): 38 | self.pixel_object.fill((0,0,0)) 39 | 40 | def draw(self): 41 | for i in range(self.pixel_object.n): 42 | if self.pix_state[i] < 0: 43 | if random.random() < self.twinklechance: 44 | self.pix_state[i] = 0 45 | else: 46 | self.pix_state[i] = self.pix_state[i] + 1 47 | if self.pix_state[i] >= self.nsteps: 48 | self.pixel_object[i] = (0,0,0) 49 | self.pix_state[i] = -1 50 | else: 51 | self.pixel_object[i] = calculate_intensity(self.color, self.brightsteps[self.pix_state[i]]) 52 | 53 | 54 | class RainbowTwinkle(Twinkle): 55 | """ 56 | Twinkle Animation 57 | :param pixel_object: The initialised LED object. 58 | :param float speed: Animation speed in seconds, e.g. ``0.1``. 59 | :param color: Animation color in ``(r, g, b)`` tuple, or ``0x000000`` hex format. 60 | :param twinklechance: chance of turning on at any moment 61 | """ 62 | 63 | def __init__( 64 | self, 65 | pixel_object, 66 | speed, 67 | color=None, 68 | twinklechance=None, 69 | name=None 70 | ): 71 | super().__init__(pixel_object, speed, color, twinklechance, name=name) 72 | self.pix_color = [(0,0,0)]*self.pixel_object.n 73 | 74 | def draw(self): 75 | for i in range(self.pixel_object.n): 76 | if self.pix_state[i] < 0: 77 | if random.random() < self.twinklechance: 78 | self.pix_state[i] = 0 79 | self.pix_color[i] = random.choice(RAINBOW) 80 | else: 81 | self.pix_state[i] = self.pix_state[i] + 1 82 | if self.pix_state[i] >= self.nsteps: 83 | self.pixel_object[i] = (0,0,0) 84 | self.pix_state[i] = -1 85 | self.pix_color[i] = (0,0,0) 86 | else: 87 | self.pixel_object[i] = calculate_intensity(self.pix_color[i], self.brightsteps[self.pix_state[i]]) 88 | 89 | -------------------------------------------------------------------------------- /Orb4x4/Code/orb.py: -------------------------------------------------------------------------------- 1 | from coordinates import * 2 | from collections import OrderedDict 3 | import neopixel 4 | 5 | #Orb and matrix class 6 | class Matrix: 7 | X=1 # To define axes 8 | Y=2 9 | Z=3 10 | def __init__(self, startpt, rowaxis, colaxis, firstindex, width, alternating=True): 11 | self.startpt = startpt 12 | rowdir = rowaxis//abs(rowaxis) 13 | rowval = abs(rowaxis) 14 | self.rowinc = [0, 0, 0] 15 | self.rowinc[rowval-1] = rowdir 16 | coldir = colaxis//abs(colaxis) 17 | colval = abs(colaxis) 18 | self.colinc = [0, 0, 0] 19 | self.colinc[colval-1] = coldir 20 | self.alt = alternating 21 | self.width = width 22 | self.first = firstindex 23 | self.last = firstindex + width*width 24 | #print(self.rowinc, self.colinc) 25 | 26 | @classmethod 27 | def axis_index(cls, axis): 28 | mag = abs(axis) 29 | if mag >= cls.X and mag <= cls.Z: 30 | return mag - 1 31 | else: 32 | return None 33 | 34 | @classmethod 35 | def axis_dir(cls, axis): 36 | mag = abs(axis) 37 | if mag >= cls.X and mag <= cls.Z: 38 | return axis//abs(axis) 39 | else: 40 | return None 41 | 42 | 43 | class Orb: 44 | def __init__(self, width, matrix_list, matrix_names, pixels): 45 | self.width = width 46 | self.cart = [] 47 | self.spher = [] 48 | self.pixels = pixels 49 | self.matrix_dict = OrderedDict() 50 | # Using the fact that Python 3.7 and up means dictionaries are ordered 51 | for i in range(len(matrix_names)): 52 | self.matrix_dict[matrix_names[i]] = matrix_list[i] 53 | cube_coords = self.make_cube(matrix_list) 54 | # now that we have the normalized coordinates of the pixels 55 | # on the matrices which comprise the cube, get the 56 | # coordinates of the points on the surface of the orb 57 | radius = math.sqrt(3)*1.15 58 | new_cart = [] 59 | for c in cube_coords: 60 | s = cartesianToSpherical(*c) 61 | s[0] = radius 62 | self.spher.append(s[1:3]) # only save angular coords. R doesnt matter 63 | self.cart.append(sphericalToCartesian(*s)) 64 | #print(self.spher) 65 | normalize(self.cart) 66 | #print(self.cart) 67 | 68 | 69 | 70 | def opp(self,x): 71 | return self.width - x - 1 72 | 73 | #Returns coordinates for a width x width matrix with the specified 74 | #orientation in right-handed [X,Y,Z] space. Assumes pixels laid out 75 | #in rows, then rows stacked in columns. rowinc, colinc is how much 76 | #each cartesian coordinate changes in each step in the row and column 77 | #directions respectively. For a regular square grid, values will be -1, 0 or 1 78 | #e.g. for a matrix in the XZ plane, with the first pixel at [width, 0, 0], 79 | #and alternating rows directed along the x-axis, you would specify: 80 | # start = [width,0,0], rowinc = [-1,0,0], colinc=[0,0,1]. alt is true 81 | # if row directions alternate, false if all rows run in the same direction 82 | def matrix_coords(self, startpt, rowinc, colinc, alt=True): 83 | coords = [] 84 | nc = len(startpt) 85 | for col in range(self.width): 86 | firstpt = [startpt[k] + col*colinc[k] for k in range(nc)] 87 | #print(firstpt) 88 | for row in range(self.width): 89 | pt = [firstpt[k] + row*rowinc[k] for k in range(nc)] 90 | if alt and col % 2 == 1: 91 | for k in range(nc): 92 | if rowinc[k]: 93 | pt[k] = self.opp(pt[k]) 94 | coords.append(pt) 95 | return coords 96 | 97 | def make_cube(self, matrix_list): 98 | coords = [] 99 | for matrix in matrix_list: 100 | coords = coords + self.matrix_coords(matrix.startpt, matrix.rowinc, matrix.colinc, matrix.alt) 101 | #print("lenght of coords = ", len(coords)) 102 | return normalize(coords) 103 | 104 | def fill_matrix(self, mat, color, do_show=True): 105 | matrix = None 106 | if isinstance(mat, str): 107 | matrix = self.matrix_dict(mat) 108 | elif isinstance(mat, int): 109 | key = list(self.matrix_dict)[mat] 110 | matrix = self.matrix_dict[key] 111 | 112 | if matrix is not None: 113 | self.pixels[matrix.first:matrix.last] = [color]*(self.width*self.width) 114 | if do_show: 115 | self.show() 116 | 117 | def matrix_name(self, num): 118 | return list(self.matrix_dict)[num] 119 | 120 | def fill_above(self, axis, cutoff, color): 121 | axis_val = Matrix.axis_index(axis) 122 | for i in range(self.pixels.n): 123 | self.pixels[i] = color if self.cart[i][axis_val] > cutoff else (0,0,0) 124 | 125 | def show(self): 126 | self.pixels.show() -------------------------------------------------------------------------------- /Orb4x4/Code/tilt.py: -------------------------------------------------------------------------------- 1 | from adafruit_led_animation.animation import Animation 2 | from coordinates import * 3 | import board, time 4 | import math 5 | import random 6 | 7 | def clamp(n, mn, mx): 8 | return min(max(n,mn),mx) 9 | 10 | 11 | class Tilt(Animation): 12 | """ 13 | Tilt Animation 14 | :param pixel_object: The initialised LED object. 15 | :param float speed: Animation speed in seconds, e.g. ``0.1``. 16 | :param color: Animation color in ``(r, g, b)`` tuple, or ``0x000000`` hex format. 17 | :param twinklechance: chance of turning on at any moment 18 | """ 19 | 20 | def __init__( 21 | self, 22 | pixel_object, 23 | coord_list, 24 | imu, 25 | speed=.05, 26 | color=(255,0,0), 27 | name=None 28 | ): 29 | super().__init__(pixel_object, speed, color=color, name=name) 30 | self.imu = imu 31 | self.coords = coord_list 32 | self.reset() 33 | 34 | 35 | def reset(self): 36 | self.pixel_object.fill((0,0,0)) 37 | 38 | # Base color on pitch, position on roll 39 | def draw(self): 40 | x,y,z = self.imu.acceleration 41 | pitch = math.atan2(x,z) 42 | roll = math.atan2(y, math.sqrt(z*z + x*x)) 43 | #print("Acceleration: X:%.2f, Y: %.2f, Z: %.2f m/s^2" % (self.imu.acceleration)) 44 | #print("Gyro X:%.2f, Y: %.2f, Z: %.2f radians/s" % (imu.gyro)) 45 | #print("Pitch:%.2f, Roll:%.2f" % (pitch, roll)) 46 | #droll = math.degrees(roll) 47 | #dpitch = math.degrees(pitch) 48 | #print(" roll ",droll, " pitch ", dpitch) 49 | npix = self.pixel_object.n 50 | rvals = rotateCartesianPtsX(self.coords, -pitch) 51 | rvals = rotateCartesianPtsY(rvals, -roll) 52 | for i in range(npix): 53 | vert = min(rvals[i][2],1) #Rounding error sometimes pushis rotated 54 | #values over 1 55 | if (vert > 0.04): 56 | self.pixel_object[i] = (int(255*(vert)),0,int(255*(1-vert))) 57 | else: 58 | self.pixel_object[i] = (0,0,0) -------------------------------------------------------------------------------- /Orb4x4/Design/BatteryHolder14250.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Design/BatteryHolder14250.stl -------------------------------------------------------------------------------- /Orb4x4/Design/Corner Bracket Print_2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Design/Corner Bracket Print_2.stl -------------------------------------------------------------------------------- /Orb4x4/Design/Magnet Holder Body Print_2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Design/Magnet Holder Body Print_2.stl -------------------------------------------------------------------------------- /Orb4x4/Design/Magnet Holder Lid Print_2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Design/Magnet Holder Lid Print_2.stl -------------------------------------------------------------------------------- /Orb4x4/Design/Shell Print_6.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Design/Shell Print_6.stl -------------------------------------------------------------------------------- /Orb4x4/Design/Side Bracket Print_2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Design/Side Bracket Print_2.stl -------------------------------------------------------------------------------- /Orb4x4/Design/Side Bracket Xiao Holder Print_1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Design/Side Bracket Xiao Holder Print_1.stl -------------------------------------------------------------------------------- /Orb4x4/Design/Tiles Print_6.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Design/Tiles Print_6.stl -------------------------------------------------------------------------------- /Orb4x4/Pictures/BatteryHolderOrientation.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Pictures/BatteryHolderOrientation.JPG -------------------------------------------------------------------------------- /Orb4x4/Pictures/CubeBodyAndLid.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Pictures/CubeBodyAndLid.JPG -------------------------------------------------------------------------------- /Orb4x4/Pictures/CubeBodyAndLidLabelled.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Pictures/CubeBodyAndLidLabelled.JPG -------------------------------------------------------------------------------- /Orb4x4/Pictures/CubeBodyWithBatteryHolder.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Pictures/CubeBodyWithBatteryHolder.JPG -------------------------------------------------------------------------------- /Orb4x4/Pictures/CubeBodyWithoutBatteryHolder.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Pictures/CubeBodyWithoutBatteryHolder.JPG -------------------------------------------------------------------------------- /Orb4x4/Pictures/CubeLidWithConnectors.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Pictures/CubeLidWithConnectors.JPG -------------------------------------------------------------------------------- /Orb4x4/Pictures/CubebodyWithoutController.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Pictures/CubebodyWithoutController.JPG -------------------------------------------------------------------------------- /Orb4x4/Pictures/GluingTiles4x4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Pictures/GluingTiles4x4.jpg -------------------------------------------------------------------------------- /Orb4x4/Pictures/Illuminated4x4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Pictures/Illuminated4x4.jpg -------------------------------------------------------------------------------- /Orb4x4/Pictures/Interior4x4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Pictures/Interior4x4.jpg -------------------------------------------------------------------------------- /Orb4x4/Pictures/Wiring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4/Pictures/Wiring.png -------------------------------------------------------------------------------- /Orb4x4/README.md: -------------------------------------------------------------------------------- 1 | # Cube Orb 4x4 2 | 3 | 4 | Please note that this is NOT a detailed tutorial. I have included as much information as I can to help others build 5 | this project, but the design may still evolve, and there is likely room for improvement. It is a challenging build 6 | because the space inside the matrix cube does not leave much room for soldering or electronics. Careful wire 7 | management and good soldering skills will be required. 8 | 9 | For this build, you will need the following materials: 10 | - (6x) 4x4 WS2812 addressable LED matrices (available on Amazon or AliExpress). Size: approx 30mm square, mounting holes 15mm spacing. 11 | - 5mm M2 flathead screws and M2 nuts 12 | - 3D printer filament (PETG recommended for strength, I haven't tried PLA). Translucent clear filament for the tiles, and opaque filament for the shells. 13 | - Small controller (Adafruit QtPy or Seeeduino XIAO are good choices) 14 | - Small LiPo or LiIon battery to fit inside the matrix compartment. The largest battery I could fit inside was 250 mAh. There is also the possibility of 3D printing a battery holder for a cylindrical LiIon 14250 battery discussed further down. 15 | - Super glue to attach tiles to the shells (Gorilla Glue Super Glue Gel highly recommended) 16 | - Wires/solder to connect the matrices/controller/battery 17 | - (4x) 1/4" by 1/8" disk magnets. Read paragraph below on the magnetic connectors for specifics 18 | - 2mm wide double-sided tape (e.g. [https://www.amazon.com/gp/product/B019OQ4Z10/](https://www.amazon.com/gp/product/B019OQ4Z10/)) 19 | 20 | Start by printing each of the STL files in the [Design directory](./Design/) in the quantities included in the filename. You can buy standard 4x4 WS2812 LED matrices on Amazon or AliExpress. This design is intended for matrices that are approximately 30mm square with 4 mounting holes spaced about 15mm apart. See the [Pictures directory](/Pictures) for images showing how the 3D printed connectors attach the matrices together. 21 | 22 | Everything should be secured together with **5mm M2 flathead (important)** screws and nuts. 23 | 24 | 25 | 26 | The supports are designed to hold an Adafruit QtPy or Seeeduino XIA0 controller inside. I am working on CircuitPython code for motion reactive LED animations using the [Seeeduino XIA0 nRF52840 Sense board](https://www.seeedstudio.com/Seeed-XIAO-BLE-Sense-nRF52840-p-5253.html), and will be uploading code to GitHub soon. 27 | 28 | The magnetic connectors will latch the body of the cube to the lid, using cylindrical magnets with 1/4" diameter and 1/8" height. I designed the magnet holders to work with these countersunk magnet pairs from K&J magnetics (https://www.kjmagnetics.com/proddetail.asp?prod=R422CS-P-N52&cat=15f), with two pair of magnets per cube. The K&J magnets can be held in place with 5mm or 6mm (better) M2 screws and nuts. However, you can also probably buy standard 1/4" diameter, 1/8" height disk magnets and simply glue them into the holders with superglue. I haven't tried it, but I see no reason it shouldn't work. 29 | 30 | Everything except the tiles STL should print well at 0.2mm layer height. The tiles have a bit of overhang near the top where it mushrooms out. I printed those at variable layer height with the shortest layers possible at the overhang, which helped a lot. Since there are 16 individual, small tiles in the tiles STL file, printing it can be tricky. Make SURE your first layer goes down ok. If any one of the tiles lifts off, it will ruin the whole print. 31 | 32 | I used PETG for all the printing, because the parts are thin and small. Haven't tried it with PLA. PLA should be ok for the tiles, as they don't support anything but the rest of the pieces are small and/or thin, and will probably benefit from using PETG. Use opaque filament for the shell and transparent filament for the tiles. The brackets/holders can be printed in any color/opacity, as they will not be visible. 33 | 34 | 35 | 36 | Once printed, glue each of the tiles into the appropriate locations in the shell. Gorilla Glue Super Glue Gel strongly is recommended for this purpose. Put small beads or lines of glue in each of the holes in the top of the shell then insert each tile in the appropriate hole. Don't put the glue directly on the tile, because that's much messier (I speak from experience here!). As the tiles look nearly identical, I strongly recommend leaving them on the print plate until just before gluing each one (I loosened them row by row). Make sure to keep the orientation of each tile straight when you glue them, because it matters and it's easy to get them turned around when you lift them off the plate. 37 | 38 | Before attaching the shell pieces to the matrix, connect the matrices into the body of the cube and the lid with the connetors as shown in the images in the [Pictures directory](./Pictures/). There are gaps between the matrices by design, as this leaves more room to put a battery inside the cube. You will probably want to solder wires between the matrices as you connect each one to its assembly because there is not a lot of room to work inside the body of the fully assembled cube. 39 | 40 | 41 | 42 | Once you have fully assembled the body and lid of the cube, you can attach the shell pieces to each matrix (after the glue for the tiles has fully dried). I placed rows and columns of 2mm wide double-sided tape along the bottom of each shell piece, then pressed each one onto a matrix. This works very well, and allows the shells to be removed if necessary. If you are certain that you won't want to remove the shells, then glue should work for this purpose as well. 43 | 44 | A 250 mAh LiPo battery and QTPy-sized controller should fit into the interior of the cube to power everything. Be very careful to cover the exposed pads on the LED matrices (duct tape works for this) so no shorts will occur if a nut or screw becomes loose inside the cube. 45 | 46 | 47 | 48 | I have also included the (optional) design for a 14250 cylindrical LiIon battery holder which will fit inside the cube as shown in the picture below. This holder is designed to use an AAA battery spring contact no more than 10mm wide (e.g.: https://www.amazon.com/uxcell-Positive-Negative-Conversion-Nickeling/dp/B07HRS5DMC/ref=sr_1_3) for the negative battery terminal and wire wrapped around the hole in the positive terminal to run power to the electronics. More assembly instructions for the battery will follow eventually. 49 | 50 | 51 | Good luck! Have fun! 52 | -------------------------------------------------------------------------------- /Orb4x4_V2/Design/AllConnectors4x4V2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4_V2/Design/AllConnectors4x4V2.stl -------------------------------------------------------------------------------- /Orb4x4_V2/Design/BatHolder.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4_V2/Design/BatHolder.stl -------------------------------------------------------------------------------- /Orb4x4_V2/Design/Shell4x4V2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4_V2/Design/Shell4x4V2.stl -------------------------------------------------------------------------------- /Orb4x4_V2/Design/Tiles4x4V2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb4x4_V2/Design/Tiles4x4V2.stl -------------------------------------------------------------------------------- /Orb4x4_V2/README.md: -------------------------------------------------------------------------------- 1 | This version of the 4x4 orb is smaller than V1. It requires a 3D printed battery holder for 14250 cylindrical LiIon battery. Assembly instructions are not yet posted for this version. 2 | -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/bubbles.py: -------------------------------------------------------------------------------- 1 | from adafruit_led_animation.animation import Animation 2 | from coordinates import * 3 | import board, time 4 | import math 5 | import random 6 | 7 | #NOTE: Work in progress. Currently doesn't make use of the IMU, but will eventually 8 | # move the bubbles around so they float to the top of the orb 9 | 10 | #returns angular distance between two angular positions 11 | def angular_separation(theta1, phi1, theta2, phi2): 12 | return math.acos(math.cos(phi1)*math.cos(phi2) + 13 | math.sin(phi1)*math.sin(phi2)*math.cos(theta1 - theta2)) 14 | 15 | class Bubble: 16 | def __init__(self, radius, color, pos): 17 | # radius is angular in radians 18 | self.radius = radius 19 | self.color = color 20 | #position on the surface of a sphere, theta, phi 21 | self.pos = pos 22 | self.velocity = [random.random()/20, random.random()/20] 23 | 24 | class Bubbles(Animation): 25 | """ 26 | Tilt Animation 27 | :param pixel_object: The initialised LED object. 28 | :param float speed: Animation speed in seconds, e.g. ``0.1``. 29 | :param color: Animation color in ``(r, g, b)`` tuple, or ``0x000000`` hex format. 30 | :param twinklechance: chance of turning on at any moment 31 | """ 32 | def __init__( 33 | self, 34 | pixel_object, 35 | coord_list, #Angular coordinates (r, theta, phi) 36 | imu, 37 | speed=.03, 38 | color=(255,0,0), 39 | name=None 40 | ): 41 | super().__init__(pixel_object, speed, color=color, name=name) 42 | self.imu = imu 43 | self.coords = coord_list 44 | self.bubbles = [Bubble(math.pi/4, (255,0,0), [math.pi/5,math.pi/8]), 45 | Bubble(math.pi/4, (0,255,0), [math.pi/3, math.pi/9]), 46 | Bubble(math.pi/5, (0,0,255), [-math.pi/3, 0])] 47 | 48 | 49 | def reset(self): 50 | self.pixel_object.fill((0,0,0)) 51 | 52 | # Base color on pitch, position on roll 53 | def draw(self): 54 | x,y,z = self.imu.acceleration 55 | pitch = math.atan2(x,z) 56 | roll = math.atan2(y, math.sqrt(z*z + x*x)) 57 | #print("Acceleration: X:%.2f, Y: %.2f, Z: %.2f m/s^2" % (self.imu.acceleration)) 58 | #print("Gyro X:%.2f, Y: %.2f, Z: %.2f radians/s" % (imu.gyro)) 59 | #print("Pitch:%.2f, Roll:%.2f" % (pitch, roll)) 60 | #droll = math.degrees(roll) 61 | #dpitch = math.degrees(pitch) 62 | #print(" roll ",droll, " pitch ", dpitch) 63 | npix = self.pixel_object.n 64 | self.pixel_object.fill((0,0,0)) 65 | for i in range(npix): 66 | for b in self.bubbles: 67 | sep = angular_separation(b.pos[0], b.pos[1], self.coords[i][0], self.coords[i][1]) 68 | if sep < b.radius: 69 | v = math.pow((1-sep/b.radius),2) 70 | self.pixel_object[i] = [int(self.pixel_object[i][k] + b.color[k]*v) for k in range(3)] 71 | 72 | for b in self.bubbles: 73 | b.pos[1] += b.velocity[1] 74 | if b.pos[1] >= math.pi: 75 | b.pos[1] = math.pi - b.pos[1] 76 | b.velocity[1] = -b.velocity[1] 77 | b.pos[0] += b.velocity[0] 78 | if b.pos[0] >= math.pi: 79 | b.pos[0] -= 2*math.pi 80 | -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/code.py: -------------------------------------------------------------------------------- 1 | # Write your code here :-) 2 | from tilt import Tilt 3 | from adafruit_led_animation.animation.rainbowsparkle import RainbowSparkle 4 | from adafruit_led_animation.color import RAINBOW 5 | from bubbles import Bubbles 6 | from orb import * 7 | import imu 8 | import board 9 | import neopixel 10 | import time, random 11 | 12 | RED = (255,0,0) 13 | BLACK = (0,0,0) 14 | 15 | # Update to match the pin connected to your NeoPixels 16 | pixel_pin = board.D4 17 | # Update to match the number of NeoPixels you have connected 18 | pixel_num = 150 19 | 20 | pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=0.3, auto_write=False) 21 | pixels.fill((0,0,0)) 22 | 23 | def orb5x5(): 24 | width = 5 25 | gap = 0.25 26 | X = Matrix.X 27 | Y = Matrix.Y 28 | Z = Matrix.Z 29 | npix = width*width 30 | maxv = width-1 #largest coordinate value 31 | #definition of matrix defaults to alternating rows 32 | #The reference coordinate frame for the orb is the one in which the 33 | #XIAO X-axis is along the short board axis, the positive Y axis is along 34 | #the long axis with positive direction pointed towards the USB connector 35 | #and positive Z axis is above the top of the board 36 | front = Matrix([0, -gap, 0], X, Z, 0, width) 37 | right = Matrix([maxv + gap, 0, maxv], -Z, Y, 1*npix, width) 38 | bottom = Matrix([maxv, 0, -gap], -X, Y, 2*npix, width) 39 | left = Matrix([-gap, 0, 0], Z, Y, 3*npix, width) 40 | top = Matrix([maxv, 0, maxv+gap], Y, -X, 4*npix, width) 41 | back = Matrix([maxv, maxv+gap, maxv], -Z, -X, 5*npix, width) 42 | 43 | # Alternate configuration for some 5x5 matricies that have a different 44 | # orientation: 45 | # front = Matrix([0, -gap, maxv], X, -Z, 0, width) 46 | # right = Matrix([maxv + gap, maxv, maxv], -Z, -Y, 1*npix, width) 47 | # bottom = Matrix([maxv, maxv, -gap], -X, -Y, 2*npix, width) 48 | # left = Matrix([-gap, maxv, 0], Z, -Y, 3*npix, width) 49 | # top = Matrix([0, 0, maxv+gap], Y, X, 4*npix, width) 50 | # back = Matrix([0, maxv+gap, maxv], -Z, X, 5*npix, width) 51 | 52 | orb = Orb(5,[front, right, bottom, left, top, back], 53 | ["front", "right", "bottom", "left", "top", "back"], pixels) 54 | return orb 55 | 56 | #Create orb object 57 | orb=orb5x5() 58 | 59 | def do_pixel(color=RED): 60 | for i in range(pixel_num): 61 | pixels[i] = color 62 | pixels.show() 63 | pixels[i] = BLACK 64 | time.sleep(0.1) 65 | 66 | def do_matrix(color=RED): 67 | for i in range(6): 68 | name = orb.matrix_name(i) 69 | orb.fill_matrix(i,color) 70 | time.sleep(.5) 71 | orb.fill_matrix(i, BLACK) 72 | 73 | 74 | imu = imu.IMU() 75 | tilt = Tilt(orb.pixels, orb.cart, imu) 76 | bubbles = Bubbles(orb.pixels, orb.spher, imu, color=RED) 77 | rainbow_sparkle = RainbowSparkle(pixels, speed = 0.075, step=10, period=20, num_sparkles = 30, background_brightness = 0) 78 | 79 | while True: 80 | tilt.animate() 81 | #rainbow_sparkle.animate() 82 | #bubbles.animate() 83 | -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/coordinates.py: -------------------------------------------------------------------------------- 1 | #Functions to transform 3D coordinates 2 | import math 3 | 4 | def sphericalToCartesian(rho, theta, phi) : 5 | x = rho*math.sin(phi)*math.cos(theta) 6 | y = rho*math.sin(phi)*math.sin(theta) 7 | z = rho*math.cos(phi) 8 | return [x, y, z] 9 | 10 | def cartesianToSpherical(x, y, z) : 11 | rho = math.sqrt(x*x + y*y + z*z) 12 | theta = math.atan2(y,x) 13 | phi = math.acos(z/rho) 14 | return [rho, theta, phi] 15 | 16 | # rotate points in Cartesian coordinates by an angle theta around the x axis 17 | def rotateCartesianPtsX(pts, theta): 18 | c = math.cos(theta) 19 | s = math.sin(theta) 20 | rotated = [] 21 | for p in pts: 22 | rotated.append([p[0], c*p[1] - s*p[2], s*p[1] + c*p[2]]) 23 | return rotated 24 | 25 | def rotateCartesianPtsY(pts, theta): 26 | c = math.cos(theta) 27 | s = math.sin(theta) 28 | rotated = [] 29 | for p in pts: 30 | rotated.append([c*p[0] +s*p[2], p[1], c*p[2] - s*p[0]]) 31 | return rotated 32 | 33 | 34 | #Centers values at origin in 3d and normalized values to [-1,1] 35 | def normalize(pts): 36 | pmin = pts[0].copy() 37 | pmax = pts[0].copy() 38 | np = len(pmin) 39 | 40 | for pt in pts: 41 | for i in range(np): 42 | if pt[i] < pmin[i]: 43 | pmin[i] = pt[i] 44 | if pt[i] > pmax[i]: 45 | pmax[i] = pt[i] 46 | 47 | for i in range(np): 48 | mid = (pmin[i] + pmax[i])/2 49 | spread = (pmax[i] - pmin[i])/2 50 | for p in pts: 51 | p[i] = (p[i] - mid)/spread 52 | return pts 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/imu.py: -------------------------------------------------------------------------------- 1 | from adafruit_lsm6ds.lsm6ds3 import LSM6DS3 2 | import board, time, digitalio, busio 3 | 4 | # Copied from https://forum.seeedstudio.com/t/imu-i2c-error-with-circuitpython-using-xiao-ble-sense/265020 5 | class IMU(LSM6DS3): 6 | def __init__(self): 7 | dpwr = digitalio.DigitalInOut(board.IMU_PWR) 8 | dpwr.direction = digitalio.Direction.OUTPUT 9 | dpwr.value = 1 10 | time.sleep(1) 11 | i2c = busio.I2C(board.IMU_SCL, board.IMU_SDA) 12 | super().__init__(i2c) -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/__init__.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/advertising/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/advertising/__init__.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/advertising/adafruit.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/advertising/adafruit.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/advertising/standard.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/advertising/standard.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/attributes/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/attributes/__init__.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/characteristics/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/characteristics/__init__.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/characteristics/float.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/characteristics/float.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/characteristics/int.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/characteristics/int.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/characteristics/json.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/characteristics/json.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/characteristics/stream.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/characteristics/stream.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/characteristics/string.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/characteristics/string.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/__init__.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/circuitpython.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/circuitpython.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/microbit.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/microbit.py -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/midi.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/midi.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/nordic.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/nordic.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/sphero.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/sphero.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/standard/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/standard/__init__.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/standard/device_info.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/standard/device_info.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/standard/hid.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/services/standard/hid.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble/uuid/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble/uuid/__init__.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/__init__.py -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/accelerometer_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/accelerometer_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/adafruit_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/adafruit_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/addressable_pixel_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/addressable_pixel_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/barometric_pressure_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/barometric_pressure_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/button_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/button_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/color_sensor_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/color_sensor_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/gesture_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/gesture_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/gyroscope_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/gyroscope_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/humidity_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/humidity_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/light_sensor_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/light_sensor_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/magnetometer_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/magnetometer_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/microphone_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/microphone_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/proximity_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/proximity_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/quaternion_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/quaternion_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/temperature_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/temperature_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/tone_service.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ble_adafruit/tone_service.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/__init__.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/_xyz_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/_xyz_packet.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/accelerometer_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/accelerometer_packet.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/button_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/button_packet.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/color_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/color_packet.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/gyro_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/gyro_packet.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/location_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/location_packet.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/magnetometer_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/magnetometer_packet.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/packet.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/quaternion_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/quaternion_packet.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/raw_text_packet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_bluefruit_connect/raw_text_packet.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_bus_device/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_bus_device/__init__.py -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_bus_device/i2c_device.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_bus_device/i2c_device.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_bus_device/spi_device.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_bus_device/spi_device.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_debouncer.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_debouncer.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_fancyled/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_fancyled/__init__.py -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_fancyled/adafruit_fancyled.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_fancyled/adafruit_fancyled.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_fancyled/fastled_helpers.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_fancyled/fastled_helpers.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/__init__.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/__init__.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/blink.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/blink.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/chase.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/chase.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/colorcycle.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/colorcycle.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/comet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/comet.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/customcolorchase.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/customcolorchase.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/grid_rain.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/grid_rain.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/pulse.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/pulse.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/rainbow.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/rainbow.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/rainbowchase.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/rainbowchase.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/rainbowcomet.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/rainbowcomet.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/rainbowsparkle.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/rainbowsparkle.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/solid.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/solid.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/sparkle.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/sparkle.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/sparklepulse.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/animation/sparklepulse.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/color.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/color.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/grid.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/grid.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/group.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/group.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/helper.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/helper.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/sequence.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_led_animation/sequence.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_lsm6ds/__init__.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_lsm6ds/__init__.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_lsm6ds/ism330dhcx.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_lsm6ds/ism330dhcx.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_lsm6ds/lsm6ds3.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_lsm6ds/lsm6ds3.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_lsm6ds/lsm6ds33.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_lsm6ds/lsm6ds33.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_lsm6ds/lsm6ds3trc.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_lsm6ds/lsm6ds3trc.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_lsm6ds/lsm6dso32.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_lsm6ds/lsm6dso32.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_lsm6ds/lsm6dsox.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_lsm6ds/lsm6dsox.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_pixelbuf.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_pixelbuf.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_register/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_register/__init__.py -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_register/i2c_bcd_alarm.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_register/i2c_bcd_alarm.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_register/i2c_bcd_datetime.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_register/i2c_bcd_datetime.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_register/i2c_bit.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_register/i2c_bit.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_register/i2c_bits.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_register/i2c_bits.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_register/i2c_struct.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_register/i2c_struct.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_register/i2c_struct_array.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_register/i2c_struct_array.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/adafruit_ticks.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/adafruit_ticks.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/neopixel.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/neopixel.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/lib/simpleio.mpy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Code/CircuitPython/lib/simpleio.mpy -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/orb.py: -------------------------------------------------------------------------------- 1 | from coordinates import * 2 | from collections import OrderedDict 3 | import neopixel 4 | 5 | #Orb and matrix class 6 | class Matrix: 7 | X=1 # To define axes 8 | Y=2 9 | Z=3 10 | def __init__(self, startpt, rowaxis, colaxis, firstindex, width, alternating=True): 11 | self.startpt = startpt 12 | rowdir = rowaxis//abs(rowaxis) 13 | rowval = abs(rowaxis) 14 | self.rowinc = [0, 0, 0] 15 | self.rowinc[rowval-1] = rowdir 16 | coldir = colaxis//abs(colaxis) 17 | colval = abs(colaxis) 18 | self.colinc = [0, 0, 0] 19 | self.colinc[colval-1] = coldir 20 | self.alt = alternating 21 | self.width = width 22 | self.first = firstindex 23 | self.last = firstindex + width*width 24 | #print(self.rowinc, self.colinc) 25 | 26 | @classmethod 27 | def axis_index(cls, axis): 28 | mag = abs(axis) 29 | if mag >= cls.X and mag <= cls.Z: 30 | return mag - 1 31 | else: 32 | return None 33 | 34 | @classmethod 35 | def axis_dir(cls, axis): 36 | mag = abs(axis) 37 | if mag >= cls.X and mag <= cls.Z: 38 | return axis//abs(axis) 39 | else: 40 | return None 41 | 42 | 43 | class Orb: 44 | def __init__(self, width, matrix_list, matrix_names, pixels): 45 | self.width = width 46 | self.cart = [] 47 | self.spher = [] 48 | self.pixels = pixels 49 | self.matrix_dict = OrderedDict() 50 | # Using the fact that Python 3.7 and up means dictionaries are ordered 51 | for i in range(len(matrix_names)): 52 | self.matrix_dict[matrix_names[i]] = matrix_list[i] 53 | cube_coords = self.make_cube(matrix_list) 54 | # now that we have the normalized coordinates of the pixels 55 | # on the matrices which comprise the cube, get the 56 | # coordinates of the points on the surface of the orb 57 | radius = math.sqrt(3)*1.15 58 | new_cart = [] 59 | for c in cube_coords: 60 | s = cartesianToSpherical(*c) 61 | s[0] = radius 62 | self.spher.append(s[1:3]) # only save angular coords. R doesnt matter 63 | self.cart.append(sphericalToCartesian(*s)) 64 | #print(self.spher) 65 | normalize(self.cart) 66 | #print(self.cart) 67 | 68 | 69 | 70 | def opp(self,x): 71 | return self.width - x - 1 72 | 73 | #Returns coordinates for a width x width matrix with the specified 74 | #orientation in right-handed [X,Y,Z] space. Assumes pixels laid out 75 | #in rows, then rows stacked in columns. rowinc, colinc is how much 76 | #each cartesian coordinate changes in each step in the row and column 77 | #directions respectively. For a regular square grid, values will be -1, 0 or 1 78 | #e.g. for a matrix in the XZ plane, with the first pixel at [width, 0, 0], 79 | #and alternating rows directed along the x-axis, you would specify: 80 | # start = [width,0,0], rowinc = [-1,0,0], colinc=[0,0,1]. alt is true 81 | # if row directions alternate, false if all rows run in the same direction 82 | def matrix_coords(self, startpt, rowinc, colinc, alt=True): 83 | coords = [] 84 | nc = len(startpt) 85 | for col in range(self.width): 86 | firstpt = [startpt[k] + col*colinc[k] for k in range(nc)] 87 | #print(firstpt) 88 | for row in range(self.width): 89 | pt = [firstpt[k] + row*rowinc[k] for k in range(nc)] 90 | if alt and col % 2 == 1: 91 | for k in range(nc): 92 | if rowinc[k]: 93 | pt[k] = self.opp(pt[k]) 94 | coords.append(pt) 95 | return coords 96 | 97 | def make_cube(self, matrix_list): 98 | coords = [] 99 | for matrix in matrix_list: 100 | coords = coords + self.matrix_coords(matrix.startpt, matrix.rowinc, matrix.colinc, matrix.alt) 101 | #print("lenght of coords = ", len(coords)) 102 | return normalize(coords) 103 | 104 | def fill_matrix(self, mat, color, do_show=True): 105 | matrix = None 106 | if isinstance(mat, str): 107 | matrix = self.matrix_dict(mat) 108 | elif isinstance(mat, int): 109 | key = list(self.matrix_dict)[mat] 110 | matrix = self.matrix_dict[key] 111 | 112 | if matrix is not None: 113 | self.pixels[matrix.first:matrix.last] = [color]*(self.width*self.width) 114 | if do_show: 115 | self.show() 116 | 117 | def matrix_name(self, num): 118 | return list(self.matrix_dict)[num] 119 | 120 | def fill_above(self, axis, cutoff, color): 121 | axis_val = Matrix.axis_index(axis) 122 | for i in range(self.pixels.n): 123 | self.pixels[i] = color if self.cart[i][axis_val] > cutoff else (0,0,0) 124 | 125 | def show(self): 126 | self.pixels.show() -------------------------------------------------------------------------------- /Orb5x5/Code/CircuitPython/tilt.py: -------------------------------------------------------------------------------- 1 | from adafruit_led_animation.animation import Animation 2 | from coordinates import * 3 | import board, time 4 | import math 5 | import random 6 | 7 | def clamp(n, mn, mx): 8 | return min(max(n,mn),mx) 9 | 10 | 11 | class Tilt(Animation): 12 | """ 13 | Tilt Animation 14 | :param pixel_object: The initialised LED object. 15 | :param float speed: Animation speed in seconds, e.g. ``0.1``. 16 | :param color: Animation color in ``(r, g, b)`` tuple, or ``0x000000`` hex format. 17 | :param twinklechance: chance of turning on at any moment 18 | """ 19 | 20 | def __init__( 21 | self, 22 | pixel_object, 23 | coord_list, 24 | imu, 25 | speed=.05, 26 | color=(255,0,0), 27 | name=None 28 | ): 29 | super().__init__(pixel_object, speed, color=color, name=name) 30 | self.imu = imu 31 | self.coords = coord_list 32 | self.reset() 33 | 34 | 35 | def reset(self): 36 | self.pixel_object.fill((0,0,0)) 37 | 38 | # Base color on pitch, position on roll 39 | def draw(self): 40 | x,y,z = self.imu.acceleration 41 | pitch = math.atan2(x,z) 42 | roll = math.atan2(y, math.sqrt(z*z + x*x)) 43 | #print("Acceleration: X:%.2f, Y: %.2f, Z: %.2f m/s^2" % (self.imu.acceleration)) 44 | #print("Gyro X:%.2f, Y: %.2f, Z: %.2f radians/s" % (imu.gyro)) 45 | #print("Pitch:%.2f, Roll:%.2f" % (pitch, roll)) 46 | #droll = math.degrees(roll) 47 | #dpitch = math.degrees(pitch) 48 | #print(" roll ",droll, " pitch ", dpitch) 49 | npix = self.pixel_object.n 50 | rvals = rotateCartesianPtsX(self.coords, -pitch) 51 | rvals = rotateCartesianPtsY(rvals, -roll) 52 | for i in range(npix): 53 | vert = rvals[i][2] 54 | if (vert > 0.04): 55 | self.pixel_object[i] = (int(255*(vert)),0,int(255*(1-vert))) 56 | else: 57 | self.pixel_object[i] = (0,0,0) -------------------------------------------------------------------------------- /Orb5x5/Design/AllConnectors5x5.3mf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Design/AllConnectors5x5.3mf -------------------------------------------------------------------------------- /Orb5x5/Design/BatteryHolder16340.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Design/BatteryHolder16340.stl -------------------------------------------------------------------------------- /Orb5x5/Design/BatteryHolder16340Bambulag.3mf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Design/BatteryHolder16340Bambulag.3mf -------------------------------------------------------------------------------- /Orb5x5/Design/BatteryHolder16340WithSwitch.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Design/BatteryHolder16340WithSwitch.stl -------------------------------------------------------------------------------- /Orb5x5/Design/PointTiles5x5.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Design/PointTiles5x5.stl -------------------------------------------------------------------------------- /Orb5x5/Design/PointTiles5x5BambulabSlicer.3mf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Design/PointTiles5x5BambulabSlicer.3mf -------------------------------------------------------------------------------- /Orb5x5/Design/Shell5x5.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Design/Shell5x5.stl -------------------------------------------------------------------------------- /Orb5x5/Design/Shell5x5BambulabSlicer.3mf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Design/Shell5x5BambulabSlicer.3mf -------------------------------------------------------------------------------- /Orb5x5/Design/ShellForPointyTiles.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Design/ShellForPointyTiles.stl -------------------------------------------------------------------------------- /Orb5x5/Design/Tiles5x5.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Design/Tiles5x5.stl -------------------------------------------------------------------------------- /Orb5x5/Design/Tiles5x5All.3mf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Design/Tiles5x5All.3mf -------------------------------------------------------------------------------- /Orb5x5/Design/Tiles5x5Thinner.3mf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Design/Tiles5x5Thinner.3mf -------------------------------------------------------------------------------- /Orb5x5/Pictures/Orb5x5.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Pictures/Orb5x5.JPG -------------------------------------------------------------------------------- /Orb5x5/Pictures/OrbTiltPattern5x5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Pictures/OrbTiltPattern5x5.jpg -------------------------------------------------------------------------------- /Orb5x5/Pictures/OrbWithCube5x5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb5x5/Pictures/OrbWithCube5x5.jpg -------------------------------------------------------------------------------- /Orb5x5/README.md: -------------------------------------------------------------------------------- 1 | These are design files for Cube Orb using 5x5 LED matrices. This build is documented in great detail in Vol. 84 of Make: magazine 2 | -------------------------------------------------------------------------------- /Orb8x8/SK9822/Design/CubeOrbSK9822Connectors.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/SK9822/Design/CubeOrbSK9822Connectors.stl -------------------------------------------------------------------------------- /Orb8x8/SK9822/Design/CubeSphereSK9822Connectors.3mf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/SK9822/Design/CubeSphereSK9822Connectors.3mf -------------------------------------------------------------------------------- /Orb8x8/SK9822/Pictures/ConnectorsOnly.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/SK9822/Pictures/ConnectorsOnly.JPG -------------------------------------------------------------------------------- /Orb8x8/SK9822/Pictures/MatrixBodyWithConnectors.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/SK9822/Pictures/MatrixBodyWithConnectors.JPG -------------------------------------------------------------------------------- /Orb8x8/SK9822/Pictures/MatrixBodyWithConnectorsAndLatch.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/SK9822/Pictures/MatrixBodyWithConnectorsAndLatch.JPG -------------------------------------------------------------------------------- /Orb8x8/SK9822/Pictures/MatrixLidWithConnectors.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/SK9822/Pictures/MatrixLidWithConnectors.JPG -------------------------------------------------------------------------------- /Orb8x8/SK9822/Pixelblaze/mapper.txt: -------------------------------------------------------------------------------- 1 | // Maps the pixel locations of the cube sphere (an LED cube inscribed inside a translucent 2 | // sphere which pipes the LED light out to the sphere's surface). Cube side length (in pixels) 3 | // is "width." 4 | // Most of this algorithm is lifted directly from the Pixelblaze mapper code for a walled 5 | // cube by Ben Henke (see https://electromage.com/intro_to_mapping). The coordinates are 6 | // mapped to the surface of the sphere by generating Cartesian coordinates for the cube, 7 | // converting pixel coordinates to spherical values, and then setting rho for each pixel 8 | // to the radius of the circumscribed sphere while retaining theta and phi, then converting 9 | // back to Cartesian coordinates. 10 | function (pixelCount) { 11 | width = 8 12 | 13 | function sphericalToCartesian(rho, theta, phi) { 14 | x = rho*Math.sin(phi)*Math.cos(theta) 15 | y = rho*Math.sin(phi)*Math.sin(theta) 16 | z = rho*Math.cos(phi) 17 | return [x, y, z] 18 | } 19 | 20 | function cartesianToSpherical(x, y, z) { 21 | rho = Math.sqrt(x*x + y*y + z*z) 22 | theta = Math.atan2(y,x) 23 | phi = Math.acos(z/rho) 24 | return [rho, theta, phi] 25 | } 26 | 27 | //generate a 2d matrix in 3d space 28 | //targets is an array of source coordinates 0 = fixed, 1 = row, 2 = column 29 | //e.g. [1,2,0] will generate rows = x, cols = y, and z is fixed (at zero) 30 | //sign indicates direction so -2 is columns in reverse order 31 | //offsets lets you translate the coordinates by some offset 32 | function side(targets, offsets) { 33 | var matrix = [], coords, row, col 34 | for (i = 0; i < width * width; i++) { 35 | row = Math.floor(i / width) 36 | col = i % width 37 | //col = row % 2 == 1 ? width - 1 - col : col //zigzag 38 | coords = [0, row, col] 39 | matrix.push(targets.map(function (target, index) { 40 | var coord = coords[Math.abs(target)] 41 | if (target < 0) 42 | coord = width - 1 - coord 43 | return coord + offsets[index] 44 | })) 45 | } 46 | return matrix 47 | } 48 | 49 | var map = [] 50 | var gap = .75 51 | var h = width/2-0.5 52 | var hgap = h+gap 53 | var R = Math.sqrt(3*h*h) 54 | map = map.concat(side([2, 1, 0], [-h, -h, -hgap])) 55 | map = map.concat(side([0, -2, 1], [hgap, -h, -h])) 56 | map = map.concat(side([-2, 0, 1], [-h, -hgap, -h])) 57 | map = map.concat(side([0, 2, 1], [-hgap, -h, -h])) 58 | map = map.concat(side([-1, 0, 2], [-h, hgap, -h])) 59 | map = map.concat(side([-1,-2,0],[-h,-h,hgap])) 60 | 61 | for (i = 0; i < pixelCount; i++) { 62 | sc = cartesianToSpherical(map[i][0],map[i][1],map[i][2]) 63 | cc = sphericalToCartesian(R, sc[1], sc[2]) 64 | map[i][0] = cc[0] 65 | map[i][1] = cc[1] 66 | map[i][2] = cc[2] 67 | } 68 | return map 69 | } 70 | -------------------------------------------------------------------------------- /Orb8x8/WS2812/Design/CubeSphere8x8MatrixConnectors.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/WS2812/Design/CubeSphere8x8MatrixConnectors.stl -------------------------------------------------------------------------------- /Orb8x8/WS2812/Design/CubeSphere8x8WS2812Connectors.3mf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/WS2812/Design/CubeSphere8x8WS2812Connectors.3mf -------------------------------------------------------------------------------- /Orb8x8/WS2812/Design/Shell.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/WS2812/Design/Shell.stl -------------------------------------------------------------------------------- /Orb8x8/WS2812/Design/Tiles.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/WS2812/Design/Tiles.stl -------------------------------------------------------------------------------- /Orb8x8/WS2812/Design/orb_holder.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 47 | 49 | 50 | 52 | image/svg+xml 53 | 55 | 56 | 57 | 58 | 59 | 63 | 66 | 71 | 76 | 77 | 80 | 85 | 90 | 91 | 95 | 99 | 102 | 108 | 114 | 115 | 118 | 124 | 130 | 131 | 134 | 140 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /Orb8x8/WS2812/Pictures/ConnectorsOnly.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/WS2812/Pictures/ConnectorsOnly.JPG -------------------------------------------------------------------------------- /Orb8x8/WS2812/Pictures/CubeWithOrb8x8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/WS2812/Pictures/CubeWithOrb8x8.jpg -------------------------------------------------------------------------------- /Orb8x8/WS2812/Pictures/MatrixBodyConnectorsWithoutLock.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/WS2812/Pictures/MatrixBodyConnectorsWithoutLock.JPG -------------------------------------------------------------------------------- /Orb8x8/WS2812/Pictures/MatrixBodyLayout.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/WS2812/Pictures/MatrixBodyLayout.JPG -------------------------------------------------------------------------------- /Orb8x8/WS2812/Pictures/MatrixBodyWithBatteryLock.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/WS2812/Pictures/MatrixBodyWithBatteryLock.JPG -------------------------------------------------------------------------------- /Orb8x8/WS2812/Pictures/MatrixBodyWithoutLock.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/WS2812/Pictures/MatrixBodyWithoutLock.JPG -------------------------------------------------------------------------------- /Orb8x8/WS2812/Pictures/MatrixLid.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/WS2812/Pictures/MatrixLid.JPG -------------------------------------------------------------------------------- /Orb8x8/WS2812/Pictures/MatrixLidWithConnectors.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/WS2812/Pictures/MatrixLidWithConnectors.JPG -------------------------------------------------------------------------------- /Orb8x8/WS2812/Pictures/OpenOrb8x8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/WS2812/Pictures/OpenOrb8x8.jpg -------------------------------------------------------------------------------- /Orb8x8/WS2812/Pictures/Orb8x8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Orb8x8/WS2812/Pictures/Orb8x8.jpg -------------------------------------------------------------------------------- /Orb8x8/WS2812/Pixelblaze/CubeSpherePixelblazeMap.txt: -------------------------------------------------------------------------------- 1 | // Maps the pixel locations of the cube sphere (an LED cube inscribed inside a translucent 2 | // sphere which pipes the LED light out to the sphere's surface). Cube side length (in pixels) 3 | // is "width." 4 | // Most of this algorithm is lifted directly from the Pixelblaze mapper code for a walled 5 | // cube by Ben Henke (see https://electromage.com/intro_to_mapping). The coordinates are 6 | // mapped to the surface of the sphere by generating Cartesian coordinates for the cube, 7 | // converting pixel coordinates to spherical values, and then setting rho for each pixel 8 | // to the radius of the circumscribed sphere while retaining theta and phi, then converting 9 | // back to Cartesian coordinates. 10 | function (pixelCount) { 11 | width = 8 12 | 13 | function sphericalToCartesian(rho, theta, phi) { 14 | x = rho*Math.sin(phi)*Math.cos(theta) 15 | y = rho*Math.sin(phi)*Math.sin(theta) 16 | z = rho*Math.cos(phi) 17 | return [x, y, z] 18 | } 19 | 20 | function cartesianToSpherical(x, y, z) { 21 | rho = Math.sqrt(x*x + y*y + z*z) 22 | theta = Math.atan2(y,x) 23 | phi = Math.acos(z/rho) 24 | return [rho, theta, phi] 25 | } 26 | 27 | //generate a 2d matrix in 3d space 28 | //targets is an array of source coordinates 0 = fixed, 1 = row, 2 = column 29 | //e.g. [1,2,0] will generate rows = x, cols = y, and z is fixed (at zero) 30 | //sign indicates direction so -2 is columns in reverse order 31 | //offsets lets you translate the coordinates by some offset 32 | function side(targets, offsets) { 33 | var matrix = [], coords, row, col 34 | for (i = 0; i < width * width; i++) { 35 | row = Math.floor(i / width) 36 | col = i % width 37 | col = row % 2 == 1 ? width - 1 - col : col //zigzag 38 | coords = [0, row, col] 39 | matrix.push(targets.map(function (target, index) { 40 | var coord = coords[Math.abs(target)] 41 | if (target < 0) 42 | coord = width - 1 - coord 43 | return coord + offsets[index] 44 | })) 45 | } 46 | return matrix 47 | } 48 | 49 | var map = [] 50 | var gap = .75 51 | var h = width/2-0.5 52 | var hgap = h+gap 53 | var R = Math.sqrt(3*h*h) 54 | map = map.concat(side([-1, 2, 0], [-h, -h, -hgap])) 55 | map = map.concat(side([0, 2, -1], [hgap, -h, -h])) 56 | map = map.concat(side([-2, 0, -1], [-h, hgap, -h])) 57 | map = map.concat(side([0, -2, -1], [-hgap, -h, -h])) 58 | map = map.concat(side([2, 0, -1], [-h, -hgap, -h])) 59 | map = map.concat(side([-1,-2,0],[-h,-h,hgap])) 60 | 61 | for (i = 0; i < pixelCount; i++) { 62 | sc = cartesianToSpherical(map[i][0],map[i][1],map[i][2]) 63 | cc = sphericalToCartesian(R, sc[1], sc[2]) 64 | map[i][0] = cc[0] 65 | map[i][1] = cc[1] 66 | map[i][2] = cc[2] 67 | } 68 | return map 69 | } 70 | -------------------------------------------------------------------------------- /Orb8x8/WS2812/Pixelblaze/README.md: -------------------------------------------------------------------------------- 1 | Please note that the map file here, written for the [Pixelblaze controller] (https://electromage.com/pixelblaze) 2 | reflects the following layout for the six (zigzag) WS2812 matrices in the base cube. The arrow on each side indicates the direction of the 3 | first row on that matrix. 4 | 5 | ![Cube Sphere matrix layout](../Pictures/CubeSphereLayout.png) 6 | -------------------------------------------------------------------------------- /Orb8x8/WS2812/README.md: -------------------------------------------------------------------------------- 1 | # CubeSphere 2 | Design files and code for a 3D printed shell to transform an LED cube to a sphere. This is a work in progress and the documentation and design are not complete yet. Use at your own peril. 3 | 4 | [Follow this link for video of the sphere](https://youtube.com/shorts/eQoiFBxLnEA?feature=share) 5 | 6 | Currently the assembly is held together with string wrapped around the parts of the shell to hold them against the matrices. 7 | 8 | ![Partially completed CubeSphere](./Pictures/Illuminated8x8.jpg) 9 | -------------------------------------------------------------------------------- /Pictures/ThreeOrbs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekmomprojects/CubeSphere/cf9ee99d55a03baea9b55f2309efaa84c41e86dd/Pictures/ThreeOrbs.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # The Cube Orb Project 2 | 3 | Design files and code for a 3D printed shell to transform an LED cube of off-the shelf matrices into an illuminated sphere. 4 | 5 | | 6 | 7 | There are multiple versions of ths project which use off-the shelf matrices of different sizes. Most use WS2812 addressable LEDs, but one version of the 8x8 orb uses SK9822 matrices. The 5x5 Orb is written up in great detail in Make: Magazine, vol. 84. 8 | 9 | 10 | 11 | The designs, which exist in varying degrees of completion are: 12 | - [4x4 WS2812 matrices V1](https://github.com/geekmomprojects/CubeSphere/tree/main/Orb4x4) (challenging) 13 | - [4x4 WS2812 matrices V2 with 3D printed battery holder](https://github.com/geekmomprojects/CubeSphere/tree/main/Orb4x4_V2) (challenging) 14 | - [5x5 WS2812 matrices](https://github.com/geekmomprojects/CubeSphere/tree/main/Orb5x5) (intermediate) 15 | - [8x8 WS2812 matrices](https://github.com/geekmomprojects/CubeSphere/tree/main/Orb8x8/WS2812) (challenging) 16 | - [8x8 SK9822 (APA102 equivalent) matrices](https://github.com/geekmomprojects/CubeSphere/tree/main/Orb8x8/SK9822) (intermediate) 17 | 18 | The 8x8 orbs both use the [Pixelblaze Controller](https://electromage.com/pixelblaze) and its associated sensor board to generate pixel-mapped LEDs patterns that are sound/motion responsive. The other orb designs use the [XIAO Sense nRF52840 board](https://www.seeedstudio.com/Seeed-XIAO-BLE-Sense-nRF52840-p-5253.html) with custom CircuitPython code to control the LEDs. 19 | 20 | For all designs, it is strongly recommended that you 3D print the cube interior connectors in PETG or other similarly strong filament. The exterior shell may be printed in PETG or PLA. You will need a well-tuned printer with good bed adhesion for this project, especially for the translucent diffusing tiles, as they require printing a large quantity of tiny parts. 21 | 22 | --------------------------------------------------------------------------------