and this Raspberry Pi Pico small car lesson we're going to learn to control the car with
the app the app will display the speed when turn on and off the light we can set the speed
we can see the speed with this app and also we can drive the car in all directions
welcome to Raspberry Pi Pico Smart Car course by Robojax my name is Ahmad Shamshiri and
I will be your instructor for this course this course is based on some Founders raspberry
by Pico four-wheel drive car kit [Music]
[Music] thank you.
[Music]
thank you beside this 10 lesson course the kit has full documentations step-by-step instructions
wiring diagrams python codes and example projects available for download the car can be controlled
using mobile app for mobile or tablet where you can control them car fully forward backward
turn right turn left and also you can turn on and off the light you can set the power
of the motors you can see the speed and meter per second you can see the radar obstacle
avoidance data where the obstacle is also you can see the line tracking or a hollow
deep sensor data it can track align or follow the line it has Cliff detector and it can
follow your hand and it can avoid obstacle and drive the kit is available for purchase
on some founder and major online stores the link to purchase the kit is below this video
now let's get started with controlling the car with the app if this is a documentation
page go to get started examples and at the bottom click on control Tab and this is the
page here everything have been explained but I'm going to show you in the video step by
step so you understand it easily to get started with the app go to your app store either Google
play or apple just search for Sun founder and you will get sun founder control app and
install it
now let's open the app.
and I'm turning it in horizontal let's add first let's type a name for it.
I'm just typing a name and then select the type we're using Pico four-wheel drive it
is selected now it's gray confirm and then we have this screen now screen let's touch
this this area this gear here and then we have to set our value for the clef and for
the grayscale value this is gray scale value the cleft reference we will enter some number
remember from our previous numbers that we have so I'm entering 1200 and then the line
reference this was the value that we detected the line which was around 12 000 here let's
put 10 000 and we can change it if it doesn't work 10 000 and confirm now that's done we
have the value set and from here also we can control the light once you're done we have
to click on the save button here
now that screen disappears and it is saved now the car is connected via USB make sure
to click here and click again on the com Port Raspberry Pi Pico so the car is connected
now
go to go to examples and then app control select all right click select all or press
Ctrl a and then copy right click copy then open the main here which is from the device
if I double click it will open if you don't have domain let me just delete it so let's
say you don't have it create a new file or click file new you will see this screen I've
changed the setting of my screen don't worry it's the same thing right click and paste
and now click save or go to file and save and this time select Raspberry Pi Pico it
will go here and then name it
main.pi and click ok.
I just closed it because it was open so click file and save Raspberry Pi Pico again and
then main.pi
click OK and it will be saved here now this main file is available and we can do it now
we are going to connect this via Wi-Fi and it will be called my 4WD car now we will be
connecting to this and this is defined as access point and here is a password one two
three up to eight and everything is ready
and your car is on I'm just turning it on from here and the light shows on then run
the code
and just printing all this text let me stop it see
so, when I stop that scroll up this is the IP address for our device 192.168
four one because we need it and now, we have to remember the IP address of the car
192.168.4.1 we need this now let's connect our phone to that IP address of my car for
WD and enter the password one two three four five six seven eight and then click join wait
until you see it's connected so we got connected here disconnect manual and we will enter our
IP address
so, 192.1
68
.4.1 and this was our IP that I entered from the screen
and click connect.
it's taking longer I don't know so it says connection failed now let's run this again
now this is running now let's connect again with the same IP and it got connected immediately
because the device is now running because the car is running
and now if I connect this click on this play now I got connected and the radar is already
searching and looking for obstacle or something this is setting the power of the motor from
zero to hundred percent and this is showing the speed in meter per second with a dial
this is showing the speed and digital and this is showing the radar obstacle whatever
if there is an obstacle in front of it this will turn on and off the light and these three
are for the grayscale sensor this is for controlling the vehicle forward backwards right and left
and right now the car is beside me if I turn the lights on you see the green the light
is set to be green but we can change that so this is turning on of the light and
this is showing the value from grayscale right now it doesn't read any value now it read
something if I put this paper here let's see what it what it reads
it gives you the value 1460 1280.
three of them on the White let's see if I touch it doesn't do anything except it might
read it in a few seconds yes so it says only the right is reading about nine thousand
now let's put it this way so three of them 1200 1500 1600 it's also the power from here
but the core will not move 55 percent
now the car is disconnected let me turn it on let's go to our Wi-Fi my 4WD car and get
connected so we got connected for the car click on connect and so we got connected without
any wire and after about one minute or so when I did not touch it until I prepared the
tripod it says disconnected so confirm now let's connect again
so this is not connecting perhaps I have to restart
the car just turn it off.
and turn it on
there now I reboot it twice
now touch and connect as soon as connected the server started running so let's the power
is at fifty percent let me turn the lights off the green light
perfect so that is working now let's go forward.
perfect so
when it so let's go [Music]
and here the speed also shown
and the gray scale is also showing.
and here the razor also shows the obstacles.
red dots let's rotate to the right or just come backwards and then turn right go forward
and it shows the speed four meter per second or so let's increase the speed to 100 and
go faster backwards
no just rotating.
and going forward let's go backwards.
turn left go forward I forgot about forward.
and as you can see the car is perfectly functioning
can we press both no
14 meter per second 14 centimeter per second and it shows the obstacle on the path
[Music]