13 Setting up usb host Shield

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
as you can see i'm not the best at soldering however i soldered these three power power areas so you need to solder these three things so power goes to the usb or else power won't go to the usb it's a very odd but it's a power fix that you have to do for most usb host shields once that's done you can open arduino plug in your mouse to the arduino usb host shield which is connected to your arduino and plug your arduino into your pc you know so the com port should be working so if you check port should be com 3 or whatever column you're using but it should say arduino leonardo you should be able to upload this script right here so this this script is from examples from the library we uploaded scroll down it says should say hid mouse report should be able to upload this script right here it's compiling sketch just waiting for it and you're going to be unable to move your mouse for a bit as you can see i'm moving my mouse so i'm currently spinning my mouse in circles and it's drifting to the right as you can see so this script has a few problems in it and it's where when you spin your mouse in circles it moves a bit more to the bottom and to the right so i will show you how you can fix that just give me a second to fix the problems this library has go to your documents folder and then click on arduino this should be where arduino defaults the installation of their libraries go to libraries go to hid mouse report and on the c source file right click and go to open with visual studio code okay so the script that we uploaded calls on this script now we're going to modify the script so this is where the mouse movements happen so it calls on this function so let's say if i move my mouse up and it moves sideways then you're going to have to switch the xm and ym variables around if if you've done coding before this is pretty straightforward but the c plus function takes in the amount of x movement y movement and scroll wheel this is what the scr stands for which is scroll wheel and it calls the mouse movements happening here using the mouse library that arduino automatically has installed so for me if like the y coordinate got changed however the x coordinate would be moving then i would switch these two around and it'd be ym and xm right however i don't have that problem if you have a scroll wheel problem and like grow wheel just gets used randomly like it's always scrolling down or something remove scroll wheel from here i don't have that problem either so i'm just going to put it back so to fix drift depending on how much drift you have for me i don't have that much but it's going to be if x m is greater than one then we're going to be x m equals x m minus 1. then we're going to repeat the same thing for ym so if ym is greater than 1 then ym equals ym minus one save this okay once it's saved you can go back to your arduino so as you can see my mouse is still drifting i'm gonna re-upload okay it's done re-uploading so now when i spin my mouse in circles it's no longer drifting to the bottom and to the right so that's all for setting up your usb host if you have any additional problems with this library you can ask me and i can try and solve them for you i will reply to any questions on udemy and in the next video we will start beginning to write em aim assist i believe aimbot inbot and aim assist so that's it see ya
Info
Channel: SmileMe
Views: 8,584
Rating: undefined out of 5
Keywords:
Id: jwVXZCSWTTI
Channel Id: undefined
Length: 5min 13sec (313 seconds)
Published: Wed Sep 14 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.