Regan
Created October 20, 2021 © GPL3+

Hidden in Plain Sight

With this t-shirt, you can display one kind of pride and have the other hidden in plain sight- stay safe!

Beginner24 hours10
Hidden in Plain Sight

Things used in this project

Hardware components

Circuit Playground Express
Adafruit Circuit Playground Express
×1
RGB LED Pixel Matrix, NeoPixel NeoMatrix
RGB LED Pixel Matrix, NeoPixel NeoMatrix
I used a 16x16 pixel board for this project.
×1

Software apps and online services

MakeCode
Microsoft MakeCode

Hand tools and fabrication machines

Soldering Gun Kit, Instant Heat
Soldering Gun Kit, Instant Heat

Story

Read more

Code

disobedient code

JavaScript
The code essentially will always display the bisexual flag but, when A6 or anything connected is pressed, it will display an asexual flag in the shape of a heart.
input.pinA6.onEvent(ButtonEvent.Down, function () {
    down = true
})
input.pinA6.onEvent(ButtonEvent.Up, function () {
    down = false
})
let lights = false
let down = false
let strip = light.createStrip(pins.A1, 256)
let strip2 = strip.range(100, 8)
let strip3 = strip.range(115, 10)
let strip4 = strip.range(130, 12)
let strip5 = strip.range(146, 12)
let bistrip1 = strip.range(0, 80)
let bistrip2 = strip.range(80, 96)
let bistrip3 = strip.range(176, 80)
down = false
forever(function () {
    if (down == false) {
        bistrip1.setAll(0x0000ff)
        bistrip2.setAll(0x7f00ff)
        bistrip3.setAll(0xff0080)
    } else {
        strip.setAll(0x000000)
        lights = true
    }
    while (lights == true) {
        strip2.setAll(0xffffff)
        strip3.setAll(0xffffff)
        strip4.setAll(0xffffff)
        strip5.setAll(0x353535)
        strip.setPixelColor(55, 0xBC41EA)
        strip.setPixelColor(56, 0xBC41EA)
        strip.setPixelColor(70, 0xBC41EA)
        strip.setPixelColor(71, 0xBC41EA)
        strip.setPixelColor(72, 0xBC41EA)
        strip.setPixelColor(73, 0xBC41EA)
        strip.setPixelColor(85, 0xBC41EA)
        strip.setPixelColor(86, 0xBC41EA)
        strip.setPixelColor(87, 0xBC41EA)
        strip.setPixelColor(88, 0xBC41EA)
        strip.setPixelColor(89, 0xBC41EA)
        strip.setPixelColor(90, 0xBC41EA)
        strip.setPixelColor(163, 0x353535)
        strip.setPixelColor(164, 0x353535)
        strip.setPixelColor(165, 0x353535)
        strip.setPixelColor(166, 0x353535)
        strip.setPixelColor(169, 0x353535)
        strip.setPixelColor(170, 0x353535)
        strip.setPixelColor(171, 0x353535)
        strip.setPixelColor(172, 0x353535)
        strip.setPixelColor(180, 0x353535)
        strip.setPixelColor(181, 0x353535)
        strip.setPixelColor(186, 0x353535)
        strip.setPixelColor(187, 0x353535)
        if (!(input.pinA6.isPressed())) {
            down = false
            lights = false
        }
    }
})

Credits

Regan
4 projects • 0 followers

Comments