[00:00] (0.20s)
this is a Roomba the iconic Robot vacuum
[00:03] (3.60s)
that usually ends up in the back of the
[00:05] (5.40s)
closet collecting dust or being sold on
[00:07] (7.68s)
Marketplace for $20 but there's so much
[00:10] (10.08s)
potential in these things Motors sensors
[00:12] (12.52s)
a whole robot just waiting to be hacked
[00:14] (14.92s)
what if we could make it go faster see
[00:17] (17.24s)
through its eyes and reprogram the whole
[00:19] (19.36s)
thing using a $7 Raspberry Pi everyone's
[00:22] (22.24s)
building apps and websites and they all
[00:24] (24.92s)
kind of look and feel the same and
[00:26] (26.72s)
everyone's using the same AI tools and
[00:29] (29.00s)
having AI generate most of the code but
[00:31] (31.32s)
with Hardware it's different you can't
[00:33] (33.28s)
just prompt your way around this stuff
[00:35] (35.64s)
you've really got to get in there and
[00:37] (37.60s)
break things and figure out how it works
[00:40] (40.40s)
you could hack your coffee machine so
[00:42] (42.12s)
that you can text it to brew you coffee
[00:44] (44.04s)
or control an RC car through a web
[00:46] (46.48s)
browser or just take apart a RBA because
[00:48] (48.52s)
some guy on the internet said it was a
[00:50] (50.00s)
good idea because that's where the real
[00:51] (51.96s)
fun is coding something different this
[00:54] (54.84s)
is the Rumba motherboard that controls
[00:57] (57.16s)
everything on the Rumba and it's plugged
[00:59] (59.16s)
into the the speaker and the charger and
[01:02] (62.96s)
a whole bunch of infrared and liar and
[01:06] (66.00s)
other sensors but we are going to
[01:07] (67.84s)
completely unplug this from everything
[01:10] (70.68s)
and get rid of it because we are going
[01:12] (72.88s)
to use a Raspberry Pi Pico and control
[01:16] (76.20s)
everything using python at least that's
[01:19] (79.24s)
the plan good thing we have no one
[01:20] (80.28s)
underneath us on the other side of the
[01:22] (82.28s)
rber if we look underneath well first
[01:25] (85.20s)
there's the battery and I really should
[01:26] (86.92s)
have taken this thing out first and then
[01:29] (89.20s)
we can see the these four Motors there's
[01:31] (91.32s)
the two motors for the wheels there's
[01:34] (94.12s)
this brush motor thing and then there's
[01:36] (96.56s)
the main motor that actually controls
[01:38] (98.56s)
this thing vacuuming and the first thing
[01:40] (100.52s)
I want to do is try and see if we can
[01:42] (102.92s)
control these motors so here is one of
[01:45] (105.88s)
the wheel Motors and if we take a look
[01:48] (108.32s)
inside of this if you can look past the
[01:50] (110.56s)
dirt you can see there's a couple of
[01:52] (112.20s)
wires here that detect whether the wheel
[01:54] (114.76s)
is actually on the ground or not there's
[01:56] (116.88s)
a few wires coming out of the motor
[01:58] (118.92s)
itself to tell how much the wheel has
[02:01] (121.36s)
actually turned and we can figure out
[02:03] (123.12s)
how to work with all of these sensors a
[02:04] (124.96s)
little bit later on but for now all we
[02:08] (128.44s)
need are these red and black wires that
[02:11] (131.08s)
are coming out of the motor because if
[02:12] (132.96s)
we connect just these two wires to a
[02:15] (135.88s)
battery then the motor will turn and if
[02:19] (139.08s)
I flip around the battery then the motor
[02:21] (141.64s)
turns in the opposite direction and this
[02:24] (144.00s)
battery is around 4 volts so it spinning
[02:26] (146.52s)
kind of slow but if I take four of these
[02:28] (148.84s)
and link them up in series then I now
[02:31] (151.00s)
have a 16vt battery and we get a motor
[02:33] (153.68s)
that turns way faster so Motors aren't
[02:36] (156.52s)
that difficult to control and that's
[02:38] (158.36s)
where we're going to start make a remote
[02:40] (160.12s)
control vacuum just by controlling these
[02:42] (162.92s)
four Motors we're going to be using the
[02:44] (164.88s)
raspberry pi peo to try and control the
[02:47] (167.56s)
RBA because it is a $7 microcontroller
[02:51] (171.28s)
really cheap that supports micropython
[02:53] (173.80s)
and it has all of these pins on the
[02:55] (175.84s)
outside these gpio pins that means that
[02:58] (178.24s)
we can write some code that that
[03:00] (180.12s)
interacts with things in the real world
[03:02] (182.12s)
it supports C and C++ and some other
[03:04] (184.60s)
languages but if I Google programming a
[03:07] (187.32s)
Raspberry Pi Pico Raspberry Pi has a
[03:10] (190.20s)
decent amount of documentation on how to
[03:12] (192.16s)
get started just writing some basic
[03:13] (193.92s)
python to control things so we'll start
[03:15] (195.80s)
simple I have this Pico already set up
[03:18] (198.28s)
with an LED plugged into pin 17 I should
[03:21] (201.04s)
be able to run just a little bit of
[03:23] (203.84s)
python code to set up my LED on pin 17
[03:28] (208.00s)
which is where I've got it plugged in
[03:29] (209.40s)
right now if I toggle this pin now it
[03:31] (211.84s)
should light up that led and if I toggle
[03:33] (213.80s)
it again yeah every time I toggle it on
[03:36] (216.04s)
it's sending 3.3 volts through that led
[03:38] (218.92s)
to light it up and then when I toggle it
[03:40] (220.76s)
again it just turns it off and we're
[03:42] (222.24s)
basically going to do the exact same
[03:44] (224.04s)
thing but instead of a light we're going
[03:45] (225.88s)
to make a motor turn and I also have
[03:47] (227.56s)
this python script here it's going to
[03:49] (229.24s)
loop around and it's going to increase
[03:51] (231.16s)
the brightness of the LED gradually and
[03:52] (232.76s)
then decrease it back down so if we run
[03:55] (235.36s)
this we should see yeah you can kind of
[03:57] (237.48s)
yeah you can definitely see that the LED
[03:59] (239.04s)
is getting bright and then it's going
[04:01] (241.08s)
back down and getting dimmer so again we
[04:02] (242.80s)
can use this exact same technique to
[04:05] (245.12s)
increase and decrease the speed of the
[04:06] (246.96s)
motors but we can't just plug the motor
[04:10] (250.04s)
directly in where this led is because
[04:12] (252.36s)
the Pico isn't going to supply enough
[04:14] (254.20s)
power to the motor it doesn't have
[04:15] (255.36s)
enough current or voltage to make the
[04:17] (257.16s)
motors turn so instead what we're going
[04:19] (259.44s)
to do is we're going to add in this
[04:22] (262.12s)
battery pack we could use the rumber
[04:24] (264.00s)
battery pack if it still worked but mine
[04:26] (266.00s)
was completely dead so I'm just going to
[04:27] (267.88s)
use this custom one for now but we take
[04:29] (269.96s)
that battery pack and we plug it into
[04:31] (271.80s)
this motor controller and then we can
[04:33] (273.68s)
take one of the motors plug in the red
[04:36] (276.40s)
and black wires of the motor and this
[04:38] (278.72s)
thing is just a $3 motor controller that
[04:41] (281.60s)
is going to act basically like a dimmer
[04:43] (283.72s)
switch the Pico can supply that little
[04:46] (286.32s)
bit of voltage to this board and it will
[04:49] (289.08s)
allow a certain amount of voltage from
[04:51] (291.44s)
the battery to the motor depending on
[04:54] (294.00s)
what the Pico is telling this board so
[04:55] (295.80s)
if I plug one of the motor controller
[04:58] (298.64s)
pins Direct L into the same pin that's
[05:01] (301.72s)
being used to control that led and then
[05:04] (304.28s)
I just need one more pin so that the
[05:06] (306.72s)
motor knows which direction to spin
[05:09] (309.00s)
around in and I'm going to use pin 18
[05:11] (311.16s)
for that plug in the last battery here
[05:14] (314.36s)
and then this motor should turn as long
[05:17] (317.00s)
as I remember to plug in the ground
[05:19] (319.08s)
connection there we go okay so now as
[05:22] (322.04s)
the LED gets brighter the motor will
[05:24] (324.04s)
spin faster and then as it gets dimmer
[05:25] (325.60s)
the motor slows down so this code is
[05:28] (328.52s)
controlling the motor we can control the
[05:30] (330.08s)
motors with a little bit of python now
[05:31] (331.96s)
the next goal is to be able to control
[05:33] (333.92s)
this over Wi-Fi so that I can set the
[05:36] (336.60s)
speed wirelessly so I've added a
[05:38] (338.76s)
function that will connect the PCO to my
[05:41] (341.16s)
home Wi-Fi and then I'm using this micro
[05:43] (343.76s)
do python Library which creates a really
[05:46] (346.16s)
lightweight HTTP server on the Pico
[05:48] (348.72s)
itself so if I run this code again I can
[05:51] (351.40s)
see it's going to attempt to connect to
[05:52] (352.64s)
the Wi-Fi it should connect and then set
[05:54] (354.20s)
up an HTTP server running on the Pico so
[05:57] (357.36s)
this is its IP address I could just try
[05:59] (359.68s)
WR a curl request to that which is so
[06:02] (362.28s)
sick it's just running an HTTP server
[06:04] (364.12s)
there I could even visit it in the web
[06:05] (365.92s)
browser if I really wanted to there we
[06:07] (367.72s)
go there's my Pico web server working on
[06:10] (370.20s)
my Wi-Fi but to control the motors I've
[06:12] (372.24s)
set up a custom motor class and it takes
[06:14] (374.84s)
three pins these two are for the
[06:16] (376.80s)
direction and this one is for the speed
[06:19] (379.36s)
then I've set this up as a websocket
[06:21] (381.64s)
route I'm just expecting a one byte
[06:24] (384.04s)
binary integer minus 100 is full speed
[06:27] (387.24s)
backwards and positive 100 is full speed
[06:29] (389.60s)
forwards so it's going to expect just
[06:31] (391.36s)
that tiny bit of data to come in and
[06:32] (392.88s)
then it's going to update the speed
[06:34] (394.48s)
based on what it gets so I just need to
[06:36] (396.60s)
create a websocket client for this so
[06:38] (398.60s)
that I can start controlling the Pico
[06:40] (400.12s)
and for that I have set up a react tab
[06:42] (402.24s)
it just connects to the Pico websocket
[06:44] (404.16s)
server and then has some components to
[06:45] (405.72s)
send that data up so if we open this in
[06:48] (408.88s)
a web browser this is what it currently
[06:51] (411.36s)
looks like I got a little toggle here so
[06:53] (413.20s)
if I toggle it up and we look at the
[06:55] (415.96s)
light and the motor we should be able to
[06:58] (418.88s)
see them there we go there's the motor
[07:00] (420.32s)
turning and that's 100% and the light
[07:03] (423.28s)
also lights up still cuz I got them
[07:04] (424.88s)
connected to the same wire and you can
[07:06] (426.36s)
see it working in both directions you
[07:08] (428.40s)
can see it logging out the values on the
[07:10] (430.56s)
server of the pico2 so this is browser
[07:16] (436.04s)
controlled rber and it won't turn off I
[07:19] (439.48s)
don't know why must have put a bug in
[07:20] (440.96s)
there now I just need to clean up the
[07:22] (442.64s)
code a little bit and get all four of
[07:24] (444.76s)
these motors connected up to these motor
[07:26] (446.96s)
drivers this whole part here is the part
[07:29] (449.56s)
that picks up all the dirt and that's
[07:32] (452.32s)
these brushes that are responsible for
[07:34] (454.32s)
it on the back of this thing here right
[07:36] (456.92s)
here this silver thing is the motor it's
[07:39] (459.40s)
the silver part on all of the pieces
[07:41] (461.48s)
that's the actual motor and again we're
[07:43] (463.16s)
just looking for these red and black
[07:44] (464.72s)
wires that's all we need to control this
[07:46] (466.36s)
thing and the way this works is that the
[07:48] (468.48s)
silver part is the motor itself that we
[07:50] (470.80s)
apply the voltage to and then somewhere
[07:53] (473.08s)
in the plastic part there's going to be
[07:54] (474.60s)
some gears that then make this part turn
[07:57] (477.92s)
with a little bit more power and and
[07:59] (479.88s)
then the second wheel motor and again
[08:02] (482.92s)
here is the motor that's that part
[08:05] (485.64s)
there's the red and black wires
[08:07] (487.08s)
somewhere and inside this piece right
[08:09] (489.92s)
here there's a whole bunch of Gears that
[08:12] (492.28s)
reduces the speed of the wheel but
[08:14] (494.52s)
increases the torque which makes it much
[08:16] (496.36s)
better for driving and then finally this
[08:18] (498.76s)
brush motor which actually doesn't have
[08:21] (501.48s)
any wires on it it just has these two
[08:23] (503.24s)
pads so I think I'm going to have to
[08:24] (504.68s)
solder a red and black wire onto this
[08:27] (507.04s)
thing all of the motors have now been
[08:29] (509.84s)
attached back to the bottom of the
[08:31] (511.16s)
rumber I have all the wires coming out
[08:34] (514.32s)
from the bottom to the top here each of
[08:36] (516.28s)
these can control two Motors
[08:38] (518.16s)
individually so I just need two of them
[08:39] (519.84s)
for all four Motors and you can kind of
[08:41] (521.28s)
see these red and black wires coming up
[08:43] (523.00s)
and plugging into each of those and then
[08:45] (525.20s)
the Pico is plugged into each of those
[08:48] (528.40s)
controllers individually and I also
[08:50] (530.60s)
added this little 5volt converter here
[08:52] (532.84s)
so I can attach any battery to this and
[08:54] (534.64s)
it will make sure that the Pico just
[08:56] (536.08s)
gets the 5 volts that it needs I also
[08:58] (538.08s)
added another cell to the battery pack
[09:00] (540.24s)
so it's five now so it's a 20 volt
[09:02] (542.20s)
battery which is kind of the equivalent
[09:04] (544.00s)
of just plugging a drill battery
[09:05] (545.68s)
straight into this thing and on the code
[09:08] (548.24s)
side of things I've now got these four
[09:10] (550.52s)
Motors on the server for the right left
[09:12] (552.88s)
the brush and the vacuum and in the web
[09:16] (556.12s)
socket code the server is just listening
[09:18] (558.92s)
for these speeds to come in and then
[09:20] (560.44s)
it's just going to update each of the
[09:22] (562.00s)
motors based on the values that it gets
[09:24] (564.16s)
and I could control all of this from a
[09:26] (566.48s)
react app from a web browser still but I
[09:28] (568.88s)
thought it would be much more fun to
[09:30] (570.88s)
control all of this from an iPhone app
[09:33] (573.60s)
because I can actually connect this to
[09:36] (576.28s)
one of the game controllers built for
[09:39] (579.08s)
iPhone and then in Swift I can just
[09:42] (582.04s)
import this game controller Library
[09:44] (584.08s)
where I can just detect these left and
[09:46] (586.40s)
right joysticks and then send that data
[09:48] (588.68s)
to the Pico websocket server so if I
[09:51] (591.84s)
push these back and forth you can see
[09:54] (594.16s)
those values these toggles will be for
[09:57] (597.24s)
the left and right Motors and then I
[09:58] (598.76s)
just have this slider in the middle to
[10:00] (600.32s)
control the vacuum speed so now really
[10:02] (602.88s)
the only thing left to do is test if
[10:05] (605.80s)
this actually all works and I should
[10:08] (608.48s)
probably test that on the floor goam bro
[10:12] (612.12s)
ham oh my god oh did you see that the
[10:15] (615.56s)
fuse just burn out immediately I I drove
[10:22] (622.44s)
in oh that's so stupid the good news is
[10:25] (625.84s)
I had a fuse on the battery in case
[10:27] (627.84s)
anything went wrong the bad news is I
[10:30] (630.00s)
just immediately blew so let's see what
[10:33] (633.24s)
happens if I actually oh it blew again I
[10:35] (635.52s)
think I might have something wrong with
[10:37] (637.28s)
my circuits I mean it feels a bit feels
[10:41] (641.16s)
like the red and black wires are
[10:42] (642.28s)
shorting and if they are shorting that
[10:43] (643.80s)
would also explain why the fuse is
[10:45] (645.04s)
blowing every time but I don't even know
[10:47] (647.12s)
how oh that could be shorting them okay
[10:49] (649.92s)
I think that's normal I think I fixed
[10:52] (652.04s)
it I think I'm a genius I'm a little
[10:54] (654.44s)
scared to try it now I think the right
[10:56] (656.20s)
motor is
[10:58] (658.24s)
okay all right so let's try oh
[11:01] (661.92s)
wait it's
[11:04] (664.00s)
working oh that is so sick turns so
[11:08] (668.32s)
nicely oh my God that's so
[11:11] (671.08s)
fast imagine if rers were like this
[11:13] (673.68s)
they'd be
[11:14] (674.68s)
terrifying that is that is so much
[11:20] (680.56s)
fun oh that's so good and with the
[11:25] (685.04s)
vacuum on
[11:26] (686.52s)
wait oh so loud that is so loud be so
[11:30] (690.68s)
fast at cleaning
[11:33] (693.00s)
though hell yeah okay this is
[11:36] (696.48s)
awesome oh my God I love this now I know
[11:41] (701.16s)
there are so many more things I could do
[11:43] (703.00s)
to make this a better vacuum and
[11:44] (704.80s)
integrate some of the other sensors that
[11:46] (706.52s)
I've been ignoring for now but the only
[11:48] (708.92s)
thing I want to do right now is attach a
[11:52] (712.04s)
camera to the front of the rumber live
[11:54] (714.36s)
stream that to the iPhone screen so I
[11:56] (716.64s)
can get this firstperson perspective of
[11:58] (718.96s)
what the Rumba sees but before I do that
[12:01] (721.88s)
let me tell you about this video sponsor
[12:03] (723.92s)
because when you're hacking a Rumba it
[12:05] (725.84s)
is really important to have good
[12:07] (727.72s)
programming and problem solving skills
[12:09] (729.76s)
and you can build these skills right now
[12:12] (732.16s)
for free using brilliant where you learn
[12:14] (734.56s)
by doing with thousands of interactive
[12:16] (736.76s)
lessons in math data analysis Ai and
[12:19] (739.48s)
programming each lesson is filled with
[12:21] (741.44s)
Hands-On problem solving that let you
[12:23] (743.64s)
play with the concepts interactively so
[12:25] (745.76s)
you learn by doing which makes it fun
[12:27] (747.96s)
but will also help you build a better
[12:30] (750.28s)
understanding from the ground up and
[12:32] (752.12s)
while you're learning brilliant is
[12:33] (753.80s)
helping you build these critical
[12:35] (755.44s)
thinking skills through problem solving
[12:37] (757.44s)
You're Building real knowledge on
[12:38] (758.88s)
specific topics and you're becoming a
[12:40] (760.88s)
better thinker and Problem Solver and my
[12:43] (763.04s)
favorite part is that you can do these
[12:44] (764.80s)
lessons whenever you have time get
[12:46] (766.80s)
started with just a few minutes every
[12:48] (768.84s)
day and try out their mobile app to make
[12:51] (771.32s)
that daily habit even easier you can
[12:53] (773.56s)
have a lot of fun leveling up in Python
[12:56] (776.20s)
while also learning how to build a
[12:58] (778.16s)
language model so to try everything
[13:00] (780.08s)
brilliant has to offer for free for a
[13:02] (782.36s)
full 30 days visit brilliant.org Sam
[13:05] (785.96s)
meard or scan the QR code on screen
[13:08] (788.88s)
there's also a link in the description
[13:10] (790.92s)
and you'll get 20% off an annual premium
[13:13] (793.68s)
subscription it looks like the Pico
[13:15] (795.32s)
isn't really designed to work with
[13:16] (796.76s)
cameras so there's not much selection
[13:19] (799.24s)
but I found this camera right here it's
[13:22] (802.04s)
an ov2640 which is a really standard
[13:25] (805.04s)
camera to use with a microcontroller but
[13:27] (807.12s)
it's $26 just for this module so way
[13:29] (809.68s)
more expensive than the Pico and that's
[13:31] (811.60s)
because the sensor right here the camera
[13:33] (813.24s)
itself is a fairly cheap piece of
[13:35] (815.04s)
Hardware I think you can get them for
[13:36] (816.12s)
like $5 on alexpress but to get it to
[13:38] (818.72s)
work effectively with the Pico they have
[13:40] (820.48s)
to add all this other expensive stuff
[13:42] (822.20s)
but I've got one right here and we just
[13:43] (823.76s)
need to plug it into the Pico and see
[13:45] (825.44s)
how this thing works here is the camera
[13:47] (827.16s)
plugged in taking up eight of those Pico
[13:50] (830.04s)
pins and we can quickly test this out by
[13:52] (832.16s)
taking a picture on the camera and
[13:53] (833.96s)
serving it up over an HTTP request so I
[13:56] (836.40s)
got some camera code from the camera's
[13:58] (838.72s)
web it is just a big python class that
[14:01] (841.24s)
handles setting up the camera and
[14:02] (842.76s)
everything I'm setting it up to take
[14:04] (844.56s)
pictures at 640 by 480 pixels and then I
[14:08] (848.32s)
have this HTTP Endo so when we go to/
[14:10] (850.88s)
jpeg it's going to take a single jpeg
[14:14] (854.00s)
image from that camera and it's going to
[14:16] (856.16s)
return it as a HTTP response so if I run
[14:19] (859.72s)
this code right now we should just be
[14:21] (861.28s)
able to take this IP address and go to/
[14:25] (865.32s)
JPEG to see a picture oh all right
[14:28] (868.68s)
that's what working so I'm going to hold
[14:30] (870.28s)
this up a little bit higher in front of
[14:31] (871.96s)
my face and if I just keep refreshing
[14:34] (874.24s)
I'm going to keep getting a new J frame
[14:37] (877.28s)
so all right this is kind of like really
[14:39] (879.32s)
crappy video but that was pretty easy to
[14:42] (882.56s)
get set up now what I really want to do
[14:44] (884.72s)
is instead of having it be a JPEG each
[14:46] (886.40s)
time I really need a video stream so if
[14:48] (888.36s)
we look back at the code I have a
[14:50] (890.08s)
different endpoint here that is slash
[14:52] (892.56s)
stream and this is just going to be an
[14:53] (893.92s)
mjpeg stream so I can still just visit
[14:55] (895.76s)
it in a web browser and essentially
[14:57] (897.72s)
instead of just sending back a single
[15:00] (900.00s)
image it's going to continuously keep
[15:02] (902.48s)
taking images and send that down as an
[15:04] (904.44s)
HTTP stream to the browser so if I go to
[15:07] (907.24s)
slash stream okay so there's the video
[15:11] (911.20s)
stream and it is really laggy that frame
[15:14] (914.56s)
rate is awful absolutely awful hold on
[15:16] (916.84s)
if I just focus it's kind of okay all
[15:19] (919.44s)
right and that's really just due to the
[15:21] (921.64s)
limitations of the technology we're
[15:23] (923.40s)
using so if I go back into the code and
[15:25] (925.96s)
I reduce this size so instead of 640x
[15:29] (929.68s)
480 we're going to go with 320x 240 so
[15:32] (932.84s)
it's going to be much smaller images but
[15:35] (935.44s)
this should give us a much better stream
[15:38] (938.04s)
yeah there we go okay so that's that's a
[15:39] (939.40s)
little better it's uh just need to
[15:40] (940.96s)
reduce that size so that's pretty decent
[15:43] (943.00s)
we're getting we're getting a stream
[15:44] (944.12s)
we're just streaming jpeg frames so this
[15:46] (946.28s)
is what it looks like on the iPhone I am
[15:48] (948.52s)
getting that Real Time video feed if I
[15:50] (950.80s)
hold it up a little bit you can kind of
[15:53] (953.60s)
see my face there yeah coming through on
[15:55] (955.76s)
the iPhone screen so overall not bad at
[15:59] (959.16s)
all and I have these LEDs on the Pico
[16:01] (961.24s)
right here to kind of simulate the
[16:02] (962.60s)
motors for now so we can see that I can
[16:04] (964.48s)
stream this realtime video and I'd be
[16:07] (967.00s)
able to control the motors at the same
[16:08] (968.68s)
time so that all still works I'm getting
[16:10] (970.32s)
this little bit of a live stream and I
[16:12] (972.92s)
mean it's mostly it's working that is
[16:15] (975.76s)
that is working but we can do better and
[16:18] (978.08s)
this is an ESP 32 S3 which is about the
[16:21] (981.64s)
same price as the PCO but this board is
[16:24] (984.52s)
set up a little bit better for doing
[16:26] (986.40s)
things like video streaming it has more
[16:27] (987.92s)
RAM it's got a faster processor so to
[16:29] (989.88s)
get a bit of a better video stream I'm
[16:31] (991.48s)
going to use one of these and see what
[16:33] (993.56s)
the performance difference is like and I
[16:35] (995.28s)
went and got this version of the esp32
[16:38] (998.00s)
S3 it's from Seed Studio it costs $14
[16:41] (1001.08s)
and comes with the same camera that
[16:43] (1003.76s)
we're using over here it's the same
[16:45] (1005.84s)
sensor module but this entire thing
[16:48] (1008.68s)
costs $14 so we've got a cheaper setup
[16:51] (1011.60s)
with a more powerful processor and we
[16:53] (1013.92s)
could stick with micro python for this
[16:55] (1015.68s)
but I find it incredibly easy to use C
[16:57] (1017.68s)
and C++ with the PP IDF so I've
[17:00] (1020.20s)
Rewritten the app and it does basically
[17:01] (1021.92s)
the same thing but instead of 100 lines
[17:03] (1023.92s)
of python it's like 2,000 lines of c and
[17:06] (1026.04s)
C++ so for the camera setup I'm using
[17:08] (1028.52s)
SVGA which is 800x 600 so more than
[17:11] (1031.56s)
double the size of the image we were
[17:13] (1033.36s)
getting with the Raspberry Pi PCO and
[17:15] (1035.20s)
we're basically doing the same thing
[17:16] (1036.76s)
where we're going to grab a JPEG frame
[17:18] (1038.84s)
from the camera on the ESP and then
[17:21] (1041.36s)
we're going to send that over the web
[17:24] (1044.20s)
socket connection so that the client
[17:26] (1046.28s)
receives each jpeg frame as a separate
[17:28] (1048.28s)
web socket message and I'll post all of
[17:30] (1050.28s)
this code on GitHub if you want to take
[17:31] (1051.76s)
a look through the entire thing but
[17:33] (1053.24s)
let's plug this in and run this
[17:35] (1055.36s)
application and here it is on the iPhone
[17:38] (1058.52s)
stream I'm going to hold this up a
[17:40] (1060.16s)
little bit and that is definitely a
[17:42] (1062.64s)
crisper shot the frame rate is so much
[17:44] (1064.92s)
better and we're just all around getting
[17:46] (1066.76s)
a better video stream in this tiny tiny
[17:50] (1070.44s)
little package and only $14 and I'm just
[17:53] (1073.16s)
going to show a side by-side comparison
[17:55] (1075.40s)
of this video quality difference because
[17:57] (1077.88s)
the Pico is great but for video
[17:59] (1079.56s)
streaming clearly here there is a winner
[18:01] (1081.76s)
this is the Pico camera I've got the
[18:03] (1083.92s)
camera attached right there with some
[18:06] (1086.16s)
double-sided tape and I think this is
[18:08] (1088.76s)
ready to go and for the ESP I didn't
[18:11] (1091.20s)
want to take the other rumber apart so I
[18:13] (1093.04s)
just put together another one so it's
[18:14] (1094.92s)
got the battery pack the same the ESP is
[18:17] (1097.56s)
at the front there with the camera I got
[18:19] (1099.80s)
an antenna on the back to get a little
[18:21] (1101.72s)
bit extra range there and I managed to
[18:24] (1104.40s)
get all of the electronics inside of the
[18:27] (1107.08s)
empty compartments here like where the
[18:28] (1108.40s)
battery used to go so it looks a little
[18:30] (1110.20s)
bit cleaner too now let's see if they
[18:32] (1112.32s)
actually work okay I always forget how
[18:34] (1114.84s)
fast this thing drives that camera feed
[18:38] (1118.04s)
that is sick that the camera is working
[18:40] (1120.20s)
but it's incredibly difficult to see
[18:41] (1121.76s)
what's actually going on when I'm
[18:43] (1123.12s)
driving and I don't know if I completely
[18:45] (1125.16s)
stop though like this could be an okay
[18:47] (1127.20s)
spy cam or something it is sick that I
[18:49] (1129.92s)
have a live streaming camera on the
[18:51] (1131.64s)
Roomba but I think I need to try with a
[18:53] (1133.72s)
better quality wide angle to see what
[18:55] (1135.28s)
this is like so that's the wide angle
[18:58] (1138.24s)
camera
[18:59] (1139.40s)
oh that is so much
[19:01] (1141.96s)
better that is sick that's actually way
[19:05] (1145.20s)
better than I thought it would be my God
[19:08] (1148.20s)
that I can actually drive this
[19:10] (1150.84s)
thing just using the game controller
[19:13] (1153.60s)
screen that really exceeded my
[19:17] (1157.48s)
expectations are you ready for the
[19:19] (1159.08s)
cleaning test what's that what is that
[19:22] (1162.76s)
what the is
[19:24] (1164.36s)
that I hate you where did you get that
[19:27] (1167.40s)
are you ready I hate you are you ready
[19:29] (1169.64s)
for no it's okay the rumba's going to
[19:31] (1171.00s)
clean this up you ready I don't believe
[19:32] (1172.96s)
you what the
[19:39] (1179.28s)
hell oh I really hope this oh my God
[19:42] (1182.20s)
it's glittery you
[19:43] (1183.68s)
ready vacuum
[19:48] (1188.60s)
mode can you see the sprinkles I can see
[19:51] (1191.76s)
yeah like through the camera I can see
[19:53] (1193.80s)
exactly what I need to clean up I need a
[19:56] (1196.84s)
reverse camera too so I can see what
[19:58] (1198.36s)
I've work cleaned up you know like this
[20:00] (1200.76s)
is cleaning just as well as it did
[20:03] (1203.76s)
before I hacked it so that's impressive
[20:06] (1206.76s)
on its own full speed mode with the
[20:09] (1209.80s)
vacuum oh yeah that is no problem
[20:13] (1213.32s)
cleaning this
[20:15] (1215.24s)
up oh hell yeah I don't know why rumo
[20:18] (1218.76s)
doesn't just put live streaming cameras
[20:20] (1220.68s)
on all of their robots this is so sick
[20:24] (1224.16s)
let's see how good a job the RBA
[20:27] (1227.12s)
did see that is still that is still a
[20:32] (1232.68s)
decent vacuum that is so
[20:36] (1236.48s)
sick that's awesome okay you get to
[20:39] (1239.60s)
clean all
[20:41] (1241.20s)
this and I really wanted to test out the
[20:43] (1243.64s)
Pico cam as well but something happened
[20:46] (1246.20s)
when I plugged it in and a bunch of
[20:47] (1247.88s)
smoke came out around here and the fuse
[20:50] (1250.68s)
blew again so this one is officially
[20:53] (1253.12s)
broken right now but we have to move on
[20:55] (1255.32s)
because it turns out we can just plug a
[20:57] (1257.24s)
microcontroller stra straight into the
[20:59] (1259.20s)
rumba's motherboard using this port
[21:02] (1262.16s)
instead of having to rip everything out
[21:04] (1264.24s)
which is great because these
[21:05] (1265.80s)
motherboards have already been set up to
[21:07] (1267.76s)
be able to work with all of the motors
[21:09] (1269.84s)
and the sensors inside of the rumber you
[21:11] (1271.80s)
can see the port on the motherboard
[21:13] (1273.48s)
itself and it appears right here on top
[21:15] (1275.64s)
of the rber and all we have to do is
[21:17] (1277.76s)
connect three wires into these ports
[21:21] (1281.04s)
from the microcontroller and now these
[21:23] (1283.12s)
two can send messages back and forth
[21:25] (1285.20s)
over these wires using the RBA open
[21:28] (1288.00s)
interface which is a Serial
[21:30] (1290.40s)
communication protocol that is really
[21:33] (1293.04s)
well documented there's commands for
[21:35] (1295.32s)
everything you can do like controlling
[21:37] (1297.44s)
the motors getting data on any of the
[21:40] (1300.72s)
sensors and there are a lot of sensors
[21:43] (1303.48s)
on the Rumba and you can even program a
[21:46] (1306.28s)
song into the Rumba using these
[21:48] (1308.68s)
different notes and then have the Rumba
[21:50] (1310.24s)
play that song back to you and I'm
[21:51] (1311.64s)
embarrassed to say that I had no idea
[21:54] (1314.28s)
this existed until West boss casually
[21:57] (1317.04s)
mentioned this to me and then made a
[21:59] (1319.44s)
video on how to control a Rumba using
[22:01] (1321.88s)
JavaScript where he goes over all of
[22:04] (1324.04s)
this in way more detail but I've got my
[22:05] (1325.84s)
microcontroller plugged straight into
[22:07] (1327.76s)
the rumber the red and black wires go
[22:10] (1330.08s)
straight to the rumber battery so I can
[22:11] (1331.68s)
just use that power and then the green
[22:14] (1334.28s)
yellow and blue wires are all for that
[22:16] (1336.40s)
communication and I've got them plugged
[22:18] (1338.80s)
in to my ESP over here and I just made
[22:22] (1342.16s)
my own little circuit board to clean
[22:23] (1343.48s)
that up a little bit and I have my
[22:24] (1344.92s)
voltage converter so it's going to take
[22:26] (1346.36s)
whatever the rumber battery is giving
[22:27] (1347.88s)
and convert that to to 5 Vols for the
[22:29] (1349.80s)
ESP the esp's got that wide angle camera
[22:32] (1352.40s)
lens on it and then I've still got the
[22:33] (1353.96s)
little antenna on the back of the rumber
[22:35] (1355.44s)
but this is definitely looking like the
[22:37] (1357.32s)
least dangerous version of my rers so
[22:40] (1360.16s)
far all right you ready mhm do you think
[22:42] (1362.92s)
this is going to work so this controls
[22:45] (1365.28s)
pretty nicely without having to hack the
[22:46] (1366.76s)
whole thing apart it's definitely slower
[22:49] (1369.28s)
than my custom versions cuz we're not
[22:50] (1370.84s)
just hooking up a custom battery
[22:52] (1372.48s)
straight to the motors but with this
[22:56] (1376.56s)
version because I have ACC to all the
[22:59] (1379.32s)
sensors on the front I've implemented
[23:01] (1381.08s)
that video game style crash I can see
[23:03] (1383.80s)
how much current each motor is drawing
[23:06] (1386.24s)
and I've have a list of a bunch of other
[23:07] (1387.40s)
sensors that I want to integrate into
[23:09] (1389.12s)
this app and there are so many sensors
[23:11] (1391.08s)
you can work with but my absolute
[23:13] (1393.12s)
favorite
[23:15] (1395.61s)
[Music]
[23:32] (1412.42s)
[Laughter]