I just took a job from an advertising agency and my job is to create an apparatus which will play a selected video when you blow air into its sound se...

I just took a job from an advertising agency and my job is to create an apparatus which will play a selected video when you blow air into its sound sensor. For example its McDonalds' 68th annivesary and when you blow air into the sound sensor, it plays a video. And I have chosen Raspberry Pi as the hardware, I won't have much problems assembling it together thankfully.
But here is the problem: I still need a Python code in order to connect sound sensor, Raspberry Pi and the video together. I searched Github but as I don't know much about this subject I suffered. Can you guys suggest me some codes I can look through with my coder friend, or at least suggest me some titles and words to shorten my search. Feel free to ask more questions.

250 Piece Survival Gear First Aid Kit

LifeStraw Water Filter for Hiking and Preparedness

250 Piece Survival Gear First Aid Kit

  1. 1 year ago
    Anonymous

    >For example its McDonalds' 68th annivesary and when you blow air into the sound sensor, it plays a video.

    Please elaborate on this so we can help you; will you be purchasing food at McDonalds' at the time.

    • 1 year ago
      Anonymous

      This will be a product which I will give to the advertising agency. Assume that you are walking in the mall and see a sound sensor you can blow air to. When you blow the air into that it starts playing a video of the advertising agency (I don't care what they put there). Noise sensor is going to realize the change in frequency and is going to alert the Raspberry Pi, and the code in the Raspberry Pi will alert the video to play. I am fine with building the hardware, but software I have problems with. What do you suggest?

      • 1 year ago
        Anonymous

        Who the frick is going to blow air into a random kiosk in order to be rewarded with an advertisement? This whole concept is fricking moronic and I'd be wary working for an advertising agency with ideas this fricking stupid.

        • 1 year ago
          Anonymous

          I know that its a moronic idea, but I want to make money out of this. And I need a code to start Anon

        • 1 year ago
          Anonymous

          I am not a worker either btw, I am just trying to make a buck out of freelancing

        • 1 year ago
          Anonymous

          Welcome to advertising, they're literally never made anything of value, 99% of this shit winds up in a landfill

          • 1 year ago
            Anonymous

            Based SPAM producers. They are the direct cause of why modern life is a specific flavor of hellhole it is now.

      • 1 year ago
        Anonymous

        >be me
        >be shopping
        >see a faded red mouthpiece
        >it's slightly moist and smells of mold, saliva, scum and 7 different types of diseases
        >blow on it
        >immediately contracts herpes, chlamydia, syphillis and many more fun physical afflictions
        >all I get for it is to hear the 69-1th Mcdonald Anniversary advertisement blow up against your face and ear

      • 1 year ago
        Anonymous

        So, build the hardware and get a sensor. This should presumably then have information that it readable on the Pi. Then it's just some dumb while loop constantly checking for the condition (I guess you have hardware that can detect a pressure change?) And then you play a video.

        In python it would be something like

        while True:
        if pressure_changed():
        play_video()

        The code is trivial if you have hardware that can provide the state to the Pi.

  2. 1 year ago
    Anonymous

    Didn't the Nintendo DS have a bunch of games where you had to blow on the mic for certain mini-games? Maybe start by looking for people documenting/reverse engineering how that was implemented.

  3. 1 year ago
    Anonymous

    does it NEED to be a sensor? if not, I have a ghetto solution that requires no original code.
    use an end stop switch from a 3d printer or another switch that needs barely any force to be pressed. use some code from an arduino keyboard project and connect the arduino to your pi via usb. your button will act like a hotkey. put a basic linux distro on the pi and change a few settings so that when your hotkey is pressed, the command "xdg-open {file}" is run. replace {file} with the directory of the video.
    this is very barebones, and would need heavy polishing. obviously don't use this for the final product and make it much more polished.

    • 1 year ago
      Anonymous

      Button solution exists nearly everywhere. The company just wants to be unique and cool so they want it with a noise sensor. When you blow into it they will play a Happy Birthday *Globalist Company!* message with a cake and candles. So sadly yes it has to be a noise sensor.

      • 1 year ago
        Anonymous

        >The company just wants to be unique and cool so they want it with a noise sensor.

        it might be unique but it's a pile of shit otherwise. and no offense if english is not your language, but "blowing air into a sensor" is not how I would produce noise. Just speak into it, like say "play the stupid ad and get on with it".

        • 1 year ago
          Anonymous

          I am not a native speaker so no offense taken. But blowing air into a noise sensor will change the frequency and trigger the sensor. Obviously no sane person walking in the mall and seeing this random kisok will blow air into that but as I said they want to be quirky and unique.

          >Raspberry Pi as the hardware
          Numerous free automation programs and even ladder diagram programs to connect a gpio pin condition to an automated response.
          What software have you used in the past?

          I haven't used anything, this is the first time I am taking a job like this. Even though I am a EEE student I am quite unexperienced (both hardware and software). Thankfully I am doing this with an experienced RD engineer and he will put all of the hardware together. But I must have a Python software.

      • 1 year ago
        Anonymous

        'Happy Birthday' is protected and can't be used for commercial use without a license. You will be held responsible and in a world of misery if you do this.

        • 1 year ago
          Anonymous

          No it isn’t. Look it up.

          https://i.imgur.com/5jAjyPy.jpg

          I just took a job from an advertising agency and my job is to create an apparatus which will play a selected video when you blow air into its sound sensor. For example its McDonalds' 68th annivesary and when you blow air into the sound sensor, it plays a video. And I have chosen Raspberry Pi as the hardware, I won't have much problems assembling it together thankfully.
          But here is the problem: I still need a Python code in order to connect sound sensor, Raspberry Pi and the video together. I searched Github but as I don't know much about this subject I suffered. Can you guys suggest me some codes I can look through with my coder friend, or at least suggest me some titles and words to shorten my search. Feel free to ask more questions.

          Op I feel your pain. I’ve done stuff before where I agree to do something for an ad agency without first having experience doing it. You didn’t ask for this advice, but I’m going to offer it.

          -get paid 50% upfront and charge 3x you think you should. I’m sure it’s too late for that. You take the job yet?

          -are you used to working with this group? Why did they choose you when you lack proven examples of creating this type of instore promo?

          -what is your exact responsibility? Delivering a prototype?

          -does the agency have the contract signed, or are they pitching?

          -is this in a country with a bunch of regulations that you probably don’t know anything about?

          -how high are you going to make the sensor? Kids are a lot of different heights

          -has the ad agency seen anything similar, or done anything similar in the past? Or is this some jackoffs “great idea”.

          - did they provide you any of McDonald’s guidelines for in store kiosks?

          -what happens when you go into,production, and they find a problem with the execution. I’m just making this up, but let’s say they start getting tripped constantly by AC, or air pressure changes in the building. Who is on the hook for improved / updated designs that work?

  4. 1 year ago
    Anonymous

    >Raspberry Pi as the hardware
    Numerous free automation programs and even ladder diagram programs to connect a gpio pin condition to an automated response.
    What software have you used in the past?

  5. 1 year ago
    Anonymous

    this has to be the stupidest fricking thing ive seen. who is gonna randomly blow air into things to see a fricking video? you are a moron and should forget life

    • 1 year ago
      Anonymous

      Black folk, have you read what I have written several times? I am doing this as a freelancer. Help if you can, and if you can't don't bother writing.

    • 1 year ago
      Anonymous

      If you read between the lines, it makes it seem like it's asking you to blow out the candles on the McD's birthday cake. It's not really that out of the box.
      Also, a customer who is engaging with your ads is a customer who is being impacted by your ads.

      OP-- make a python script that runs continuously (google it).... Set a GPIO as an input and when it gets tripped by the sound sensor, play a video and set a cooldown time to resume monitoring.
      Use a sensor such as that in
      https://www.instructables.com/Arduino-Sound-Sensor-with-LED/
      and then adjust its sensitivity until it works with your application.

      If you're asking someone to actually write the code for you, then you need to take a little more initiative and read some basic python/raspi tutorials. It will be educational for you.
      To be clear, this is going to be like 10 lines of code.

      • 1 year ago
        Anonymous

        >If you're asking someone to actually write the code for you, then you need to take a little more initiative and read some basic python/raspi tutorials. It will be educational for you.
        To be clear, this is going to be like 10 lines of code.
        I will hire a friend of mine to do the work as I don't know much about the coding. Will the code really be that short though? And how am I going to embed the McDonalds' video if its that short. And when time comes how will I replace McDonalds' video with KFC video(they don't want one use kiosks obviously)? I do know that coders can do that but really just in 10 lines? I would like an eloboration and see the codes in GitHub if avaliable Anon. I searched for them and found nothing. Also thanks for the info.

        • 1 year ago
          Anonymous

          >Will the code really be that short though? And how am I going to embed the McDonalds' video if its that short.
          The McDonalds video would probably be a video file on the SD card, flash, or whatever you're using as a hard drive. Alternatively, it could be a link to a remote file, but that would be less reliable because it would require an internet connection

          >Set GPIO pin as input
          >Make screen black (or display logo.jpg)
          >when GPIO is true, then start cooldown timer and play video.mpg
          >cooldown timer finishes, turn GPIO monitoring back on and make screen black again

          You can use https://pi.processing.org/
          If you look at the fricking tutorials for like 20 minutes, you should be able to formulate a plan and you're going to learn something useful that you can build upon later for other projects.

          If you want someone to just flat out write the code for you, then you should offer to pay. Asking for spoonfeeding is lazy and poor form when you're a hobbiest, but when you're getting paid and you want someone to make money for you, it's just flat out rude.

          • 1 year ago
            Anonymous

            Thank you for the info and sources. I am watching a video series about the coding rn.
            >The McDonalds video would probably be a video file on the SD card, flash, or whatever you're using as a hard drive.
            Oh I see. So video will be embedded in the SD/MicroSD card.
            >If you want someone to just flat out write the code for you, then you should offer to pay. Asking for spoonfeeding is lazy and poor form when you're a hobbiest, but when you're getting paid and you want someone to make money for you, it's just flat out rude.
            That is very correct and I will give a payment to the coder(even though I can probably make him do it free since he is a close friend). Reason why I am here is that I don't know much about the subject and wanted to learn more. I had no idea about the Raspberrys existance until yesterday.

  6. 1 year ago
    Anonymous

    Too bad it's python. My go to program for pi creates c++ out of ladder diagram. For everything else, I use "home assistant" and muck around with something they call yaml. Is the python requirement because of copyright advantages? Can you protect that code from them just taking it and not paying you?

  7. 1 year ago
    Anonymous

    Imagine the poor bastard that has to constantly clean the spit off that thing.

    Idea: put another sensor at groin level to detect a urine stream. You probably just need to adjust your ‘noise’ coefficients to make that work.

    • 1 year ago
      Anonymous

      Can’t be any worse than cleaning up those slides and the ball pit.

  8. 1 year ago
    Anonymous

    when you sense an interrupt, sufficient airflow has been met, ie someone has started blowing the horn as it were. Then you can play the globo homosexual video.

  9. 1 year ago
    Anonymous

    Literally just ask ChatGPT and modify whatever it gives you until it works

    Congratulations you are an honorary pajeet, now get the frick out of my country

    • 1 year ago
      Anonymous

      no clue if this works op but you should try it

      • 1 year ago
        Anonymous

        modifying perform_function() to play video

  10. 1 year ago
    Anonymous

    Microphone I guess and monitor the input for the sound of someone blowing? Like the waveform would be maxxed out for a couple seconds at a certain pitch range, since blowing on a mic usually makes the same SHHHHH sound regardless of who's doing it. But I don't know how you'd analyze that audio with code. I guess if you can get the amplitude and frequency as numbers it's doable with some trial and error.

    Maybe this will help
    https://stackoverflow.com/questions/51431859/how-do-i-get-the-frequency-and-amplitude-of-audio-thats-being-recorded-in-pytho#51436401

  11. 1 year ago
    Anonymous

    Your explanation seems deliberately vague, by "blow" do you mean "whistle"?
    By "aperatus" do you mean a functional device like a car, a specific device like a Donald mcdonald statue, or just a box for containing the system?

    I can envision this as either.
    A. A regular ass commercial intercom you've just bolted onto a TV frame or statue which simply picks up a noise at a certain decibel and pitch. Cheap, simple, boring, might go off due to ambient noise but who cares if it's just an advert. Frick a Pi this could run off a single chip board with a memory chip.
    B. If blowing is really what you want then it's likely to be a pain in the ass for people who can't blow hard or don't want to mouth frick the intercom, you could use an air pressure switch (like a funnel with a spinning disk in it) to measure air flow, and just bolt the fricker behind a regular intercom housing.

    Alternately if the object is stationary you might want to make the obvious choice of using an IR motion sensor, which are far more reliable and easier to maintain. Simply assume anyone two inches from the intake is blowing without actually measuring the air at all. Just put a spinning piece of shit there for effect.

    C. You could use a nuclear/ir source to detect particles moving between an airgap, like in a smoke alarm, then just wire it directly to the TV imput and load the video as if it was a screen saver, or failing that as a "play" button. You could even wire it to a TV remote if the screen wasn't attached to the aperatus.

    • 1 year ago
      Anonymous

      I'm not OP but it's pretty clear that what he wants is going to have some kind of indicator that you're supposed to blow into it and the easiest way to detect that is with a microphone. Almost every single game on the Nintendo DS that used its microphone used it in this way. Yeah you could also set it off by whistling or screaming at it but there's not going to be a sign in front of it telling you to do that.

  12. 1 year ago
    Anonymous

    just use the guts of an e-cigarette and use the output to the heater coil to drive a relay which then starts your gay video

  13. 1 year ago
    Anonymous

    Will the device be fart compatible?

  14. 1 year ago
    Anonymous

    Such a simple problem, really. Raspi is total overkill too.
    Just use an arduino and a cheap microphone (pretty much): the microphone records the noise of the blowing which will trigger the code in the arduino to send a sample of the sound to a custom machine learning model that checks if the sound is consistent with a blowing noise. If it is then your video will be played.
    I would suggest also encrypting each individual sound sample using the BLOCKCHAIN! and SMART CONTRACTS etc. for extra IT clout. Overall you should charge several thousand dollars for this contraption (remember it features THE BLOCKCHAIN! and MACHINE LEARNING!!!)

  15. 1 year ago
    Anonymous

    Also what about using a pinwheel type sensor on the candles. That would give good feedback to the kids on when they have blown, or blown hard enough to trigger device. You have to deal with pinwheels breaking I guess, but it would make it almost like an easy carnival game. Blow on th candles hard enough to keep them all spinning is intuitive.

    Video is triggered when at least two of the heels spins, with special video for all wheels spinning.

    Make sure SD is not easily swappable or is encrypted. You don’t want someone swapping in some mov of a penis that plays when them,ids blow on the candles or whatever.

    Enjoy being on a watchlist for trying to figure out how hard kids “blow” on average, and then looking for kids to test it out.

    Seriously though good luck.

  16. 1 year ago
    Anonymous

    I'll make a sound of you blow air into the end of my dick, is that good enough?

  17. 1 year ago
    Anonymous

    it annoys me that you are so useless that you have to post on this board but simultaneously so educated that you got the job.

    this seems like an easy project i could knock out in a day. but i wont spend 5 years of my life droning in order to get a degree so other drones can hire me and i can drone society up further.

    • 1 year ago
      Anonymous

      >why do you think you need a degree to do what he is doing? You are just bitter because you don’t know how to achieve things on your own, but won’t go through a traditional education experience either.

      Only person to be mad at here is yourself

  18. 1 year ago
    Anonymous

Your email address will not be published. Required fields are marked *