Software => Software => Topic started by: kunaldgr8 on February 14, 2012, 07:51:32 AM
Title: arduino pop168 -popbot
Post by: kunaldgr8 on February 14, 2012, 07:51:32 AM
any one who owns a popbot plz give me its sample coding plz
Title: Re: arduino pop168 -popbot
Post by: newInRobotics on February 14, 2012, 08:27:20 AM
Have You tried looking for it Yourself? ;D
Activity manual version 1.0 Standard (http://www.inexglobal.com/downloads/POP-BOT_e_small.pdf)
Title: Re: arduino pop168 -popbot
Post by: kunaldgr8 on February 14, 2012, 08:38:38 AM
a lot i mean i am looking it for last 15 hrs
Title: Re: arduino pop168 -popbot
Post by: kunaldgr8 on February 14, 2012, 08:41:09 AM
i read this but i was fcing a prob like take this code /******************************************************************************* * POP-BOT V1.0 * Running Forward/Backward Full Speed ********************************************************************************/ void setup(){ pinMode(3,OUTPUT); // Motor A1 pinMode(5,OUTPUT); // Motor A2 pinMode(6,OUTPUT); // Motor B2 pinMode(9,OUTPUT); // Motor B1 } void Forward(){ // Robo-Spinner Go Forward Rountine digitalWrite(3,HIGH); digitalWrite(5,LOW); digitalWrite(6,HIGH); digitalWrite(9,LOW); } void Backward(){ // Robo-Spinner Go Backward Rountine digitalWrite(3,LOW); digitalWrite(5,HIGH); digitalWrite(6,LOW); digitalWrite(9,HIGH); } void loop(){ Forward(); delay(1000); Backward(); delay(1000); } /*************************************** no i am suing servos in place of motors and here i can not find any libary for vr moduel
Title: Re: arduino pop168 -popbot
Post by: newInRobotics on February 14, 2012, 08:54:20 AM
So You actually need library that comes with the bot and not an example code. You get what You ask ;D
Doesn't it use regular Arduino libraries? Click Me (http://inexglobal.forum-motion.com/t47-newbie-questions-on-pop-bot)
Title: Re: arduino pop168 -popbot
Post by: kunaldgr8 on February 14, 2012, 08:59:52 AM
1 doubt like i copy this sample code and modify it acording to servo then to activate voice commands through vrbot moduel i have to train it in its gui then what modification in code i have to do to make it work :o :o :o(c is making me mad )
Title: Re: arduino pop168 -popbot
Post by: kunaldgr8 on February 14, 2012, 09:02:41 AM
bool checkMonitorInput() { if (Serial.available() <= 0) return false;
// check console commands int16_t rx = Serial.read(); if (rx == 'b') { useCommands = false; set++; if (set > 3) set = 0; } if (rx == 'c') { useCommands = true; do { group++; if (group > EasyVR::PASSWORD) group = 0; } while (!((mask >> group) & 1)); } if (rx == 's') { int16_t num = 0; delay(5); while ((rx = Serial.read()) >= 0) { if (isdigit(rx)) num = num * 10 + (rx - '0'); else break; delay(5); } if (rx == '.') { easyvr.stop(); easyvr.playSound(num, EasyVR::VOL_DOUBLE); } } if (rx >= 0) { easyvr.stop(); Serial.flush(); return true; } return false; }
void loop() { checkMonitorInput();
easyvr.setPinOutput(EasyVR::IO1, HIGH); // LED on (listening) if (useCommands) { Serial.print("Say a command in Group "); Serial.println(group); easyvr.recognizeCommand(group); } else { Serial.print("Say a word in Wordset "); Serial.println(set); easyvr.recognizeWord(set); }
do { if (checkMonitorInput()) return; } while (!easyvr.hasFinished());
easyvr.setPinOutput(EasyVR::IO1, LOW); // LED off
int16_t idx = easyvr.getWord(); if (idx >= 0) { Serial.print("Word: "); Serial.print(easyvr.getWord()); Serial.print(" = "); if (useCommands) Serial.println(ws[group][idx]); else Serial.println(ws[set][idx]); // ok, let's try another set set++; if (set > 3) set = 0; easyvr.playSound(0, EasyVR::VOL_FULL); } else { idx = easyvr.getCommand(); if (idx >= 0) { Serial.print("Command: "); Serial.print(easyvr.getCommand()); if (easyvr.dumpCommand(group, idx, name, train)) { Serial.print(" = "); Serial.println(name); } else Serial.println(); // ok, let's try another group do { group++; if (group > EasyVR::PASSWORD) group = 0; } while (!((mask >> group) & 1)); easyvr.playSound(0, EasyVR::VOL_FULL); } else // errors or timeout { if (easyvr.isTimeout()) Serial.println("Timed out, try again..."); int16_t err = easyvr.getError(); if (err >= 0) { Serial.print("Error "); Serial.println(err, HEX); } } } }
Title: Re: arduino pop168 -popbot
Post by: kunaldgr8 on February 15, 2012, 09:09:54 AM