Nataliaaaaaaaa
Published

Ramen Shop Scale Model 1:12

Ramen shop model for a local model contest in GDL added lights and sound with Circuit Playground Express.

BeginnerShowcase (no instructions)20 hours519
Ramen Shop Scale Model 1:12

Things used in this project

Hardware components

Billydoll House Ramen kit
×1
Circuit Playground Express
Adafruit Circuit Playground Express
×1
Fairy lights
×1
Rechargeable Battery, 3.7 V
Rechargeable Battery, 3.7 V
×1
Slide Switch
Slide Switch
×1
Logic Level FET P-Channel
Logic Level FET P-Channel
×1
Resistor 220 ohm
Resistor 220 ohm
×1
Accessory, Screw
Accessory, Screw
×2
TP4056 charger
×1
Logic Level FET P-Channel
Logic Level FET P-Channel
×1

Software apps and online services

Mu Editor circuit python

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

Fritzing Diagram

Code

Ramen House

MicroPython
import time
import board
import digitalio
from adafruit_circuitplayground.express import cpx

cpx.pixels.brightness = 0.30
playMusic = 0
ledsOn = 0
lampOn = 0
ledsPin = digitalio.DigitalInOut(board.A1)
ledsPin.direction = digitalio.Direction.OUTPUT
lampPin = digitalio.DigitalInOut(board.A7)
lampPin.direction = digitalio.Direction.OUTPUT
while True:

    if cpx.touch_A2:
        print("Touched A2!")
        lampOn ^= 1
        if lampOn:
            cpx.pixels.fill((210, 45, 0))
            lampPin.value = True
        else:
            cpx.pixels.fill((0, 0, 0))
            lampPin.value = False
    if cpx.touch_A3:
        print("Touched A3!")
        ledsOn ^= 1
        if ledsOn:
            cpx.pixels.fill((255, 0, 255))
            ledsPin.value = True
        else:
            cpx.pixels.fill((0, 0, 0))
            ledsPin.value = False

    if cpx.touch_A2 and cpx.touch_A3:
        print("Touched A2 and A3!")
        playMusic ^= 1
        if playMusic:
            cpx.pixels.fill((255, 0, 0))
            cpx.play_file("cancion.wav")
        else:
            cpx.play_file("ramenAnime22k.wav")
            cpx.pixels.fill((0, 0, 0))
    time.sleep(0.1)

Credits

Nataliaaaaaaaa

Nataliaaaaaaaa

32 projects • 47 followers
i like cute electronic projects.
Thanks to Adafruit.

Comments