Cov txheej txheem:
- Khoom siv
- Kauj ruam 1: Sib sau ua ke
- Kauj Ruam 2: Yuav Ua Li Cas Nruab Lub Tsev Qiv Ntawv?
- Kauj ruam 3: Code
- Kauj ruam 4: Ua si
Video: Arduino Vr: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Nyob zoo Kuv lub npe yog Christian thiab kuv muaj 13 xyoos. Kuv nyiam arduino thiab muaj txuj ci rau nws yog li ntawm no yog kuv qhia rau arduino vr.
Khoom siv
Khoom siv:
1. Arduino board Mega, Due, Uno, lossis Yun.
2. Txiv neej rau txiv neej (tus qauv jumper xov hlau) xov hlau.
3. Cov ntawv me me
4. USB
5. GY-521 MPU-6050
Yeem:
6. 5.5 nti 2560*1440 2K LCD Screen HDMI rau MIPI
7. Fresnel lens Focal Length 50mm
8. 3-D tshuab luam ntawv lossis 3d tshuab luam ntawv pabcuam
Kauj ruam 1: Sib sau ua ke
Siv cov schematic los muab tso ua ke.
Kauj Ruam 2: Yuav Ua Li Cas Nruab Lub Tsev Qiv Ntawv?
Saib ntawm Github: https://github.com/relativty/Relativ Koj tuaj yeem nruab nws siv Git lossis rub tawm ncaj qha.
Kauj ruam 3: Code
// i2cdevlib thiab MPU6050 xav tau:
// Ua tsaug ntau rau qhov ua tau zoo Jeff Rowberg <3, mus xyuas nws cov repo kom kawm paub ntau ntxiv MPU6050. // ======================================================== ================================
// I2Cdev thiab MPU6050 yuav tsum tau teeb tsa ua lub tsev qiv ntawv, lossis lwm qhov.cpp/.h cov ntaub ntawv // rau ob chav kawm yuav tsum muaj nyob hauv txoj hauv kev ntawm koj txoj haujlwm
#suav nrog "Relativ.h"
#suav nrog "I2Cdev.h"
#suav nrog "MPU6050_6Axis_MotionApps20.h"
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE #suav nrog "Wire.h" #endif
MPU6050 mpu; Txheeb sib txheeb;
#define INTERRUPT_PIN 2
// IMU xwm txheej thiab tswj: bool dmpReady = cuav; // muaj tseeb yog tias DMP pib ua tiav uint8_t mpuIntStatus; uint8_t devStatus; // 0 = ua tiav,! 0 = yuam kev uint16_t packetSize; uint16_t fifoCount; uint8_t fifoBuffer [64];
Quaternion q; // [w, x, y, z]
volatile bool mpuInterrupt = cuav; // qhia seb MPU cuam tshuam tus pin tau ploj mus tsis muaj dab tsi dmpDataReady () {mpuInterrupt = muaj tseeb; }
void teeb () {#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE Wire.begin (); Wire.setClock (400000); // 400kHz I2C moos. Tawm tswv yim kab ntawv no yog tias muaj teeb meem sau ua ke #elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE Fastwire:: teeb tsa (400, muaj tseeb); #ib
relativ.startNative (); // "startNative" tuaj yeem siv rau 32-ntsis ARM core microcontroller nrog Native USB zoo li Arduino DUE // uas tau pom zoo. // Relativ.start (); // "pib" yog rau NON-NATIVE USB microcontroller, zoo li Arduino MEGA, Arduino UNO.. // Cov ntawd qeeb qeeb. mpu.initialize (); pinMode (INTERRUPT_PIN, INPUT);
SerialUSB.println (mpu.testConnection ()? F ("MPU6050 kev sib txuas ua tiav"): F ("MPU6050 txuas tsis tau"));
// teeb tsa DMP devStatus = mpu.dmpInitialize ();
// ================================== // muab koj tus kheej gyro offsets ntawm no: // === =============================== mpu.setXGyroOffset (220); mpu.setYGyroOffset (76); mpu.setZGyroOffset (-85); mpu.setZAccelOffset (1788);
// devSTatus yog tias txhua yam ua haujlwm tau zoo yog tias (devStatus == 0) {// qhib DMP, tam sim no nws tau npaj mpu.setDMPEnabled (muaj tseeb);
// pab kom Arduino cuam tshuam kev txheeb xyuas qhov cuam tshuam cuam tshuam (digitalPinToInterrupt (INTERRUPT_PIN), dmpDataReady, RISING); mpuIntStatus = mpu.getIntStatus ();
dmpReady = muaj tseeb;
// tau txais kev cia siab DMP pob ntawv loj rau tom qab sib piv packetSize = mpu.dmpGetFIFOPacketSize (); } lwm {{ERROR! }}
void loop () {// Tsis ua dab tsi yog DMP tsis pib ua kom raug yog (! dmpReady) rov qab;
// tos MPU cuam tshuam lossis pob ntawv ntxiv kom muaj thaum (! mpuInterrupt && fifoCount <packetSize) {}
// rov pib cuam tshuam tus chij thiab tau INT_STATUS byte mpuInterrupt = cuav; mpuIntStatus = mpu.getIntStatus ();
// tau txais FIFO suav tam sim no fifoCount = mpu.getFIFOCount ();
yog ((mpuIntStatus & 0x10) || fifoCount == 1024) {mpu.resetFIFO (); } // kos rau cuam tshuam lwm tus yog (mpuIntStatus & 0x02) {thaum (fifoCount <packetSize) fifoCount = mpu.getFIFOCount (); mpu.getFIFOBytes (fifoBuffer, pob ntawv loj); fifoCount -= packetSize; mpu.dmpGetQuaternion (& q, fifoBuffer); relativ.updateOrientationNative (q.x, q.y, q.z, q.w, 4); // updateOrientationNative "tuaj yeem siv rau 32-ntsis ARM core microcontroller nrog Native USB zoo li Arduino DUE // uas tau pom zoo. //relativ.updateOrientation(qx, qy, qz, qw, 4); // Relativ.updateOrientation" yog rau NON-NATIVE USB microcontroller, zoo li Arduino MEGA, Arduino UNO.. // Cov ntawd qeeb qeeb. }}
Kauj ruam 4: Ua si
txav lub rooj me me ntawm txhua qhov vr game yuav tsum tig lub koob yees duab
Pom zoo:
Arduino Tsheb Rov Qab Chaw Nres Tsheb Ceeb Toom - Cov Kauj Ruam ntawm Kauj Ruam: 4 Kauj Ruam
Arduino Tsheb Rov Qab Chaw Nres Tsheb Ceeb Toom | Cov kauj ruam ib kauj ruam: Hauv txoj haujlwm no, kuv yuav tsim qhov yooj yim Arduino Tsheb Rov Qab Tsheb Nres Tsheb Nres Sensor Siv Arduino UNO thiab HC-SR04 Ultrasonic Sensor. Qhov no Arduino raws Lub Tsheb Rov Qab ceeb toom tuaj yeem siv rau Kev Tshawb Fawb Txog Tus Kheej, Robot Ranging thiab lwm yam
Tsev Automation Kauj Ruam ntawm Kauj Ruam Siv Wemos D1 Mini Nrog PCB Tsim: 4 Kauj Ruam
Tsev Automation Kauj Ruam Ib Leeg Siv Wemos D1 Mini Nrog PCB Tsim: Tsev Automation Kauj Ruam los ntawm Kauj Ruam siv Wemos D1 Mini nrog PCB Tsim cov tub ntxhais kawm ntawv qib siab. Tom qab ntawd ib tus ntawm peb cov tswv cuab tuaj
RC Taug Qab Neeg Hlau Siv Arduino - Kauj Ruam Ib kauj ruam: 3 Kauj Ruam
RC Tracked Robot Siv Arduino - Kauj Ruam Ib Nrab: Hav guys, Kuv rov qab los nrog lwm tus neeg hlau txias chassis los ntawm BangGood. Vam tias koj tau dhau los ntawm peb cov phiaj xwm yav dhau los - Spinel Crux V1 - Tus Cwj Pwm Tswj Tus Neeg Hlau, Spinel Crux L2 - Arduino Xaiv thiab Muab Neeg Hlau nrog Robotic caj npab thiab Badland Braw
Kawm Yuav Ua Li Cas Kos Tus Tswm Ciab - Kauj Ruam Ib Kauj Ruam: 6 Kauj Ruam
Kawm Yuav Ua Li Cas Thiaj Li Tswmciab - Kauj Ruam Ib kauj ruam: Cov tswm ciab no siv sijhawm 10 feeb los kos yog tias koj ua raws kuv cov kauj ruam ua tib zoo
DIY Arduino Robotic Arm, Kauj Ruam ntawm Kauj Ruam: 9 Kauj Ruam
DIY Arduino Robotic Arm, Kauj Ruam ntawm Kauj Ruam: Cov ntawv qhia no yog qhia koj yuav tsim lub Caj Npab Caj Npab ntawm koj tus kheej li cas