ArduPi Webcam Tankbot

RPi Internet Rover Arduino Code?

After a little hiatus I’m taking another crack at the Johnny-Five configuration.  So I took a look at the aformentioned RPi Internet Rover tutorial at- http://www.linuxcircle.com/2013/02/28/raspberry-internet-rover-part-1-robotics/ where they were thorough enough to include the entire Arduino code.  The only problem is some of the formatting must’ve got screwed up along the way because when I try to compile in Arduino it returns a bunch of minor syntax errors.

   I’ve been using codebender.cc so the project is online-

 


http://codebender.cc/embed/sketch:8032

 

 I can’t figure out if its just sloppy coding, or if it just loses the formatting along the way somewhere…  Either way I can’t seem to find a Github page or any other example of this sketch. 

 

 Can Anybody else figure out what’s going wrong?

 

 

New Android App

  I found this great Android App for Bluetooth control…  http://www.plastibots.com/index.php/2013/03/07/btbotcontrol/

It includes an example Arduino Sketch with some fancy xy string data stuff to drive it from a virtual joystick, but best of all it includes a window to view the image from the ip camera directly!

Of course, I should probably see if it actually works on my bot first…  I’ll post the results once I give it a shot

LinuxCircle format is ok

Hi there,

I’ve tried the code and it works perfectly fine. I think is just because of the quote sign of the strings and chars such as ", ', and ` could be displayed incorrectly. Try copy the code into plain text format, to rid off Wordpress pre-format, before copying it into Arduino IDE

They also submitted an ever newer version which includes interaction with sensor and piezo buzzer:

http://www.linuxcircle.com/2013/04/01/the-complete-arduino-sketch-for-rasinro-internet-rover/

The guys at Linux Circle have done their home work so well. They really made my day!

By the way, can you please post what syntax errors you were getting here?

 

Syntax Errors-

 

I’ll create a new project before making the changes you suggested so the log can use the original link as a reference-

   This is the Error Log-

 

RPiBot.ino:9:1: error: expected expression
“Up Key OK“,
^
RPiBot.ino:15:1: error: expected expression
“Start loop“};
^
RPiBot.ino:45:16: error: expected expression
Serial.println(“led1 off”);
^
RPiBot.ino:48:16: error: expected expression
Serial.println(“led1 on”);
^
RPiBot.ino:58:16: error: expected expression
Serial.println(“led2 off”);
^
RPiBot.ino:61:16: error: expected expression
Serial.println(“led2 on”);
^
RPiBot.ino:70:16: error: expected expression
Serial.println(“led 3 off”);
^
RPiBot.ino:73:16: error: expected expression
Serial.println(“led 3 on”);
^
RPiBot.ino:83:16: error: expected expression
Serial.println(“led 4 off”);
^
RPiBot.ino:86:16: error: expected expression
Serial.println(“led 4 on”);
^
RPiBot.ino:164:16: error: expected expression
Serial.println(“Run keyboard control”);
^
RPiBot.ino:169:16: error: expected expression
Serial.println(“Light %sk is ready!”);
^
RPiBot.ino:179:27: error: expected ‘)’
for (int l = 11; l >= 8; l–)
^
RPiBot.ino:179:5: note: to match this ‘(’
for (int l = 11; l >= 8; l–)
^
RPiBot.ino:188:27: error: expected ‘)’
for (int l = 11; l >= 8; l–)
^
RPiBot.ino:188:5: note: to match this ‘(’
for (int l = 11; l >= 8; l–)
^
RPiBot.ino:195:27: error: expected ‘)’
for (int l = 11; l >= 8; l–)
^
RPiBot.ino:195:5: note: to match this ‘(’
for (int l = 11; l >= 8; l–)
^
RPiBot.ino:258:6: error: expected expression
case ‘w’://Move Forward
^
RPiBot.ino:260:16: error: expected expression
Serial.println(“Forward”);
^
RPiBot.ino:263:6: error: expected expression
case ‘x’://Move Backward
^
RPiBot.ino:265:16: error: expected expression
Serial.println(“Reverse”);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

 

More errors with Plain Text too

Tried copying in plain text like you suggested http://codebender.cc/sketch:8186

 and got the following errors-

 

RPiBotplaintext.ino:9:1: error: expected expression
“Up Key OK “,
^
RPiBotplaintext.ino:15:1: error: expected expression
“Start loop “};
^
RPiBotplaintext.ino:45:16: error: expected expression
Serial.println(“led 1 off”);
^
RPiBotplaintext.ino:48:16: error: expected expression
Serial.println(“led 1 on”);
^
RPiBotplaintext.ino:58:16: error: expected expression
Serial.println(“led 2 off”);
^
RPiBotplaintext.ino:61:16: error: expected expression
Serial.println(“led 2 on”);
^
RPiBotplaintext.ino:70:16: error: expected expression
Serial.println(“led 3 off”);
^
RPiBotplaintext.ino:73:16: error: expected expression
Serial.println(“led 3 on”);
^
RPiBotplaintext.ino:83:16: error: expected expression
Serial.println(“led 4 off”);
^
RPiBotplaintext.ino:86:16: error: expected expression
Serial.println(“led 4 on”);
^
RPiBotplaintext.ino:164:16: error: expected expression
Serial.println(“Run keyboard control”);
^
RPiBotplaintext.ino:169:16: error: expected expression
Serial.println(“Light %sk is ready!”);
^
RPiBotplaintext.ino:179:27: error: expected ‘)’
for (int l = 11; l >= 8; l–)
^
RPiBotplaintext.ino:179:5: note: to match this ‘(’
for (int l = 11; l >= 8; l–)
^
RPiBotplaintext.ino:188:27: error: expected ‘)’
for (int l = 11; l >= 8; l–)
^
RPiBotplaintext.ino:188:5: note: to match this ‘(’
for (int l = 11; l >= 8; l–)
^
RPiBotplaintext.ino:195:27: error: expected ‘)’
for (int l = 11; l >= 8; l–)
^
RPiBotplaintext.ino:195:5: note: to match this ‘(’
for (int l = 11; l >= 8; l–)
^
RPiBotplaintext.ino:258:6: error: expected expression
case ‘w’://Move Forward
^
RPiBotplaintext.ino:260:16: error: expected expression
Serial.println(“Forward”);
^
RPiBotplaintext.ino:263:6: error: expected expression
case ‘x’://Move Backward
^
RPiBotplaintext.ino:265:16: error: expected expression
Serial.println(“Reverse”);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

 

Rasinro source code

Just download the plain text file from here and do not modify it

http://www.linuxcircle.com/2013/04/01/the-complete-arduino-sketch-for-rasinro-internet-rover/

Another sister project…

This particular project has the same idea for a battery docking station and Pan/Tilt capability-

http://www.bot-thoughts.com/2013/04/raspberry-pi-telepresence-rover.html

https://code.google.com/p/bot-thoughts-blog/source/browse/#svn%2Ftrunk%2FRPiTeleRover

Project Update- 4/28/13

  Added an InfraRed WebCam for nightviewing.  Also got a new TL-WR703N Mini-Router to flash with this OpenWRT Webcam script-  http://shackspace.de/?p=3772.  This will require far less power and space than the Raspberry Pi when not controlling via web interface.  

   Most significant though is I managed to get a hold of the fantastic DFRobot Shop Rover V2 as just the PCB and side frames from RobotShop.com.  Have to say I’ve been really impressed with those guys!  They responded to a customer service ticket with a detailed price quote even though it was clear from the outset the order wouldn’t be over $100…  Nice to find a supplier with good support like that…  Now I’ve just got to count the days till UPS gets here…

Guess I shouldve got the “Twin” gearbox instead of the "Double"

  After all the excitement over finally getting my new robot controller/chassis from RobotShop today I forgot that theres about an 1/8 in. difference between the Tamiya “Double” Motor Gearbox (which I have) and the Tamiya “Twin” Motor Gearbox (which I don’t have) and thats enough to render it useless…   Grrrr…  I guess its back to tge ordering form…

    If any folks have managed to rig a Tamiya “Double” Motor Gearbox to the DFRobotShop Rover V2. Chassis then please do save my weekend!

New Digs for the Ardu-Pi!

Finally decided to take things up a notch and got a DFRobot Rover v2.2 PCB and chassis for the bot and thus far have had no regrets!  There was a certain degree of satisfaction knowing that the bot had been built from scratch, but the Rover design is pretty ingenius and not something that would be all that easy to replicate (at least not until some of the proposed FabLabs/Maker Spaces open up around here…).

 

https://picasaweb.google.com/lh/photo/nCbFZNVidfeBRsIH7YWmc9MTjNZETYmyPJy0liipFm0?feat=directlink  

 

 

 

Taking another stab at webcontrol…

So after a long hiatus (partially due to picky Arduino drivers on my Ubuntu machine/partially due to the lack of new features being added to the Johnny5 Library) I’m taking another stab at controlling the rover from a web-based interface…  

There are several recent developments in the realm of embedded linux that open up new possibilities for this project.

   1. Beaglebone Black-  BB has always been out there for those looking for more punch than an Arduino can provide.  But at over $100 it was pretty much limited to experts and/or professionals willing to make the investment.  With the BBB they are providing similar functionality to the original, but by bringing the price down to $45, they are now a legitimate competitor for the Raspberry Pi/MicroPC space.  For my own project needs the BBB appeals through its combination of computing power (enough to run Ubuntu or Android) and the equivalent of two 32Bit Micrcontrollers.  Most importantly is the fact that it runs on node.js by default so no more need for installing node on the Pi…  The biggest drawback so far is the tiny developer community in comparison with Arduino or RPi.  Hopefully this will change with time, but the manufacturers have to be more proactive in making it more accessible to the average Arduino/Pi user.  As it stands now its very difficult to find other projects using the BBB in robotics, even though theres no shortage of articles claiming how perfectly suited it is.

  2. pcDuino/other Android-based MiniPCs-  Maker Blogs were all over these Chinese-made Allwinner A10-based Android sticks a year ago as “Raspberry Pi Killers”…  Well… the RPi seems to be alive and well the last I checked, and the reason again comes down to RPi’s understanding of documentation and community building.  The A10 MiniPCs on the other hand often come from generic manufacturers with no documentation whatsoever.  A major exception can be found through sparkfun.com and is known as the pcDuino (http://www.pcduino.com/).  The pcDuino is based on an A10 chip, but also includes a UART and headers to interface directly with Arduino shields.  It ships with Ubuntu by default but can also boot Ubuntu or anything other Linux Distro.  While probably not as sturdy as a BBB, I’ve found knowledge gained from using Arduino and the RPi translates well.  Compared to the Pi, it works much better with Arduino which means users wouldnt have to learn an entirely new language like on the BBB.  Major drawbacks are its reliance on a cheap Chinese chipset and buggy interface.  Overall I’d put my money on the pcDuino for the short term and the BBB in the long term.

 3. Arduino Yun-  Despite vague promises of a release date in June, this board has yet to be released (as of 7/30/13).  Nevertheless, it shows great promise!  Not only is it a sub-$100 wifi shield for the Arduino, but it includes a Linux “system-on-a-chip” Who knows what the future will bring, but IMHO the YUN exemplifies all the qualities that made Arduino so dominant in the maker world in the first place.  Rather than try to compete with the RPi and MiniPCs they come up with something that builds on their strengths while providing new capabilities.  I’ll definitely be watching this one closely…

 4. Ouya (?) - Admittedly an unconventional use case for a game console, but the Android platform is already playing double duty as a robotics client (see- http://www.bitcraze.se/2013/07/crazyflie-and-android/) and with the controller alone providing a potential wireless gamepad option (whereas proprietary controllers often require confusing bluetooth configurations…). Usage as a home automation dashboard is already well underway, so robotics applications should not be too much of a stretch… 

 5. Raspberry Pi Camera Module  While not as much of a departure from the original project goal, the RPi Camera module nonetheless adds new capabilities by connecting through the CSI bridge directly to the RPi rather than through a USB port.  This would allow room for a wifi dongle, and communication to Arduino directly through the USB instead of through the GPIO.  Still the module has its limitations in the fragile nature of its thin connection band.  This would probably prevent use of the servo turret…