Completed code

The current version of ALL the code can be accessed here.

Advertisements

6 comments

  1. Jimmy F. · · Reply

    I know this might be a stupid question but… how do you run the AI?

    1. Thanks for the question!
      The code is not so simple right now, unfortunately. Once you clone the respistory here, you can run it with python rpi_ai.py. Since I haven’t made a Makefile for this yet, its likely you’ll have errors related to missing packages, so you’ll have to install those too. Please let me know if you run into problems!

  2. First of all, thanks for this project, this is an awesome project, it would be more awesome if we are able to run it :), I am getting No such file or directory: ‘ai_data/personlist.p’ ..
    What does that picke file should contain, where can i find it? Please help

    1. You’ll have to make your own, I’m afraid. Or just comment out that part if you don’t want it. It’s pretty easy to make one, just use a person class, I.e., type this into a Python terminal:
      “`python
      pickle.save([Person(‘Naren’,’job’,’Hello!’)],open(‘ai_data/personlist.p’,’w’))
      “`

  3. Great thanks for the response, i fixed the pickle file issue. Now i am getting an error ( I am pasting the last part of the trace ), Seeking your help 🙂

    ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM iec958
    ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2’
    ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
    ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM spdif
    ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2’
    ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
    ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM spdif
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
    ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
    Cannot connect to server socket err = No such file or directory
    Cannot connect to server request channel
    jack server is not running or cannot be started
    mmal: mmal_vc_component_create: failed to create component ‘vc.ril.camera’ (1:ENOMEM)
    mmal: mmal_component_create_core: could not create component ‘vc.ril.camera’ (1)
    mmal: Failed to create camera component
    mmal: main: Failed to create camera component
    mmal: Camera is not detected. Please check carefully the camera module is installed correctly

    Unhandled exception in thread started by
    Traceback (most recent call last):
    File “/home/pi/workspace/AI/rpi_ai/visual_cortex.py”, line 154, in lookAtSurroundings
    image1, buffer1 = captureTestImage()
    File “/home/pi/workspace/AI/rpi_ai/visual_cortex.py”, line 25, in captureTestImage
    imageData.write(subprocess.check_output(command, shell=True))
    File “/usr/lib/python2.7/subprocess.py”, line 544, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
    subprocess.CalledProcessError: Command ‘raspistill -w 100 -h 75 -t 1 -n -vf -e bmp -o -‘ returned non-zero exit status 70
    arecord: main:682: audio open error: No such file or directory

  4. unknownguy2002 · · Reply

    The completed code is hard to run, but the rest is AWESOME, ways to add functionality to our PI!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: