Mic connects on the Prop BOE
smithdavidp
Posts: 146
Yeah.... I know....it's him again.........
I am playing with the Speach_REC_Robot_4_commandsVer2 file for voice controll of the propeller. I am trying to use the onboard mic.
The tags near the Mic are P20 and P21. Am I correct in assuming that P20 is the Audio input and P21 is for the Delta feedback? This is what I put into the code:
'**************************************************************
''* Code that commands a two wheel servo robot by human voice (4 commands)
''* this code based on the following codes:
''* 1. Goertzel Speech Recognition Demo by Phil Pilgrim
''* 2. Control Two Servos by PE Kit Servo Control v1.4
''* 3. ServoContinuesRotation by CRpropellerCode-v2.0
''* Code montage (not copyright) by Nikos Giannakopoulos 2011
''*************************************************************
'' To use this program you need the Parallax Demo Board
'' a robotic platform (chassis with two servos and two wheels )
'' three led (green yellow and red) and five resistors
''***************************************************************************************************
''********************************** the 4 VOICE COMMANDS ******************************************
''* It is IMPORTANT when the robot learns your voice to give the commands with the following order:
''* 1st command:*FORWARD* - 2nd command:*BACKWARD* - 3nd command:*RIGHT* - 4th command:LEFT
''***************************************************************************************************
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
NBINS = 8 'Number of different frequencies to analyze.
THRESHOLD = 500 'Sound threshold to mark the beginning of an utterance.
TMPLEN = 50 'Length of a word template in samples.
NWORDS = 4'5 'Number of words in the vocabulary.
NEXAMPLES = 1 ' 3 'Number of template examples for each vocabulary word.
INP_PIN = 20 'Audio input pin (can be modified for other boards).
FB_PIN = 21 'Sigma-delta ADC feedback pin (can be modified for other boards).
'
SERVO_COUNT = 2 ' Number of servos to control
servo_ch1 = 14
servo_ch2 = 15
green_led = 9
yellow_led = 10
red_led = 11
The ability to use voice commands is part of my project.
My second question is the aufio output on 26 and 27. Does the VeHo 360 receive audio from both pins or does it only do mono from one of the pins?
Thanks for your time
I am playing with the Speach_REC_Robot_4_commandsVer2 file for voice controll of the propeller. I am trying to use the onboard mic.
The tags near the Mic are P20 and P21. Am I correct in assuming that P20 is the Audio input and P21 is for the Delta feedback? This is what I put into the code:
'**************************************************************
''* Code that commands a two wheel servo robot by human voice (4 commands)
''* this code based on the following codes:
''* 1. Goertzel Speech Recognition Demo by Phil Pilgrim
''* 2. Control Two Servos by PE Kit Servo Control v1.4
''* 3. ServoContinuesRotation by CRpropellerCode-v2.0
''* Code montage (not copyright) by Nikos Giannakopoulos 2011
''*************************************************************
'' To use this program you need the Parallax Demo Board
'' a robotic platform (chassis with two servos and two wheels )
'' three led (green yellow and red) and five resistors
''***************************************************************************************************
''********************************** the 4 VOICE COMMANDS ******************************************
''* It is IMPORTANT when the robot learns your voice to give the commands with the following order:
''* 1st command:*FORWARD* - 2nd command:*BACKWARD* - 3nd command:*RIGHT* - 4th command:LEFT
''***************************************************************************************************
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
NBINS = 8 'Number of different frequencies to analyze.
THRESHOLD = 500 'Sound threshold to mark the beginning of an utterance.
TMPLEN = 50 'Length of a word template in samples.
NWORDS = 4'5 'Number of words in the vocabulary.
NEXAMPLES = 1 ' 3 'Number of template examples for each vocabulary word.
INP_PIN = 20 'Audio input pin (can be modified for other boards).
FB_PIN = 21 'Sigma-delta ADC feedback pin (can be modified for other boards).
'
SERVO_COUNT = 2 ' Number of servos to control
servo_ch1 = 14
servo_ch2 = 15
green_led = 9
yellow_led = 10
red_led = 11
The ability to use voice commands is part of my project.
My second question is the aufio output on 26 and 27. Does the VeHo 360 receive audio from both pins or does it only do mono from one of the pins?
Thanks for your time
Comments
-Phil
Thanks Phil. You just fixed some of my problems with a few of the audio example spin programs. Setting the output to pin 26 only gives me audio. When I set the left as 26 and the right as 27 I had no audio at all. Of course I could have tried stero headphones but I didn't want to have to follow the bot all over the house just to hear what was going on. lol
Just as an FYI, the standard for the stereo plug connector is tip-left, ring-right. Going by the PropBOE schematic, that makes pin 26 right, and pin 27 left.
Of course, you can always just turn around and then the sound will go into the correct ears. That's what I usually do.
-- Gordon
ummmmm attached a trailor to the Boe Bot......it won't pull it :-(