Cov txheej txheem:
- Kauj ruam 1:
- Kauj Ruam 2: Tsim Txoj Haujlwm Neeg Hlau Tshiab
- Kauj Ruam 3: Tsim/Sau rau RobotMap
- Kauj Ruam 4: Rho Tawm Piv Txwv Cov Lus Qhia thiab Piv Txwv Subsystem
- Kauj Ruam 5: Tsim DriveTrainSubSystem
- Kauj Ruam 6: Tsim DriveTrainCommand
- Kauj Ruam 7: Dhia rau Neeg Hlau
- Kauj Ruam 8: Rov Qab Mus rau DriveTrainCommand
- Kauj ruam 9: Mus rau DriveTrainSub
- Kauj Ruam 10: Tom ntej no Peb Yuav Tsim OI Code
- Kauj ruam 11: Mus rau DriveTrainCommand
- Kauj Ruam 12: Thaum kawg Sau thiab Xa Cov Cai rau Tus Neeg Hlau
Video: Yuav Sau Li Cas Sau Yooj Yim Rau FRC (Java): 12 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:30
Nov yog cov lus qhia yuav ua li cas thiaj ua tau yooj yim drivetrain rau FRC neeg hlau. Cov ntawv qhia no xav tias koj paub tias pib ntawm java, dab noj hnub thiab twb tau teeb tsa wpilib, ntxiv rau CTRE cov tsev qiv ntawv.
Kauj ruam 1:
Qhib dab noj hnub
Kauj Ruam 2: Tsim Txoj Haujlwm Neeg Hlau Tshiab
- Txoj nyem rau ntawm pob tshawb nrhiav, nyem tshiab, tom qab ntawd lwm yam.
- Nqes mus txog thaum koj pom WPILib Neeg Hlau Java Kev Txhim Kho (yog tias koj tsis pom nws koj tsis muaj wpilib cov peev txheej teeb tsa.)
- Nyem rau ntawm Robot Java Project
- Tom qab ntawd sau rau hauv qhov project lub npe thiab nyem qhov hais kom ua raws cov neeg hlau qhov project. (Pob yuav tsum tau ua tiav thiab zoo ib yam nrog simulation ntiaj teb.)
Kauj Ruam 3: Tsim/Sau rau RobotMap
Tsim qhov hloov pauv kawg uas muaj tus lej ntawm qhov sib txawv talon ports
Kauj Ruam 4: Rho Tawm Piv Txwv Cov Lus Qhia thiab Piv Txwv Subsystem
Kauj Ruam 5: Tsim DriveTrainSubSystem
- Tsim tus tsim tshiab hauv qhov tsim tshiab drivetrain subsystem. Tom qab ntawd tsim CANTalon cov khoom uas cuam tshuam nrog cov dab neeg ntawm lub tshuab tsav.
- Tsim RobotDrive hu ua Drive
- Instantiate Cov Hom Phiaj no hauv tus tsim (nco ntsoov siv qhov txiaj ntsig rau cov dab neeg uas peb tsim hauv daim ntawv qhia neeg hlau). Txog rau Robot Drive peb yuav siv tus tsim khoom uas siv 4 Tus Tswj Lub Cev (RobotDrive (SpeedController frontLeftMotor, SpeedController rearLeftMotor, SpeedController frontRightMotor, SpeedController rearRightMotor))
- Tom qab ntawd tsim qhov arcadeDrive () txoj hauv kev nrog ob qhov kev hloov pauv tau yog x yog rau pem hauv ntej thiab rov qab thiab y yog txoj cai thiab sab laug. Sab hauv koj yuav hu rau drive.arcade nrog rau pem hauv ntej thiab tig qhov tseem ceeb
- Tom qab ntawd hloov pauv initDefaultCommand () kom muaj kab setDefaultCommand (DriveTrainCommand tshiab ());.
- Tsis txhob txhawj xeeb txog txhua qhov ua tsis raug.
Kauj Ruam 6: Tsim DriveTrainCommand
- Thawj zaug pib los ntawm kev mus rau cov ntawv qhia zaub mov uas peb tau siv los tsim lub hauv paus thiab cov neeg hlau ua haujlwm nws tus kheej (qhov no yog zaum kawg kuv yuav qhia qhov no tiag tiag hauv cov kauj ruam yav tom ntej Kuv yuav hais tsuas yog ua kom hais kom ua lossis ua subsystem thiab koj yuav xav tias nws nyob hauv cov ntawv qhia zaub mov no.) Nyem qhov hais kom ua thiab sau cov npe hauv chav kawm nrog DriveTrainCommand (yog tias koj hloov cov npe ntawm cov ntawv no koj tsis tuaj yeem muaj lawv ib yam).
- Hauv DriveTrainCommand tshiab koj yuav pom tias muaj 6 txoj hauv kev ib tus yog tus tsim thiab lwm 5 yog ib feem ntawm cov cai uas neeg hlau yuav hu thaum cov lus txib ua haujlwm. Peb paub tias tus tsim khoom ua dab tsi thiaj li piav qhia Initialize, ua tiav, ua tiav, xaus, thiab cuam tshuam. Initialize yog hu ua ib zaug txhua lub sijhawm hais kom ua hu ua, txoj kev ua haujlwm raug hu ua txuas ntxiv mus txog thaum cov lus txib xaus, uas yog tshwm sim los ntawm kev ua tiav thaum isFinished txoj kev rov muaj tseeb cov lus txib yuav tsum tsis ua haujlwm, Txoj kev kawg yog hu ua ib zaug tom qab isFinished txoj kev raug hu, thiab kev cuam tshuam tau raug hu thaum cov lus txib cov peev txheej tau siv los ntawm lwm cov lus txib thiab cov lus txib yuav xaus (yam tsis tau hu txoj kev kawg).
- Ua ntej hauv DriveTrainCommand hauv tus tsim koj yuav tsum ntxiv kab uas xav tau (yuav tsum tau (Robot. DriveTrainSub)) ceeb toom tias DriveTrainSub tsis zoo ib yam li lub npe subsystem thiab uas yog lub hom phiaj.
Kauj Ruam 7: Dhia rau Neeg Hlau
- Tom ntej no peb yuav dhia mus rau Chav Kawm Neeg Hlau
- tom qab ntawd peb yuav hloov txoj kab (pej xeem zoo li qub piv txwvSubsystem piv txwvSubsystem = tshiab piv txwvSubsystem ();) mus rau (pej xeem zoo li qub DriveTrainSubsystem DriveTrainSub = tshiab DriveTrainSubsystem ();) pom thawj lub npe tom qab zaum kawg yog tib yam li lub npe subsystem thiab lub npe tom qab tshiab kuj pom tias DriveTrainSub zoo ib yam li lub npe uas peb muab tso rau hauv peb cov kauj ruam kawg thiab nws tsis zoo ib yam li lub npe subsystem (Koj YUAV TSUM muaj lub npe khoom (DriveTrainSub) uas tsis zoo ib yam li lub subsystem npe).
- Tom qab ntawv ntshuam peb DriveTrainSubSystem.
- Tom ntej no peb yuav tshem kab (chooser.addDefault ("Default Auto", Piv txwv tshiabCommand ());)
- Tom qab ntawd tshem tawm cov khoom siv uas tsis siv.
- Ces txuag.
Kauj Ruam 8: Rov Qab Mus rau DriveTrainCommand
- ntshuam neeg hlau (tus thib ob hauv daim duab)
- Ces Txuag
Kauj ruam 9: Mus rau DriveTrainSub
- Ntshuam DriveTrainCommand
- Ces txuag.
Kauj Ruam 10: Tom ntej no Peb Yuav Tsim OI Code
- Mus rau OI.
- Tsim cov khoom siv pej xeem joystick tshiab nrog qhov chaw nres nkoj 0.
- Thiab tshem tawm cov khoom siv uas tsis siv.
- Txuag.
Kauj ruam 11: Mus rau DriveTrainCommand
- Mus rau DriveTrainCommand.
- Tam sim no peb yuav ua ib feem uas coj tus joysticks thiab siv lawv txav tus neeg hlau. Sab hauv qhov ua tiav (vim nws ua tas li) ntxiv kab (Robot. DriveTrainSub.arcadeDrive (Robot.oi. Driver.getRawAxis (1), Robot.oi. Driver.getRawAxis (4));) qhov twg peb hu arcadeDrive hauv peb subsystem nrog qhov muaj nuj nqis ntawm Robot.io. Driver.getRawAxis (1) uas rov qab tus nqi ntawm tus joystick thiab qhov twg 1 yog txoj kab ntawm sab laug y axis thiab zoo ib yam rau tus nqi thib ob tshwj tsis yog 4 yog txoj cai x axis. yog li qhov no yuav txhais tau tias sab laug yuav mus rau tom ntej thiab thim rov qab thiab txoj cai lo yuav mus rau sab xis thiab sab laug. (yog tias koj xav tau koj tuaj yeem rov qab mus rau RobotMap thiab tsim qhov txiaj ntsig tshiab rau lub axis joystick ces hu lawv nrog RobotMap. (lub npe ntawm axis) thiab tsis txhob hnov qab ua lawv kawg yog tias koj ua li no.)
- Tom ntej tshem tawm cov khoom siv uas tsis siv los ntawm tag nrho txoj haujlwm.
Kauj Ruam 12: Thaum kawg Sau thiab Xa Cov Cai rau Tus Neeg Hlau
Pom zoo:
D.I.Y YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM LOS NTAWM SCRAPS: 4 Cov Kauj Ruam (nrog Duab)
D.I.Y YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM LOS NTAWM SCRAPS: Hnub no kuv xav qhia yuav ua li cas kom pom lub teeb pom kev zoo los ntawm lub zog xa hluav taws xob tsis siv hluav taws xob los ntawm tus txhuam txhuam hniav thiab lub tshuab solenoid valve coils uas tau khaws los ntawm scrapyard.Ua ntej pib, thov saib cov vis dis aus hauv qab no:
Music Reactive Light -- Yuav Ua Li Cas Kom Yooj Yim Yooj Yim Suab Nkauj Reactive Teeb rau Ua Duab Awsome.: 5 Kauj Ruam (nrog Duab)
Music Reactive Light || Yuav Ua Li Cas Super Yooj Yim Music Reactive Light rau Ua Duab Awsome.: Hav whats up guys, Hnub no peb yuav tsim ib txoj haujlwm zoo heev. ntses bass thaj tsam uas yog qhov tsawg-zaus suab teeb liab. Nws yog qhov yooj yim heev los tsim.Peb yuav
Yuav Hloov Yooj Yim Li Cas "Teeb/LED" Kos Npe Rau Kev Yooj Yim Arduino: 7 Cov Kauj Ruam (nrog Duab)
Yuav Hloov Yooj Yim Li Cas "Lub Teeb/LED" Kos Npe Rau Kev Yooj Yim Arduino Programming: Hauv cov lus qhia no kuv yuav qhia seb leej twg tuaj yeem tig ib yam dab tsi nrog teeb rau hauv qhov programmable arduino teeb nyem lossis " Tsiv Lub Teeb "
YUAV UA LI CAS YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM TSHAJ PLAWS YOOJ YIM: 4 Cov Kauj Ruam
YUAV UA LI CAS YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM TSHAJ PLAWS: Nyob zoo txhua tus hauv cov lus qhia no kuv yuav qhia koj yuav ua li cas kom yooj yim " SOIL DRYNESS SENSOR ". Qhuav ntawm cov av tau txheeb xyuas siv qhov taw qhia coj. Lub teeb ci wi
Yuav Ua Li Cas Thiaj Li Yooj Yim Yooj Yim 'Calendar & Scrapbook (txawm hais tias Koj Tsis Paub Yuav Ua Li Cas Scrapbook): 8 Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Thiaj Li Yooj Yim Yooj Yim 'Calendar & Scrapbook (txawm hais tias Koj Tsis Paub Yuav Ua Li Cas Scrapbook): Nov yog qhov kev lag luam pheej yig (thiab muaj txiaj ntsig ntau!) Hnub so khoom plig rau niam tais yawm txiv. Kuv tau ua 5 daim qhia hnub hli xyoo no rau tsawg dua $ 7 txhua qhov khoom siv: 12 daim duab zoo ntawm koj tus menyuam, menyuam yaus, ntxhais xeeb ntxwv, tub xeeb ntxwv, dev, miv, lossis lwm tus txheeb ze 12 daim sib txawv