Jump to content
  • Announcement

    Welcome to the forums!

    If you are a newly-approved member, make sure you check out theĀ New Member Checklist!

    If you are a Detachment member and can't see the member-only area, post here for access.

    -DV

cooldevo

501st Members
  • Posts

    31
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by cooldevo

  1. Found a some sounds files, and I set mine up as follows. Assumptions based on how I set it up this weekend: Uses Raspbian OS, set up via PiBakery One push button configuration, used with two different setups (one-click and in development, multi-click) on glove. I put buttons between my left-hand thumb and index finger to minimize accidental pressing. GPIO Pin 23 will be used for button Files are MP3 (number is only limited by memory, I had 39): Format: #X.mp3 Files were numbered 1-39, then length added (S/M/L) then .mp3. For example: '1L.mp3' for the first file and is long. This will allow filtering MP3 files are saved in '/home/pi/nihilus' Script can be saved anywhere but I had it in '/home/pi/playback.py' crontab is set up as per my last post to run on reboot (every boot) This is the code I used for a single push button; with a push triggering one of the random 39 files: #!/usr/bin/env python #One push button setup: import os, glob, random, RPi.GPIO as GPIO from time import sleep GPIO.setmode(GPIO.BCM) GPIO.setup(23, GPIO.IN) os.chdir("/home/pi/nihilus") files = glob.glob("*.mp3") while True: if (GPIO.input(23) == False): os.system("mpg123 -q " + random.choice(files)) sleep(0.1) Prototype: (not confirmed working yet): From here, I'm working on using the one button to do 3 actions: 1 press for short files, 2 presses for medium files, and 3 presses for long files. I am waiting to get my new push button before fine tuning this: #!/usr/bin/env python #Multi push-button setup: import os, glob, random, time, RPi.GPIO as GPIO from time import sleep GPIO.setmode(GPIO.BCM) GPIO.setup(23, GPIO.IN) # Read in files os.chdir("/home/pi/nihilus") shortfiles = glob.glob("*S.mp3") mediumfiles = glob.glob("*M.mp3") longfiles = glob.glob("*L.mp3") while True: if GPIO.event_detected(23): GPIO.remove_event_detect(23) now = time.time() count = 1 GPIO.add_event_detect(23,GPIO.RISING) while time.time() < now + 1: # 1 second period if GPIO.event_detected(23): count +=1 time.sleep(.25) # debounce time if count == 2: os.system("mpg123 -q " + random.choice(shortfiles)) GPIO.remove_event_detect(23) GPIO.add_event_detect(23,GPIO.FALLING) elif count == 3: os.system("mpg123 -q " + random.choice(mediumfiles)) GPIO.remove_event_detect(23) GPIO.add_event_detect(23,GPIO.FALLING) elif count == 4: os.system("mpg123 -q " + random.choice(longfiles)) GPIO.remove_event_detect(23) GPIO.add_event_detect(23,GPIO.FALLING) Once it's confirmed working, then it's a matter of running the script at boot, which I use crontab ('crontab -e'): @reboot /home/pi/playback.py &
  2. If you could send me the audio files (or a link to them), I can get the above running on my Pi tonight and update the code sample to ensure it's valid and working.
  3. Hey, new to the forum so chiming in here. You could install Windows onto a Pi, which would solve your C++ dependencies. Not the way I'd do it, but it *should* work. Important Notes: Not knowing what way format your audio files are in, I'll cover MP3 (first example) and WAV (second example) for fun Each example will show two different ways it should work to play (first using the command line with MP3, the second using Pygame to play WAV files) This code was done off the top of my head, as I recall doing it. I don't have it with me, so humor any minor errors In this case, I'm going to assume using GPIO pins 23, 24, and 25 for a 3-button configuration. This example is using 3 buttons and each is mapped to a single file: <snipped> find working code further down This example is a 3-button configuration that will play a random file from a pool (e.g. long, medium, short). It requires sorting your files by something (I did it by directory here, but you could use annotated filnames to do the same thing (e.g. 1short.wav, 2short.wav, 1long.wav, etc.etc. and filter on short/medium/long.wav): <snipped> find working code further down Both of the above *should* work substituting paths and whatnot as required, but I haven't tested it. Once it's confirmed working, then it's a matter of running the script at boot, which I use crontab ('crontab -e'): @reboot /usr/bin/python /path/to/script.py &
  4. So, to the boots. Seeing as I already have a pair for Vader, I think they should work just fine for this costume as well. Here's a couple of pictures of them, as I took them out of the box. They've opened up as I've worn them a number of times, as I said I just took them out of the brown box. I did do a modification to the back, to allow for my much larger calf, but it will be hidden as it stops about 2-3" above the ground. It's hidden by the Vader tunic and should easily be hidden by the Nihilus skirts.
  5. I've current got an approved ROTJ Royal Guard, and am one chest box away from completing ROTJ Vader. So I figured a good Legends character would be in order, and why not start with the Lord of Hunger? I was torn between KOTOR2 and COTF, and my wife much prefers the COTF mask definition, so that was the deciding factor. Update: Seamstress is hard at work, she has relocated where she works from which has paused work, but the first bits are looking fanstastic! Not Ordered: Sabre: Looking for a nice basic one, but not a priority at the moment. Ordered pending delivery Nothing!!!! In-Hand Boots: Soviet Officer boots for my Vader, modded for extra calf room. Soft parts material: Sleeves: Black Kona and Batting bought from local fabric shop. Everything else: Raw Black Silk ordered from Dharma Trading Gloves: Ordered from a vendor on etsy Blackout Hood: full body morphsuit ordered, will need a small alteration to fit my rather large head but looks fantastic so far Mask/Hood: Ordered both from @Twi'lek Pam via etsy on 31 Jan 2018. Shipped on 20 Feb, in transit Belt: Local leatherworker commissioned, picking up Saturday 3 March 2018 I'll post pictures of each part as I go.
  6. Requesting 501st access, my profile is updated with required information. Darth Nihilus WIP will be starting imminently; and only one chest box away from being finished ROTJ Darth Vader in SLD. For ease, here's the link to my profile: http://501st.com/members/displaymemberdetails.php?userID=21363 Thanks! XO Edit: Good to go
×
×
  • Create New...