In this video lesson we take you through assembly of the lower deck of the Elegoo Smart Car Version 3.0. We show the complete build of the lower deck. If you want to play along at home, you can grab your gear HERE.
New Robotic Training Tutorials
We are excited to announce that we will be doing a robotic tutorial series. Our number one request from our followers over the last few years has been to do a training class for beginners on robotics. You ask for it, now you have it. This training series will be based on the Elegoo Smart Car Version 3. To play along at home, you can grab your gear HERE:
Jetson Xavier NX Lesson 5: Improving Raspberry Pi Camera Image Quality in Gstreamer
In this video we show you the keys to radically improving the image quality from the Raspberry Pi Camera. We show how to set Gstreamer caps and props in OpenCV to get stunning image ‘pop’ from this inexpensive camera. If you follow this lesson you will be able to get better image quality from your Raspberry Pi cameras.
The code below has the improved camSet string we developed in this lesson. I have noticed that there can be variation between different Raspberry Pi cameras. Hence, you can adjust the parameters to get the best quality image from your particular camera. Also, results will depend on lighting conditions. You can adjust the wbmode to match your lighting situation, and you can tweak the contrast, brightness and saturation to dial in the perfect picture quality.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | import cv2 print(cv2.__version__) width=1280 height=720 flip=2 camSet='nvarguscamerasrc sensor-id=0 ee-mode=1 ee-strength=0 tnr-mode=2 tnr-strength=1 wbmode=3 ! video/x-raw(memory:NVMM), width=3264, height=2464, framerate=21/1,format=NV12 ! nvvidconv flip-method='+str(flip)+' ! video/x-raw, width='+str(width)+', height='+str(height)+', format=BGRx ! videoconvert ! video/x-raw, format=BGR ! videobalance contrast=1.3 brightness=-.2 saturation=1.2 ! appsink ' #camSet='nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM), width=3264, height=2464, framerate=21/1,format=NV12 ! nvvidconv flip-method='+str(flip)+' ! video/x-raw, width='+str(width)+', height='+str(height)+', format=BGRx ! videoconvert ! video/x-raw, format=BGR ! appsink' #camSet ='v4l2src device=/dev/video1 ! video/x-raw,width='+str(width)+',height='+str(height)+',framerate=20/1 ! videoconvert ! appsink' cam=cv2.VideoCapture(camSet) while True: _, frame = cam.read() cv2.imshow('myCam',frame) cv2.moveWindow('myCam',0,0) if cv2.waitKey(1)==ord('q'): break cam.release() cv2.destroyAllWindows() |
Jetson Xavier NX Lesson 2: Installing Visual Studio Code on NVIDIA Jetpack 4.4
In this video lesson, we show you how to install Visual Studio Code (code-oss) on the NVIDIA Jetson Xavier NX. We take you through the process step by step. If you want to play along at home, you can get the gear you need HERE.
Arduino Tutorial 66: Controlling DC Motor, Speed and Direction with a Remote
In this lesson we develop a project that allow Remote Control of the speed and direction of a DC Motor. We use an Arduino Nano, and components from the Elegoo Kit. Also, to facilitate a clean build, we use Straight Jumper Wires.
The motor is connected according to this schematic:
Also, the remote control receiver is connected as follows: R on Remote to 5V, G on Remote to Ground, and Y on the Remote to Arduino Digital Pin 9. Go back and check out Tutorial 65 if you need more details on the Remote Module Connections.
In this video we will take you step by step through the build and coding for the project.
The code below is the software we developed in the video.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | #include <IRremote.h> int IRpin=9; IRrecv IR(IRpin); decode_results cmd; String myCom; int speedPin=5; int dir1=4; int dir2=3; int mSpeed=255; void setup() { Serial.begin(9600); IR.enableIRIn(); pinMode(speedPin,OUTPUT); pinMode(dir1,OUTPUT); pinMode(dir2,OUTPUT); digitalWrite(dir1,HIGH); digitalWrite(dir2,LOW); } void loop() { while (IR.decode(&cmd)==0){ } delay(1500); IR.resume(); if (cmd.value==0xFF6897){ myCom="zero"; Serial.println(myCom); } if (cmd.value==0xFF30CF){ myCom="one"; Serial.println(myCom); } if (cmd.value==0xFF18E7){ myCom="two"; Serial.println(myCom); } if (cmd.value==0xFF7A85){ myCom="three"; Serial.println(myCom); } if (cmd.value==0xFF10EF){ myCom="four"; Serial.println(myCom); } if (cmd.value==0xFF38C7){ myCom="five"; Serial.println(myCom); } if (cmd.value==0xFF5AA5){ myCom="six"; Serial.println(myCom); } if (cmd.value==0xFF42BD){ myCom="seven"; Serial.println(myCom); } if (cmd.value==0xFF4AB5){ myCom="eight"; Serial.println(myCom); } if (cmd.value==0xFF52AD){ myCom="nine"; Serial.println(myCom); } if (cmd.value==0xFFA25D){ myCom="pwr"; Serial.println(myCom); } if (cmd.value==0xFF629D){ myCom="v+"; Serial.println(myCom); } if (cmd.value==0xFFE21D){ myCom="fun"; Serial.println(myCom); } if (cmd.value==0xFF22DD){ myCom="rew"; Serial.println(myCom); } if (cmd.value==0xFF02FD){ myCom="play"; Serial.println(myCom); } if (cmd.value==0xFFC23D){ myCom="ff"; Serial.println(myCom); } if (cmd.value==0xFFE01F){ myCom="dn"; Serial.println(myCom); } if (cmd.value==0xFFA857){ myCom="v-"; Serial.println(myCom); } if (cmd.value==0xFF906F){ myCom="up"; Serial.println(myCom); } if (cmd.value==0xFF9867){ myCom="eq"; Serial.println(myCom); } if (cmd.value==0xFFB04F ){ myCom="st"; Serial.println(myCom); } if (myCom=="pwr"){ digitalWrite(dir1,LOW); digitalWrite(dir2,HIGH); analogWrite(speedPin,255); } if (myCom=="fun"){ digitalWrite(dir1,LOW); digitalWrite(dir2,HIGH); analogWrite(speedPin,0); } if (myCom=="ff"){ digitalWrite(dir1,LOW); digitalWrite(dir2,HIGH); analogWrite(speedPin,mSpeed); } if (myCom=="rew"){ digitalWrite(dir1,HIGH); digitalWrite(dir2,LOW); analogWrite(speedPin,mSpeed); } if (myCom=="up"){ mSpeed=mSpeed+15; if (mSpeed>255){ mSpeed=255; } analogWrite(speedPin,mSpeed); } if (myCom=="dn"){ mSpeed=mSpeed-15; if (mSpeed<0){ mSpeed=0; } analogWrite(speedPin,mSpeed); } } |