Learn with Sciengit
Learn with Sciengit
  • Видео 22
  • Просмотров 91 437
How variables are mapped on memory explained!
Correction: float takes 4 bytes
When a variable is created in a program, it needs to be stored in computer memory so that the program can access and use it. The process of mapping a variable to a memory location is called variable allocation.
The memory location where a variable is stored depends on the type of variable and the programming language being used. For example, a Boolean variable might be stored in one byte of memory, while an integer variable might require four bytes.
Once a variable is allocated to a memory location, the program can access and manipulate its value. It's important to keep in mind that variables can be overwritten by other data stored in the same memory location,...
Просмотров: 41

Видео

30 Seconds Talking Facts | First Episode #shorts
Просмотров 267 лет назад
30 Second Talking Facts. Learn more in less than 30 seconds :D If you like this video, do comment down below with 'Yes I want more 30 Second Talking Facts' and hit like button. Do share this with your friends. Follow our Blog: bit.ly/ZainScienceMedia Subscribe to our RUclips Channel: bit.ly/ZainScienceMediaYT Like our Fb page: bit.ly/ZainScienceMediaFB Follow on Twitter: bit.ly/ZainScienceMedia...
How to Detect The Edges of the Object In 8 Minutes | Object Tracking First Basic Concepts and Code
Просмотров 1227 лет назад
Object Tracking is one of the coolest projects that you can work on. But before you do Object Tracking, you should know how you can Detect the Edges of Object in a picture or in live webcam feed. This video explains how you can achieve that. PS: I am so sorry about voice audio quality, I will soon change my microphone. Github link below - Download the complete project folder with OpenCV propert...
Connect And Use Arduino Via Serial Library In C++ Software | Works With Any IDE!
Просмотров 43 тыс.7 лет назад
This video is an in-depth tutorial on how you can use Arduino with your C software via Serial Port library. Please like, comment, and share this video if you liked this video or learnt something new :) Connect with us: Twitter: iamzainum/ Facebook: Sciengit/ Web: sciengit.ejaarat.com Github: github.com/ZainUlMustafa/ This software is allowed for any user to copy, modify...
OpenCV C++ Tutorial | Blend The Webcam Feed With Any Other Picture
Просмотров 1,9 тыс.7 лет назад
Image Processing OpenCV technique to add weight to a live camera feed/webcam feed/ OR blend two images together to create a new image. Connect with me: Twitter: ZainsOfficial/ Facebook: ZainMedias/ LinkedIn: www.linkedin.com/in/zainsofficial/ Github: github.com/ZainUlMustafa/ This OpenCV software is allowed for any user to copy, modify, merge, and distribute in any of h...
Proxima b in Centaurus- Scientists just discovered the Closest Ever Habitable Exoplanet
Просмотров 7978 лет назад
On 24th August 2016, scientists discovered another exoplanet which lies in a habitable zone. Proxima Centauri is a red dwarf star in the constellation of Centaurus. Proxima b revolves around this red dwarf. Learn more interesting details here: bit.ly/2bydKC0 Visit for more articles and facts: bit.ly/2c8JABe Like us on Facebook: bit.ly/2bXMeMu Follow author on Twitter: bit.ly/2c8K6PH Connect wit...
Zain Science Media new logo animation 2016 | Adobe After Effects
Просмотров 1558 лет назад
Visit: bit.ly/2aKyqjH Follow Zain: bit.ly/2aSJK0H Follow Ashar: bit.ly/2aWhmIl Like our Facebook page for daily facts: bit.ly/2bfBwyU Follow on Google: bit.ly/2bjcdv5 This logo is purely designed on Adobe After Effects. Music taken from www.yookamusic.com Our company members agreed on an idea to change our name a little with the addition of the word 'Science' in the middle of Zain Medias with t...
WE ARE REBRANDING!! Suggest Name and Earn Money!!
Просмотров 298 лет назад
Zain Medias is taking a whole new step towards perfection and a place for opportunity. We are rebranding our name to something which defines our work. We are giving this opportunity to you. And YOU CAN EARN MONEY FROM SUGGESTING US A NAME!! Suggest your name here: bit.ly/2aacikw Write for Us: bit.ly/2aw5HVz Contact Us here: bit.ly/2ac0pPh Find us on Facebook: bit.ly/2ahuzOi Follow the Founder: ...
Save energy and money like a pro!
Просмотров 558 лет назад
Save Energy a Professional Way - How do you do it? www.zainsofficial.blogspot.com/saveit.html
Zain Medias' Redesigned Logo 2016
Просмотров 348 лет назад
Redesigned logo with some secret touches by @ZainsOfficial. Please thumbs up if you like this work. It is not fancy, but it looks elegant and neat. Please thumbs up if you like it!
Wordy Humor ;)
Просмотров 178 лет назад
Read the hilarious meanings of words.
Super Saturn 200x larger than Saturn
Просмотров 5579 лет назад
Super Saturn 200x larger than Saturn
Intro Animation
Просмотров 79 лет назад
Intro Animation
Everyday food that can kill you!
Просмотров 589 лет назад
Everyday food that can kill you!
In Time Do Future Exists? ep 2
Просмотров 7210 лет назад
In Time Do Future Exists? ep 2
How small are we?
Просмотров 23310 лет назад
How small are we?
Visit to Gliese 581g and Kepler 22b
Просмотров 42 тыс.10 лет назад
Visit to Gliese 581g and Kepler 22b

Комментарии

  • @leslieporter3350
    @leslieporter3350 Год назад

    *PromoSM* 🤦

  • @denisegroce7135
    @denisegroce7135 Год назад

    She was actually ugly and she wasn’t Egyptian/African, she was a Greek colonizer! Stop making this white woman the face of ancient Egypt. You whites are mad about that Netflix movie, but keep trying to pass this Greek woman off as Egyptian, you can’t have it both ways!

    • @Sciengit
      @Sciengit Год назад

      There is no dispute over her origins. She was a Greek but no one can deny that she was among the most powerful strategists.

  • @Ninjacat9000Ilovebigfloppa
    @Ninjacat9000Ilovebigfloppa 2 года назад

    Thank you

  • @mistykal
    @mistykal 2 года назад

    Hi, good tutorial. I able to get something but the string print as some weird character. Did I miss something? Edit: nvm. figured it out. change the baud solve the issue. 115200 -> 9600

  • @mozarellachan5854
    @mozarellachan5854 2 года назад

    any tutorial on how to read and store data from Arduino into C++ program to be processed?

  • @lamphanvan6049
    @lamphanvan6049 2 года назад

    Hey. Thank you for excellent video. I want to receive integer value instead string and i have used atoi() to convert from string to integer. However, I met a problem. If we send string "123", it will show on console as "123" , but then if we send string "23", it shows as " 233". How can I display as "23" when previously sent "123". Please help me, thank you very much.

  • @alexjimenez6020
    @alexjimenez6020 2 года назад

    Thank you Sir! Very helpful video!!

  • @rodrigogrego5762
    @rodrigogrego5762 2 года назад

    Thanks. You are a great programmer, congratulations. From, Brazil.

  • @vini9598
    @vini9598 2 года назад

    What does \\\\. \\ do ?

    • @Sciengit
      @Sciengit 2 года назад

      Consider it like an escape sequence.

  • @AshrafulHussainKhan
    @AshrafulHussainKhan 2 года назад

    As per your introduction "How to process information which Arduino can't. Eg. Camera information". For your example actually I have to keep the PC connected to obstacles avoider and walk along with the device as the processing will happen on the PC. Are you suggesting this? If someone want to use a camera for image processing why don't you think people will not use the host system directly to connect the camera instead of the Arduino there. Anyways, great effort.

    • @Sciengit
      @Sciengit 2 года назад

      For example drones tethered to the on ground control station (can be a PC) via a cord. The host system on ground can ask Arduino to trigger the camera and get other on board sensor data. Such info can be dispatched back to the host. Similarly the host can ask servos on the drone to adjust the orientation of the camera or point it towards a certain direction. Such drones are typically used to quickly capture a scene while getting power from the ground as well. No batteries on a drone results in less weight and less thrust. Meaning such drones can be used in surveillance and can stay up for quite a long while.

  • @juniqbeatz1323
    @juniqbeatz1323 3 года назад

    doesn't work at all!

  • @Quarkee
    @Quarkee 3 года назад

    Hey idk if you'll see this but do you happen to know why the data that's sent to the serial buffer *via* the SerialPort header contains a bunch of garbage and extra null characters? Because when I tried to send some other type of data types like numbers e.t.c the Arduino would read a bunch of \0 which messed up the output... *Edit:* I messed up and forgot to change "MAX_DATA_LENGTH" to the size of the data I'm sending. So I just swapped that to "data.size() +1"

    • @Sciengit
      @Sciengit 3 года назад

      Hi. Did you try this: forum.arduino.cc/t/how-to-send-numbers-from-one-arduino-to-another-using-serial/97066 ?

    • @Quarkee
      @Quarkee 3 года назад

      @@Sciengit no, but I solved it. My bad for not editing the original comment. Nice video though!

    • @Sciengit
      @Sciengit 3 года назад

      @@Quarkee great 👍 and thanks for the edit. Others might need it 😄

  • @dc9852
    @dc9852 3 года назад

    Will this serial library work on Linux?

    • @Sciengit
      @Sciengit 3 года назад

      Yes. The only thing you need to check is the port name.

    • @dc9852
      @dc9852 3 года назад

      @@Sciengit But we are using windows.h to make this library. How will it work in Linux? Are you sure?

  • @peerlessrecords6236
    @peerlessrecords6236 3 года назад

    doesnt work. cannot convert from const char [9] to char *

  • @kolopolo2035
    @kolopolo2035 3 года назад

    how you can use the data sent from Arduino? I mean that "Led iS OFF" for example to store it?

    • @Sciengit
      @Sciengit 3 года назад

      Hey, I know it's pretty late but can you explain what do you mean by storing the result?

    • @AB-mf3gk
      @AB-mf3gk 3 года назад

      @@Sciengit To have a file for example which has inputs coming from the Arduino stored in it?

  • @peterraeth4963
    @peterraeth4963 3 года назад

    Truly Superior!! Many thanks for this clear example and explanation. Two Subtle Points: Given my Windows 10 setup with Visual Studio 2019 Community IDE, communication between the PC and the UNO is rather slow. It may be possible to use a faster rate than 9600. Did not try that. However, I did add a Sleep(500) line before attempting to receive a response at the PC from the UNO. This relieved what are essentially non-responses. Also found that longer and shorter messages can cause garbage to be displayed at the PC. This came about because I modified UNO's code to deliver a message when an unrecognized response occurred. For this reason, prior to receiving a response at the PC, I filled the output vector with '\0'. That solved the problem with garbage being in that buffer.

  • @Bouncy_Hippo
    @Bouncy_Hippo 3 года назад

    Hi, thanks so much for this video, its really helpful! What would be the best way to edit the code to read a continuous stream of data like something from an accelerometer? Thanks!

  • @exmachina2600
    @exmachina2600 3 года назад

    Does anybody know how to send ints over serial? Need to send coordinates like "X614Y98" to my Arduino.

    • @Sciengit
      @Sciengit 3 года назад

      You should send "614,98" in string and on Arduino split the string using ',' which will return you an array of 2 string elements. Simply cast them to int. I always would prefer sending strings over any other data type since it's predictable and less prone to errors on sender side.

    • @exmachina2600
      @exmachina2600 3 года назад

      @@Sciengit Wont all of the numbers get converted into nonsense when you convert the string into an array of chars before sending your command over serial?

  • @楊佑國-g7k
    @楊佑國-g7k 3 года назад

    I LUV U

  • @-highvoltage4685
    @-highvoltage4685 3 года назад

    why you have stopped making videos?

    • @Sciengit
      @Sciengit 3 года назад

      Interesting question. I started Sciengit as a fun idea while in my engineering university but after graduation I got involved with other products which does not mean Sciengit was gone. In fact I still try to make sure channel is up and website is running fine. However, Sciengit has become a subsidiary of a tech company, Ejaarat.com (which I co-founded). Currently we are raising funds there and trying to set it up for a year now (which might answer the 2 years of not producing any new content). We are hoping to get some funds and allocate some for Sciengit that can allow me to gather its team and start with production again and also making sure Sciengit remains a free platform (the foundations on which I created this in the first place). Hoping for good times.

  • @ahmednouman9871
    @ahmednouman9871 3 года назад

    Does this work if I run it from Unix say Ubuntu and setting the right port number "/dev/tty..." ?

    • @Sciengit
      @Sciengit 3 года назад

      Yes it will. You just need to change port. Sorry for late reply but I am really really busy these days.

  • @rfdave3980
    @rfdave3980 3 года назад

    This is great. You have shown how to read and write to the serial port. I search and could not find such a valuable tutorial. Thank you Mr. Mustafa

  • @alexspencer8708
    @alexspencer8708 3 года назад

    Is there any way of speed up the writeSerialPort? I have been using this with openCV to balance a ball on a beam and was wondering if there is a way to speed up the writeSerialPort function to be faster than 1 second otherwise it doesn't send any data help please

    • @exmachina2600
      @exmachina2600 3 года назад

      The arduino has a default serial timout of one second. You can change it to a tenth of a second by adding "Serial.setTimeout(10);" to void setup()

  • @manuellonic8952
    @manuellonic8952 3 года назад

    Error on char *port = "\\\\.\\COM3"; a value od type "const char *" cannot be used to initialize an entity of type "char *" I would appreciate some help here

    • @KiemPlant
      @KiemPlant 2 года назад

      I know this is a late response but for anyone having this issue, you can simply cast it to a char* with (char*) char *port = (char*)"\\\\.\\COM3";

    • @lukewalker6961
      @lukewalker6961 2 года назад

      @@KiemPlant Thank you!!! this is what i needed

    • @lukewalker6961
      @lukewalker6961 2 года назад

      Still doesn’t work but at least I don’t have any compiler errors

    • @KiemPlant
      @KiemPlant 2 года назад

      @@lukewalker6961 Yeah the library ended up not working for me either if I recall correctly. My problem wasn't with the COM port but it just didn't function. I eventually found a C# library and used that to make a windows forms app and it worked perfectly for me.

  • @rishabhsstudio1457
    @rishabhsstudio1457 4 года назад

    awesome bro !!!!!!!

    • @Sciengit
      @Sciengit 3 года назад

      Thanks ✌️

  • @teddyhraje5117
    @teddyhraje5117 4 года назад

    Helo, i have a problem with initializing the port, it gives me this error: a value of type "const char*" cannot be used to initialize an entity of type "char*" My line looks like this: char *port = "\\\\.\\COM3";

  • @huistv2005
    @huistv2005 4 года назад

    Thanks for the tutorial and code. Can you point me in the right direction on how to read from the arduino using 'readSerialPort'? I want my program to read a string if a button is pressed on the arduinop side. I can see the string already but how to check the stream? thx edit. I found out myself by setting a string object equal to output. Thanks

  • @muneebmuzammal3987
    @muneebmuzammal3987 4 года назад

    100% Working code! If you got an error in the serial port ("a value of type "const char *" cannot be used to initialize an entity of type "char *"") just do a minor change in code: In your main.cpp the line that you make the pointer to the part, char *port = " ////.//COM3 "; declare it as char port[ ] = " ////.//COM3"; And InshaAllah you're problem will be solved.

  • @mauriziobuzzolo3386
    @mauriziobuzzolo3386 4 года назад

    Do you connect a RS232 or a USB port on pc side ?

  • @cryptolunch5308
    @cryptolunch5308 4 года назад

    Get Free dogecoin at every 5 minutes cryptolaunch.in/free-dogecoin-earning-app/

  • @rccar1515
    @rccar1515 4 года назад

    Great video; thank you! It's the first time that I arrive at accomplishing a serial connection to my Arduino! However I try to send commands to "GRBL" (a motion controller for CNC) and I don't get consistent results. When sending a demand, the first operation seems to be well executed but not the whole "answer" is printed in the terminal. When sending another command apparently there rest fractions of the last command that where shown. WHY?

    • @tomasfederico1247
      @tomasfederico1247 3 года назад

      to send commands i recommend you to use PuTTy

    • @egemenertem3166
      @egemenertem3166 2 года назад

      In the main, try changing cout<<">> "<<output<<endl; to cout << ">> "; for (int i = 0; i < MAX_DATA_LENGTH; i++) { if (output[i] == ' ') { break; } cout << output[i]; } cout<< endl; That is because the array on the Arduino doesn't get erased every time a data is received, instead new data is written on the same array (sometimes 4 bytes at a time etc). Therefore, when you write a long command, then a shorter one, what Arduino actually prints out is the entire buffer it has. However, because is used to indicate the line's end, this one only uses that. This code only works with printing with the code provided. If anyone is having problem directly printing what is read in Arduino, this is the way to print it with .ino code void setup() { // put your setup code here, to run once: Serial.begin(9600); pinMode(13,OUTPUT); } int a=0; void loop() { if(Serial.available()>0){ String info=Serial.readStringUntil(' '); a=!a; digitalWrite(13,a); if(info[0]!=0){ Serial.println(info); } } // put your main code here, to run repeatedly: }

  • @shahilarahman402
    @shahilarahman402 4 года назад

    sounds like robot talking

  • @rollo4127
    @rollo4127 4 года назад

    you know he is dum when the title is " Works With Any IDE " dude do you know how it works

    • @Sciengit
      @Sciengit 3 года назад

      I get your point but most new people are genuinely confused if IDE plays a role in what they code. So lets say if someone is using Dev C++ and sees this video in Visual C++, they get confused. I have taught various people and I know this happens quite often. So title is just to motivate them. Hope you understand.

  • @maczajsci7080
    @maczajsci7080 4 года назад

    Also, unlike many others, the code actually works here

  • @maczajsci7080
    @maczajsci7080 4 года назад

    Thank you very much. This is an excellent video which really explains the individual concepts perfectly.

  • @twopixelaerospace
    @twopixelaerospace 4 года назад

    Getting a variable 'SerialPort::errors' is uninitialized in the .cpp

  • @NghiaTran-be7gn
    @NghiaTran-be7gn 4 года назад

    thanks so much. this video so helful

  • @miraldizgrodnii8784
    @miraldizgrodnii8784 4 года назад

    Thank for your job. Its great!

  • @m.muzammilbabar4375
    @m.muzammilbabar4375 4 года назад

    Thank you Boy! I got an error on port name. But it worked perfectly fine in "Release Mode".

  • @demnyan
    @demnyan 4 года назад

    Thanks you)))

  • @phillbon3457
    @phillbon3457 5 лет назад

    ​ Sciengit can u attached this to a Xamarin.Forms cross platform app, with buttons?

    • @phillbon3457
      @phillbon3457 5 лет назад

      Keeping in mind the UI with buttons is built in C#?

    • @Sciengit
      @Sciengit 5 лет назад

      Hey Phill. My suggestion when you are working to link mobile app with Arduino sensor data is to use some sort of database in between (like Firebase). Arduino will upload data to Firebase and mobile will retrieve data from Firebase. This probably is the easiest, robust, and wireless solution (basically IoT stuff)

  • @sodiko100
    @sodiko100 5 лет назад

    Hello, I am having a problem with your code. I've downloaded it from GitHub and opened it in visual studio code and made sure my comport number is correct, it connects successfully but can not control the led. when I send "ON" for the first time nothing happens but it returns on the console a weird output of 2222. I have no idea what that means. Please help

  • @Johnybbrown
    @Johnybbrown 5 лет назад

    This was totally helpful for my personal arduino project. I now have communication between C++ and arduino. Works in Code Blocks IDE. Only one depricated line and fixed it from the comments here. Great work

  • @aplacefaraway
    @aplacefaraway 5 лет назад

    It's amazing how many bad examples are out there. But this is the best one I've seen. Great job! You should post this on more forums to help people.

    • @Sciengit
      @Sciengit 5 лет назад

      Thanks for your kind words.

  • @OleZZ222
    @OleZZ222 5 лет назад

    If you just want to receive data go for: while (arduino.isConnected()) { arduino.readSerialPort(output, MAX_DATA_LENGTH); cout << output; //delete[] charArray; }

  • @marcuslett7005
    @marcuslett7005 5 лет назад

    How in the hell can humans go there they would have died 300 and 50 thousand years ago

  • @Ashoerchen
    @Ashoerchen 5 лет назад

    Do everybody a favor and have a human read this text and not a car navigation system.

  • @AsdfirePL
    @AsdfirePL 5 лет назад

    Actually works unlike other code thats supposed to work according to the author.

  • @TheMasterScotty
    @TheMasterScotty 5 лет назад

    Hi, first things first, great Video and nice explanation! But when the commands "ON" and "OFF" come very soon after each other, there is no recognition on the Arduino side, this means the LED doesn´t switch the status. Have you any idea why this could be the case?

  • @bernd24
    @bernd24 5 лет назад

    what if i use another BAUD-Rate? can i just change "CBR_9600" to "CBR_115200" in your cpp?

    • @TheMasterScotty
      @TheMasterScotty 5 лет назад

      Yes. You have to change it in the Arduino project and in your VisualStudio project.