Connect with us

How can I use a Raspberry Pi for this INSANE project?

Discussion in 'Microcontrollers, Programming and IoT' started by Crohn, Mar 15, 2013.

Scroll to continue with content
  1. Crohn


    Mar 15, 2013
    How can I use a Raspberry Pi to create a makeshift AI?

    I am a complete newbie when it comes to I/O hobbyist technology :) I am good with computers but I have never owned a Pi before. I think however it could be used for the following project, with the correct coding:

    I appreciate your lenience in answering, as my experience in this area is quite limited.
    I want to study "I/O" enough to have the ability to create a device that uses several sensors (e.g. motion, sound, light, pressure,) who's values would be made to play a corresponding MP3 file (or .wav) when reaching a preset value. In essence,

    --sensor receives "X" data, which plays "Y" sound file.

    By the same token, (and hopefully possible for this same setup)

    Speech Recognition- Device "hears" phrase "X", and sound file "Y" plays.

    Please be detailed in your responses, if of course you can stomach my ignorance! I KNOW that for the experienced engineer this would simply be a matter of acquiring the correct sensors, tying them into a micro controller of SOME KIND (I was thinking a raspberry, actually? Full functionality?), and writing the correct code to achieve a simple "If , Then" relationship between type of sensory data accumulated, and which corresponding mp3 to play.

    The Ras Pi I believe comes with several GPIO pins, so combined with its increased functionality as a full computer, I was thinking of using it?

    ...Am I on the right track here with all this? I am VERY interested in I/O and willing to learn!!

  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    Does this help you at all?

    Doing something based on a logic level on a GPIO pin is trivial and you should be able to Google that yourself.
  3. Crohn


    Mar 15, 2013

    Thanks for the URL, and I realize that my questions are trivial (as I stated in my original post), but If you wouldn't mind helping out a newbie? I have several simple questions that google searches aren't really covering. That's... why I came here, y'know? :)
  4. Crohn


    Mar 15, 2013
    First, for this strange project that I'm attempting as a beginners' design:

    -Would a ras pi even be the recommended device to use for this?

    I did look into an Arduino, but decided that for the increased functionality demands of speech recognition and mp3 playback, it might be better to go with a Ras?

    I figured the professionals on this forum would be able to answer these questions in their sleep :) If you don't want to, no big deal, I'm sure someone will.
  5. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    To interface to a relay try something like this.

    To interface to a button, try this.

    And then, of course, you have to write software.

    I sent you a link describing how to do voice recognition.

    And here is one for playing MP3s

    You have to look at these links (hint: finding others is as easy as typing something like "raspberry pi play mp3" into Google).

    If you have any specific questions, come back and ask.

    Even better, go to a dedicated RPI forum because you'll get answers there from people who use these devices every day.
  6. donkey


    Feb 26, 2011
    hey crohn. the raspberry pi foundation really excels at helping out with this. most of it is programming and alot of it has been done. arduino will beable to do some of the things you want but
    A)its alot slower
    B) a mega board is the same price as the pi
    C) pi is more fun

    there are people trying to make the pi as comfortable to use as any other computer with people making small bussiness pc's (just a text editor pretty much) right through to game emulators, new games, house automation, wireless connectivity etc etc etc
    the arduino iscapable of doing some of these things but its like comparing a calculator to a smartphone. yes it is possible but one of them is easier and has way more processing power.

    as for your speech recognition you will also have to read up on USB mic as the pi only has audio out not in. getting a working mic shouldn't be too hard but I am still learning linux so its a bit above me even installing the damn drivers
  7. Six_Shooter


    Nov 16, 2012
    While this may be trivial to some, to others it would be like climbing to the peak of Mt. Everest.

    I'm in College right now for electronics technology, where C, and C++ (along with a couple other related languages), are part of the curriculum, and while I know how I start the pseudo code, and think I know how I would write the code, it would not be "trivial".

    If you haven't written code before (C, C++, etc) it would be best to start out with some of the easier projects, some would even relate to your final project, and once you understand each part you can combine them.

    I plan to do this with some of my planned projects over the summer break from school. I do have the advantage of two semesters of C and C++ classes under my belt, sadly only 4 hours a week total between theory and lab, plus any outside of lab projects.

    The only way to do it is to play with code and research the programming languages you will use.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day