Loose tracks make for a softer ride, better traction and less friction on force bearing surfaces. I would not change the tension unless the tracks come off. This is the best robot build and product I have seen for robotics beginner to date. Great job.
I know some people say that they say they enjoy a channel and new video notifications, but I genuinely enjoy Explaining Computers on a Sunday night and was even thinking about it yesterday and the upcoming robot project. I think it's good enough to be part of an education curriculum and production/content value is ALWAYS 10/10. Another great vid, Chris!!
Watching you for a week or two now- i probably watch because you're well spoken... but i have to say this is a great unboxing vid. I appreciate the attention to quality and detail in the whole deal. Congrats if you didnt know you're good at what you do.
That metal one looks very robust. Now I want one for Christmas. Please. "A toy shouldn't break just because a child plays with it" - Tonka. I still have mine from 1972.
That is really cool looking! There are so many things that you could do with it. Like add on a camera and live stream from it. Some type of gun that shoots Nerf darts.. So many possibilities
I did the motor switch a bit differently by running the two poles to the enable jumpers on the L298N. For the wire leads on the motor, I cut off about half of the ends and crimped the remains a bit with Matthias the needle nose pliers. They fit nicely in the screw lugs on the L298N.
Thanks Chris you make your videos very interesting and explain them well. It is good that you point out the previous videos that can be accessed to find out more info.
So I have a ton of other projects started, but come across your devastator tank video. Love this build and hoping to do one myself. Just want my wife wants to hear,
Great project, I'm very excited for the next video! Would be interesting to try your mobile phone as an wi-fi access point, this way you would have a truly portable platform...
The next video is uploading as I type this! It releases here on Sunday, and covers lots of practical improvement stuff -- including running the control code on boot.
It's a very neat little tank robot, Chris. In general they don't get me very excited, though... I much prefer robotic arms as they seem more useful, but I look forward to see what you will do with yours! Oh, and how about a video on the current state of robotics, worldwide? That'd be cool...
Wonderful project! I find I get a lot more power to drive the motors by using LiPo batteries. E.g., my little Arduino robot now runs over carpet. Also they don't need to be removed, just recharged.
great video. but as long as it doesn't have some kind of autonomy it's an RC tank. hope to see some implementation of autonomy in future videos. would be really awesome
Suggested project: add either IR or Lidar (now getting affordable) so the robot tank can navigate without bumping into things and move with purpose instead of randomly.
If you loved building this then you would love putting together one of the Tamiya 1/16th scale RC tanks. I built a Pershing and the suspension parts and drive train / tracks look identical
Now that I've built it... yeah it's good for its price but I'm not so keen on the small parts of plastic that form the suspension. In particular as you have to use "wood screws" for some parts, e.g. to fix the wheels on their axles. Overturn any of these and that's it, there is no replacement part. Well you could still glue it in I guess. Another nitpick I have is how they fixed the lower body plate to the sides with only two screws, which makes it tip once you take the cover off, but for the cover you need 6 screws which is not ideal when you want to access the interior frequently. Overall I still like it, but not quite as euphoric as in my initial comment after I saw the video.
I don't remember is this your first robot? If so you are starting out with an excellent platform. Looking forward to the follow-up videos. Keep broadcasting!!
The Pi is being used to send control signals to the L298N motor controller. The motor controller is then powering the motors from its battery pack, turning them in the required direction when the Pi asks. The GPIO pins on a Raspberry Pi cannot provide the current to run a motor -- it would burn them out. This all said, it possible to use the motor controller to power the Pi as well as the motors -- which I cover in my second video in this series on Sunday (24 Dec 17).
is it the same for all smart robot? means, you have one separate power for the motor and one for the pi? unless, they have some kind of motor hats now that only need power from the pi? I'm actually waiting for my explorer hat. But, interested in getting beaglebone blue, for later. since it's got an all in one board with all the required motors. ALso, easier for building drone. Will you be doing videos for beaglebone blue? IT's videos are pretty limited. Definitely, would be great if you're doing it. :p
Yes, all controller boards use the board/computer to trigger a motor (or other) controller. Electronic devices are low current; motors are high current, and can also create nasty spikes that damage sensitive electronics. The HAT you have ordered looks a nice piece of kit, and will take its 5V power from the Pi's power output. But will not power motors (or anything else) directly from the Pi's GPIO pins The 5V pins on the Pi are technically not GPIO, and are wired before the Pi's voltage regulator -- so if you draw power from them, some power is still going to the Pi, while some is "diverted" to the motor controller before it ever gets to the Pi, as it were. Your hat will use signals from the Pi's GPIO pins to trigger its inbuilt H-Bridge motor controllers -- I see it can deliver up to 200mA each, and also up to 500mA across its four 5V outputs. So you need to take some care in what you connect. Just as a comparison, the L298N I use here (which offer less functionality that you multi-function HAT) can handle up to 4A at up to 46V, so is more suitable for controlling larger motors.
This is cool but I have the same question that I have about all track sets. I have bought dozens of track sets and nothing, no brand no type that I've ever seen is durable enough to use for a toy for even one day let alone durable enough to use for a robot. How durable are these tracks? Could this robot drive for a few miles unsupervised in the real world over pavement and random dirt and outdoor surfaces without the tracks having to be checked or repaired daily? Are they too fragile for real use?
You only have full on and full off on the motors. could you demonstrate with PWM how to make the left and right tracks have variable speeds from -100% to 100%? I've got the idea that you could use audio out to drive the left and right pwm signals...
When looking at the parts for the robot kit it was hard to judge the scale of them with the zoomed shots. Would it be possible to have a scale of some kind (ruler, L-shape scale, transparent scale or craft cutting board) in future kit projects to gauge the dimensions before/during construction so that we have an idea of the project size? A reference scale would also be advantageous with SBC's to give people an idea of board size. Thanks.
You are right, I must build something with the TinkerBoard. The strongest SBC under $200 is a difficult call -- though of those I have used it would be an UDOO x86 or LattePanda
Hi, I am enjoying your videos. I want to do the devastator tank following you lead but wonder for the future is something like a beagleboard gree which has built in wifi might be better. I plan to add 3-d camera and gps and want to trial a fixed route taking images of object encountered, Any suggestions appreciated Of course I might struggle with connectors.
Thanks for this. The Pi Zero W used here has built in WiFi. But for what you specify, you may want more processing power than a Pi Zero W offers! I will be returning to another video with this robot in September. :)
Thank you for all your Robot videos , my son and myself have just finish the Raspberry Pi Zero Zumo robot, we really like your helpful videos, I do have a question or two, how would I change the code to only move when a key is pressed and held, and one last one I promise, when my son takes the robot around his friends he has to set up the Wi-Fi network on the Pi to run the code, would it be possible to use a blue-tooth keyboard and run a macro to run the code without connecting to the Wi-Fi network?
I will be addressing these very issues -- running the code at boot, etc -- in my next robot video here. On the "move when a key pressed" thing, there is some code to do this included in comments on my Raspberry Pi Robotics#3 video, contributed by Inaflap. I've yet to try this yet, but here it is: from curses import wrapper import RPi.GPIO as GPIO #set GPIO numbering mode and define output pins GPIO.setmode(GPIO.BOARD) GPIO.setup(7,GPIO.OUT) GPIO.setup(11,GPIO.OUT) GPIO.setup(13,GPIO.OUT) GPIO.setup(15,GPIO.OUT) def main(myScreen): myScreen.clear() myScreen.keypad(True) myScreen.nodelay(True) #KEY_UP = 259, KEY_DOWN = 258, KEY_RIGHT = 261, KEY_LEFT = 260, ENTER = 10, q = 113 choice={ 259:"0101", 258:"1010", 261:"1001", 260:"0110", 10:"0000", 113:"0000" } char='' # two single quotes while ( char != 113 ): # q key stops all this nonsense char=myScreen.getch() if ( char > 0 ) : #nodelay is set, so -1 output on no press. chosen=choice.get(char) #lookup dictionary print(char, chosen) #this for debug only else : chosen="0000" # Set Pi's GPIO pins 7,11,13,and 15 according to dictionary GPIO.output(7,int(chosen[0:1])) GPIO.output(11,int(chosen[1:2])) GPIO.output(13,int(chosen[2:3])) GPIO.output(15,int(chosen[3:4])) GPIO.cleanup() wrapper(main) Show less
I will be addressing these very issues -- running the code at boot, etc -- in my next robot video here. On the "move when a key pressed" thing, there is some code to do this included in comments on my Raspberry Pi Robotics#3 video, contributed by Inaflap. I've yet to try this yet, but here it is: from curses import wrapper import RPi.GPIO as GPIO #set GPIO numbering mode and define output pins GPIO.setmode(GPIO.BOARD) GPIO.setup(7,GPIO.OUT) GPIO.setup(11,GPIO.OUT) GPIO.setup(13,GPIO.OUT) GPIO.setup(15,GPIO.OUT) def main(myScreen): myScreen.clear() myScreen.keypad(True) myScreen.nodelay(True) #KEY_UP = 259, KEY_DOWN = 258, KEY_RIGHT = 261, KEY_LEFT = 260, ENTER = 10, q = 113 choice={ 259:"0101", 258:"1010", 261:"1001", 260:"0110", 10:"0000", 113:"0000" } char='' # two single quotes while ( char != 113 ): # q key stops all this nonsense char=myScreen.getch() if ( char > 0 ) : #nodelay is set, so -1 output on no press. chosen=choice.get(char) #lookup dictionary print(char, chosen) #this for debug only else : chosen="0000" # Set Pi's GPIO pins 7,11,13,and 15 according to dictionary GPIO.output(7,int(chosen[0:1])) GPIO.output(11,int(chosen[1:2])) GPIO.output(13,int(chosen[2:3])) GPIO.output(15,int(chosen[3:4])) GPIO.cleanup() wrapper(main) Show less
Very helpful set of videos, have watched over this series a couple of times and taken a lot of inspiration from it. A few of my thoughts and questions: 1. Instead of pygame you could use pygame zero, lot more welcoming. Especially if you don't need the full feature set of pygame 2. Instead of using raw gpio, can use gpiozero. Many more features, including a "robot" object to handle the movement for you. Very useful in more complicated projects where you have to worry about more than just moving the robot. 3. Your wiring changed between the thin power bank, using the l298 output, and then the final thicker power bank. I didn't hear you talk about how you wired the l298n to power the zero. Or did you power it some other way?
Hey Christopher. I have an off-subject question. I have a retro-gaming frontend (BigBox) that you can change the startup video which is an mp4 about 20 sec long (Win10 Home 64 bit). Problem is, I want the song, sound bite of my choice for those few seconds. What freebee is out there that will do that (I suppose I could fire up a linux virtual machine as well)(I have Audacity) and thanks.
I am very close to getting the code working for this demo. But I have come upon a problem where I get a message saying setupterm cannot find terminal. I am running the code in the ide that comes with pi 0w. I have checked my code against yours over and over and it looks the same. I did have trouble at first as it did not occur to me python would be so sensitive to indents, but that all ok now. All the lights are on and the wheels are not turning spuriously as they were at first so I suspect something is running but when I press keys nothing happens. I didn't bother you but I looked at lots of stuff on Internet and could not find a solution
Ok I fixed that. I realised maybe it was not working in the IDE, so I saved the file to public and ran it from command line and its working now. The wheels are not turning quite right but I will work on that.
Great to hear that all is running OK now Tony. Computing and stuff like this can always be both a frustrating but then rewarding experience. Video three is now uploaded too -- and I will do number four in early 2019, adding speed control (using the same motor controller, so no new hardware needed for that).
Your videos are amazing but I still don't have a chance at doing this. Why is it all the videos like this explain something like screwing on a tire for 10 minutes and then when it comes to the wiring they skip past it and show a complicated chart or a vague explanation. Where can I figure out how to wire this pin by pin
The wiring here is shown in the diagram on this page -- www.explainingcomputers.com/rasp_pi_robotics.html -- the second diagram down. There are a fair few wires to add, but they can be built up one by one.
Yes, you can use another Pi, no problem. The second part of this series posts on 24 December. :) A security drone could indeed be made using SSH to control it (at least in part).
Nice video! I am also trying to make a robot tank using Devastator. I found one of the motors comes with the kit is slower than other at the same speed. Is it normal?
Have one of these but it will not turn left. When I contacted customer support I was told to order blinker fluid. I have looked everywhere but I can't find it!
Nice video! It would have been nice to have some sound effects. The next time please add some 'Vrrroooom - vrrrooooms' and a few 'Pew Pew Pews' while you are building it. Thank you.
Now put a banana pi in it, camera, proper power supply, and AI and a bunch of SSDs, and an internet and FM radio, and he can be a talking, music playing, roaming NAS : )
Loose tracks make for a softer ride, better traction and less friction on force bearing surfaces. I would not change the tension unless the tracks come off. This is the best robot build and product I have seen for robotics beginner to date. Great job.
I love this channel. From a young engineer to an experienced engineer, thanks for making these vids.
I know some people say that they say they enjoy a channel and new video notifications, but I genuinely enjoy Explaining Computers on a Sunday night and was even thinking about it yesterday and the upcoming robot project.
I think it's good enough to be part of an education curriculum and production/content value is ALWAYS 10/10.
Another great vid, Chris!!
Watching you for a week or two now- i probably watch because you're well spoken... but i have to say this is a great unboxing vid. I appreciate the attention to quality and detail in the whole deal. Congrats if you didnt know you're good at what you do.
Thanks. :)
good to meet you at tct yesterday. glad to see you liked the devastator instruction manual - some more of my work ;)
matt
Excellent!
I think I will buy this robot kit. It looks better than any of the other kits I've seen.
There's something so charming about the posh sounding British man saying "Today we'll be assembling the Devastator tank platform".
:)
Lol . Its official Chris ! - Nottingham is Posh 😂Well ill go t’Trent!!
@@Mike-tv9rk I'm in the rural US South. Any British accent except maybe west country is going to sound posh. :D
I always enjoy your videos. Thank you for all your hard work. You definitely have a fan in Vegas.
That metal one looks very robust. Now I want one for Christmas. Please.
"A toy shouldn't break just because a child plays with it" - Tonka. I still have mine from 1972.
Those metal gears look pretty solid
They are very solid, very heavy for their size. :)
Metal gear solid... I see what you did there :-)
I realy look forward to my E.C. Sundays. thanks for another great video!
That is really cool looking! There are so many things that you could do with it. Like add on a camera and live stream from it. Some type of gun that shoots Nerf darts.. So many possibilities
Great video.Looks like a great project for my grandson and I to build together.
An impressive piece of equipment. I look forward on how you reconfigure the electronics inside the body. Once again, an interesting video.
Really good video Chris, thanks. I'll get my wife to put it on the Christmas list. Loads of ways to add-on... Love it!
I did the motor switch a bit differently by running the two poles to the enable jumpers on the L298N. For the wire leads on the motor, I cut off about half of the ends and crimped the remains a bit with Matthias the needle nose pliers. They fit nicely in the screw lugs on the L298N.
Thanks Chris you make your videos very interesting and explain them well. It is good that you point out the previous videos that can be accessed to find out more info.
Great video Christopher, Im tempted to get one myself now and have a play around
Thanks for that. I've now got another idea for my final year project in college:) thumbs up
What is your major?
Glad you managed to stay on track and didn't tank it
:)
what a great video, thanks!
So I have a ton of other projects started, but come across your devastator tank video. Love this build and hoping to do one myself. Just want my wife wants to hear,
I love these robot videos! Thanks for making these.
This channel has excellent insight on Robotics :')
i love your unboxings, it's seems like a somewhat panicky experience for you :)
True! They are generally not (easily) repeatable takes, and with the larger boxes I am always aware of not opening one up to hit my microphone.
Great project, I'm very excited for the next video!
Would be interesting to try your mobile phone as an wi-fi access point, this way you would have a truly portable platform...
The next video is uploading as I type this! It releases here on Sunday, and covers lots of practical improvement stuff -- including running the control code on boot.
Great video, please post more on this soon!
As a young child i'd have loved a kit like that !
I suggest the of the keyboard to be linked to launch rockets now
Fun build. Mount a cup holder on it so it can bring you a drink! 😁
Nice looking kit criss
It's a very neat little tank robot, Chris. In general they don't get me very excited, though... I much prefer robotic arms as they seem more useful, but I look forward to see what you will do with yours!
Oh, and how about a video on the current state of robotics, worldwide? That'd be cool...
You mean like "Johnny 5" from the movie "Short Circuit"?
A video on the current state of robotics is on my list -- for reasons that will become clear . . .
Another fantastic video!! Thank you so much
Wonderful project! I find I get a lot more power to drive the motors by using LiPo batteries. E.g., my little Arduino robot now runs over carpet. Also they don't need to be removed, just recharged.
Yes, I plan to get a LiPo pack for this, and hopefully also a voltage regulator to run the Pi off the same batteries.
Amazing robot! :0
I'm looking forward to see what will be the next feature you'll add to this machine. Please do!
great video. but as long as it doesn't have some kind of autonomy it's an RC tank. hope to see some implementation of autonomy in future videos. would be really awesome
thats good! . that would be something i would like adapt to a lawnmower in the future
that robot looks actually awesome, perhaps a PWM control or some routines for the next video?
Suggested project: add either IR or Lidar (now getting affordable) so the robot tank can navigate without bumping into things and move with purpose instead of randomly.
Hope to see another video real soon. Tangobaldy
You could maybe get one of those cheap little right angle USB adapters to let you rotate the battery 90 degrees to fit inside the case better.
as usual... a great informative video. THANKS!
Thats some big motors
Great video could you plz upload more videos of this series
Yes, I will! I currently plan to post another video before the end of 2017.
For me the unboxing parts of your videos are boring, but I enjoy the rest! Thanks!
Oh well, just skip through the unboxing part! And there are no unboxings for the next three weeks . . .
ExplainingComputers
Great news! 😉
Tanks for another awesome video!!
I saw what you did there. lol.
If you loved building this then you would love putting together one of the Tamiya 1/16th scale RC tanks. I built a Pershing and the suspension parts and drive train / tracks look identical
The wheels, suspension, sprockets and track are all from the Heng Long M26 Pershing
Good video, and explanation.
Awesome. I just found this channel, looks like I've got a lot of catching up to do.
Great! Add a camera to it and you'll have a ground drone that you can probably use to scout outside your house.
OK Done that and ready for the next bit! 😁
I really enjoyed the video. But I am wondering if the video is sponsored? At some moments it kind of seems a bit like an ad.
Not sponsored. None of my videos are sponsored.
Alright thank you very much for letting me know!
Nice vidéo! Now i want to buil mine.
Now that I've built it... yeah it's good for its price but I'm not so keen on the small parts of plastic that form the suspension. In particular as you have to use "wood screws" for some parts, e.g. to fix the wheels on their axles. Overturn any of these and that's it, there is no replacement part. Well you could still glue it in I guess. Another nitpick I have is how they fixed the lower body plate to the sides with only two screws, which makes it tip once you take the cover off, but for the cover you need 6 screws which is not ideal when you want to access the interior frequently. Overall I still like it, but not quite as euphoric as in my initial comment after I saw the video.
I don't remember is this your first robot? If so you are starting out with an excellent platform. Looking forward to the follow-up videos. Keep broadcasting!!
DFRobot also sponsored me to build a laser shooting robot tank game! My videos will be coming out sometime in October
Please share a link here when the video is available.
here's part 1/3: ruclips.net/video/ynEbJMJVL7A/видео.html it's also up on hackster.io at www.hackster.io/gatoninja236/laser-shootin-robot-defad0
i'm a little confused about the battery pack. Aren't you controlling the motor with the pi? And using the power from the pi?
The Pi is being used to send control signals to the L298N motor controller. The motor controller is then powering the motors from its battery pack, turning them in the required direction when the Pi asks. The GPIO pins on a Raspberry Pi cannot provide the current to run a motor -- it would burn them out. This all said, it possible to use the motor controller to power the Pi as well as the motors -- which I cover in my second video in this series on Sunday (24 Dec 17).
is it the same for all smart robot? means, you have one separate power for the motor and one for the pi? unless, they have some kind of motor hats now that only need power from the pi? I'm actually waiting for my explorer hat. But, interested in getting beaglebone blue, for later. since it's got an all in one board with all the required motors. ALso, easier for building drone. Will you be doing videos for beaglebone blue? IT's videos are pretty limited. Definitely, would be great if you're doing it. :p
Yes, all controller boards use the board/computer to trigger a motor (or other) controller. Electronic devices are low current; motors are high current, and can also create nasty spikes that damage sensitive electronics. The HAT you have ordered looks a nice piece of kit, and will take its 5V power from the Pi's power output. But will not power motors (or anything else) directly from the Pi's GPIO pins The 5V pins on the Pi are technically not GPIO, and are wired before the Pi's voltage regulator -- so if you draw power from them, some power is still going to the Pi, while some is "diverted" to the motor controller before it ever gets to the Pi, as it were. Your hat will use signals from the Pi's GPIO pins to trigger its inbuilt H-Bridge motor controllers -- I see it can deliver up to 200mA each, and also up to 500mA across its four 5V outputs. So you need to take some care in what you connect. Just as a comparison, the L298N I use here (which offer less functionality that you multi-function HAT) can handle up to 4A at up to 46V, so is more suitable for controlling larger motors.
I feel like luke learning from a jedi master. Tq, master! I will follow your teaching. Looking forward to your video this sunday!
I Love this subject of videos (building robots)
Another Great Video. Thank you for making this! - Mr. Scissors @ 2:15
Nice knoling!
This is cool but I have the same question that I have about all track sets.
I have bought dozens of track sets and nothing, no brand no type that I've ever seen is durable enough to use for a toy for even one day let alone durable enough to use for a robot.
How durable are these tracks? Could this robot drive for a few miles unsupervised in the real world over pavement and random dirt and outdoor surfaces without the tracks having to be checked or repaired daily? Are they too fragile for real use?
Really hope to see a part 2 with a pi camera install . What is the range from keyboard ? Great work ! Thanks for sharing
You only have full on and full off on the motors. could you demonstrate with PWM how to make the left and right tracks have variable speeds from -100% to 100%? I've got the idea that you could use audio out to drive the left and right pwm signals...
When looking at the parts for the robot kit it was hard to judge the scale of them with the zoomed shots.
Would it be possible to have a scale of some kind (ruler, L-shape scale, transparent scale or craft cutting board) in future kit projects to gauge the dimensions before/during construction so that we have an idea of the project size?
A reference scale would also be advantageous with SBC's to give people an idea of board size.
Thanks.
Good point -- noted.
Great build!
I think the BBC should give you a TV series devoted to Pi stuff. You know, like Ian McNaught-Davis presented the BBC Micro on The Computer Programme
I think so too!
Can you please make some stuff with the asus tinker Board? What is the currently strongest Single board computer under 200$?
You are right, I must build something with the TinkerBoard. The strongest SBC under $200 is a difficult call -- though of those I have used it would be an UDOO x86 or LattePanda
ExplainingComputers Thanks Christopher
I LOVE THE ROBOT VIDEOS!!!!!!
Thank you! Great video
Hi, I am enjoying your videos. I want to do the devastator tank following you lead but wonder for the future is something like a beagleboard gree which has built in wifi might be better. I plan to add 3-d camera and gps and want to trial a fixed route taking images of object encountered, Any suggestions appreciated Of course I might struggle with connectors.
Thanks for this. The Pi Zero W used here has built in WiFi. But for what you specify, you may want more processing power than a Pi Zero W offers! I will be returning to another video with this robot in September. :)
👍👍👍👍👍Ha ha ha ha ha...
I'm 5 years late; found this piece from your video in 2022oct09.
Very fun & interesting though😊
You go, boy!! Lol. That looks like soooooo much fun to this, "full - blown, hillbilly super nerd!!" - Cheers!
Thank you for all your Robot videos , my son and myself have just finish the Raspberry Pi Zero Zumo robot, we really like your helpful videos, I do have a question or two, how would I change the code to only move when a key is pressed and held, and one last one I promise, when my son takes the robot around his friends he has to set up the Wi-Fi network on the Pi to run the code, would it be possible to use a blue-tooth keyboard and run a macro to run the code without connecting to the Wi-Fi network?
I will be addressing these very issues -- running the code at boot, etc -- in my next robot video here. On the "move when a key pressed" thing, there is some code to do this included in comments on my Raspberry Pi Robotics#3 video, contributed by Inaflap. I've yet to try this yet, but here it is:
from curses import wrapper
import RPi.GPIO as GPIO
#set GPIO numbering mode and define output pins
GPIO.setmode(GPIO.BOARD)
GPIO.setup(7,GPIO.OUT)
GPIO.setup(11,GPIO.OUT)
GPIO.setup(13,GPIO.OUT)
GPIO.setup(15,GPIO.OUT)
def main(myScreen):
myScreen.clear()
myScreen.keypad(True)
myScreen.nodelay(True)
#KEY_UP = 259, KEY_DOWN = 258, KEY_RIGHT = 261, KEY_LEFT = 260, ENTER = 10, q = 113
choice={ 259:"0101", 258:"1010", 261:"1001", 260:"0110", 10:"0000", 113:"0000" }
char='' # two single quotes
while ( char != 113 ): # q key stops all this nonsense
char=myScreen.getch()
if ( char > 0 ) : #nodelay is set, so -1 output on no press.
chosen=choice.get(char) #lookup dictionary
print(char, chosen) #this for debug only
else :
chosen="0000"
# Set Pi's GPIO pins 7,11,13,and 15 according to dictionary
GPIO.output(7,int(chosen[0:1]))
GPIO.output(11,int(chosen[1:2]))
GPIO.output(13,int(chosen[2:3]))
GPIO.output(15,int(chosen[3:4]))
GPIO.cleanup()
wrapper(main)
Show less
I will be addressing these very issues -- running the code at boot, etc -- in my next robot video here. On the "move when a key pressed" thing, there is some code to do this included in comments on my Raspberry Pi Robotics#3 video, contributed by Inaflap. I've yet to try this yet, but here it is:
from curses import wrapper
import RPi.GPIO as GPIO
#set GPIO numbering mode and define output pins
GPIO.setmode(GPIO.BOARD)
GPIO.setup(7,GPIO.OUT)
GPIO.setup(11,GPIO.OUT)
GPIO.setup(13,GPIO.OUT)
GPIO.setup(15,GPIO.OUT)
def main(myScreen):
myScreen.clear()
myScreen.keypad(True)
myScreen.nodelay(True)
#KEY_UP = 259, KEY_DOWN = 258, KEY_RIGHT = 261, KEY_LEFT = 260, ENTER = 10, q = 113
choice={ 259:"0101", 258:"1010", 261:"1001", 260:"0110", 10:"0000", 113:"0000" }
char='' # two single quotes
while ( char != 113 ): # q key stops all this nonsense
char=myScreen.getch()
if ( char > 0 ) : #nodelay is set, so -1 output on no press.
chosen=choice.get(char) #lookup dictionary
print(char, chosen) #this for debug only
else :
chosen="0000"
# Set Pi's GPIO pins 7,11,13,and 15 according to dictionary
GPIO.output(7,int(chosen[0:1]))
GPIO.output(11,int(chosen[1:2]))
GPIO.output(13,int(chosen[2:3]))
GPIO.output(15,int(chosen[3:4]))
GPIO.cleanup()
wrapper(main)
Show less
Thank you, we will give it a go :)
Very helpful set of videos, have watched over this series a couple of times and taken a lot of inspiration from it. A few of my thoughts and questions:
1. Instead of pygame you could use pygame zero, lot more welcoming. Especially if you don't need the full feature set of pygame
2. Instead of using raw gpio, can use gpiozero. Many more features, including a "robot" object to handle the movement for you. Very useful in more complicated projects where you have to worry about more than just moving the robot.
3. Your wiring changed between the thin power bank, using the l298 output, and then the final thicker power bank. I didn't hear you talk about how you wired the l298n to power the zero. Or did you power it some other way?
Classic tech guy response to a nice-looking manual: "I might have to read that."
All you need is a mini amp and small speakers; you'll be cruising in style.
Could you mount a KSR10 robot arm from velleman on top of your robot?
I may well mount a robot arm -- the Devastator can take up to a 3kg payload.
Now you've done it. You'll be hooked.
:)
Great video as always. Any plans to build self balancing robot ? Have been waiting for a long time if you would please.
It was not on my list -- but is now! I know that James Bruton with his XRobots channel has done some amazing projects like that.
Nice video, thanks!
Hey Christopher. I have an off-subject question. I have a retro-gaming frontend (BigBox) that you can change the startup video which is an mp4 about 20 sec long (Win10 Home 64 bit). Problem is, I want the song, sound bite of my choice for those few seconds. What freebee is out there that will do that (I suppose I could fire up a linux virtual machine as well)(I have Audacity) and thanks.
are the tracks gripy enough to fight aginst strong robots
They are made of solid plastic sections, so are not as grippy as they could be if made of rubber or simular.
I am very close to getting the code working for this demo. But I have come upon a problem where I get a message saying setupterm cannot find terminal. I am running the code in the ide that comes with pi 0w. I have checked my code against yours over and over and it looks the same. I did have trouble at first as it did not occur to me python would be so sensitive to indents, but that all ok now. All the lights are on and the wheels are not turning spuriously as they were at first so I suspect something is running but when I press keys nothing happens. I didn't bother you but I looked at lots of stuff on Internet and could not find a solution
Ok I fixed that. I realised maybe it was not working in the IDE, so I saved the file to public and ran it from command line and its working now. The wheels are not turning quite right but I will work on that.
Ok I have got this bit running OK...yeah! now to the second video and instructions
Great to hear that all is running OK now Tony. Computing and stuff like this can always be both a frustrating but then rewarding experience. Video three is now uploaded too -- and I will do number four in early 2019, adding speed control (using the same motor controller, so no new hardware needed for that).
Neet project, thank you.
Your videos are amazing but I still don't have a chance at doing this. Why is it all the videos like this explain something like screwing on a tire for 10 minutes and then when it comes to the wiring they skip past it and show a complicated chart or a vague explanation. Where can I figure out how to wire this pin by pin
The wiring here is shown in the diagram on this page -- www.explainingcomputers.com/rasp_pi_robotics.html -- the second diagram down. There are a fair few wires to add, but they can be built up one by one.
Excellent video. Would this work utilizing a Raspberry Pi3 and a Raspirobot V3 board?
Thx 4 the video. I love it!
Wowww Amazing, I have a question:
Can you use aldo a regular TX like a taranis for pilot It?
I can also custom built. Let's see what we come up with? It's all purpose! Garden hose, fire fighter, runner, shooter, etc.!
Thanks for sharing 😀👍
What motor controller would I use for four motors?
You could use two L298Ns!
2 questions. Can you use a different Raspberry Pi?? Also can in the future make to a security drone using SSH??
Yes, you can use another Pi, no problem. The second part of this series posts on 24 December. :) A security drone could indeed be made using SSH to control it (at least in part).
ExplainingComputers - Can SSH work long range
I would rather have the moving parts metal than panels. Those gears connected to motor don't look robust. If I had chance, of course.
Nice video! I am also trying to make a robot tank using Devastator. I found one of the motors comes with the kit is slower than other at the same speed. Is it normal?
Great vid! I loved it
Have one of these but it will not turn left. When I contacted customer support I was told to order blinker fluid. I have looked everywhere but I can't find it!
Nice video! It would have been nice to have some sound effects. The next time please add some 'Vrrroooom - vrrrooooms' and a few 'Pew Pew Pews' while you are building it. Thank you.
Now put a banana pi in it, camera, proper power supply, and AI and a bunch of SSDs, and an internet and FM radio, and he can be a talking, music playing, roaming NAS : )
Sir or mam can we control this from anywhere in the world please answer my question is will be very useful for me
It does, it does look like a thing!! EC was right!