Arduino Gestures with MPU6050 Accelerometer - 2016-12-22

Поділитися
Вставка
  • Опубліковано 25 сер 2024

КОМЕНТАРІ • 75

  • @kayakdream
    @kayakdream 9 місяців тому

    7 years later this is still extremely helpful.

  • @TikoGhazaryan
    @TikoGhazaryan 7 років тому +3

    I like the start of your video:D and not only! You are uploading very interesting stuff and I hope you will get more views on them! Cheers!

  • @Funni5
    @Funni5 6 років тому +1

    This was what i was look for hours for .thanks for make this video

  • @HariWiguna
    @HariWiguna 7 років тому +9

    Interesting content well explained. Great video! Thanks for sharing your knowledge.

    • @Dastardlylabs
      @Dastardlylabs  7 років тому +1

      Thanks! I hope you get some use out of it.

  • @MatthewTaylorAu
    @MatthewTaylorAu 5 років тому +1

    this is good, thanks for posting. Very relaxing to listen to. Just what a stressed coder needs while debugging :)

  • @wazzupweek
    @wazzupweek 3 роки тому

    Damn cool video

  • @SunSun0712
    @SunSun0712 3 роки тому

    my advice to you, look at dynamic time warping, you can normalize all three axis and get even more complex curves recognized very easy

    • @faissalboullauazan4770
      @faissalboullauazan4770 3 роки тому +1

      Hey Šimun Čanić, did this work for you, cause it didn't xork for me. And I was wondering if you could explain it to me please. And thank you again.

  • @codeIMperfect
    @codeIMperfect 5 років тому +1

    Hey according to command prompt, port 3 is opened, but no graph is appearing!!
    What should I do? Well not even empty graph is there, just two grey lines on the top

  • @georgeiordache9958
    @georgeiordache9958 4 роки тому

    Great video

  • @matthewgraham176
    @matthewgraham176 7 років тому +2

    I'm trying to work through your tutorial but I get this when using the command prompt. C:\Users\mjgra\Downloads\SerIOGrapher-master>npm install command-line-args serialport socket.io socket.io-serialport
    'npm' is not recognized as an internal or external command,
    operable program or batch file.
    Whats up with that?
    Thanks,
    matt

    • @Dastardlylabs
      @Dastardlylabs  7 років тому

      The npm command comes with node, so it sounds like node.js isn't installed properly. Node is supposed to add itself to your path so the command window will find it when you type out `node` or `npm`
      A couple of things you could try here:
      1. reinstall node.js to see if that fixes things (also be sure to open a fresh command window after, since that path change won't be available in an existing command window)
      2. if the above didn't fix it, check that nodejs is installed in "C:\Program Files
      odejs\" or "C:\Program Files (x86)
      odejs" If so you'll just have to use the full path so "C:\Program Files
      odejs
      pm" (here quotes are important) instead of just npm. Similarly "C:\Program Files
      odejs
      ode.exe" instead of node.

  • @jensenlam6466
    @jensenlam6466 7 років тому

    Hey just stumbled upon this video and the information on making a graph is extremely helpful thank you. I myself am working with the MPU and have started using Arduino this year and having 1 year experience in computing before that . Right now I'm trying to use the MPU 6050 to measure the acceleration on a servo at different delays. The MPU accelerometer speaks in G's and the output in the serial monitor is so fast and I can't seem to find a pattern. So I am basically trying to find the correlation between servo delay and acceleration in G's. Any reply at all would be very helpful. Thanks and keep uploading great content.

  • @aestedits4150
    @aestedits4150 2 роки тому

    Hey Bro, I am working on Hand Gestures Recognition with the help of MPU 9250. Do you have dataset about this project?

  • @ohnowell
    @ohnowell 6 років тому

    Okay so I struggled immensely with getting this to work, but after some problem solving I got it to work in my Windows VM (on my Macbook) and even on my Macbook in Mac OS itself!
    (Both): I advice downloading the older version of Node.js, probably the version shown in the video. With the newest version it didn't work, because the modules you're downloading didn't seem to align well with the Node.js (but I have to say that this error occurred in the beginning of my solving adventure, so maybe after with the below tweaking it might not be a problem).
    (Windows): when I tried downloading the node_modules with nvm in Windows (VM, but also on a fellow student's MSI laptop with boot Windows), it seems like it wouldn't download all the modules. Because of this it would generate an exception, because the application couldn't find the needed modules. I don't know why this happened, but when I copied the modules that were downloaded in Mac OS (there it seemed to download them all), it worked fine on Windows VM!
    (Mac): First, make sure to comment the process.exit, because the OS indeed isn't Windows or Linux, but you want the process to be able to continue. Second, since ports aren't numbers in Mac OS, but names, the parseInt of the port_number (imported from the commandline) will generate an NaN. By making the port_number a String, and deleting the parseInt around line 55 (I changed some things, so it may not be the same line).
    I know I wrote this very cryptically, but if anyone would like my rewritten code, let me know, and I'll upload it to GitHub. It isn't very universal, but you may understand better what to tweak. I may even be able to write a more universal version, that also supports Mac OS, but I know have to continue with my project that I needed this webinterface for haha.

    • @MuhammadFaisal-wg9sq
      @MuhammadFaisal-wg9sq 6 років тому

      my email : mynameismuhammadfaisal@gmail.com tq in advance

    • @faissalboullauazan4770
      @faissalboullauazan4770 3 роки тому

      OhNoWell. I know this video has been uploaded more than 4 years ago but can you still send me the modified code. my email: faissal.b@hotmail.com, thanks in advance.

  • @provokg
    @provokg 4 роки тому

    Thnku 🙌

  • @KyleSkrinak
    @KyleSkrinak 4 роки тому

    Thank you for putting this demonstration together. I was hopeful I could give it a run, but it seems the node.js ecosystem moves too quickly?
    `brew install node` installs version 14.6.0, on my MacOS 15.16 and in my resulting environment, I cannot get the socket.io-serialport to install without error. All other prerequisites install without error. I'm not a node.js developer, so I'm at the mercy of a clean installation. Any ideas welcomed.

  • @josef.prosek
    @josef.prosek 7 років тому +1

    Absolutely fantastic :) Do you plan to do video about calibrating this sensor?

    • @Dastardlylabs
      @Dastardlylabs  7 років тому

      Thanks! Originally I had planned to include that as one of the steps in this video, but I decided before filming that it wasn't essential to understanding the process so I skipped it. I'd like to keep my videos as trimmed and concise as I can.
      Calibration isn't hard for this sensor though. Just run the IMU_Zero example sketch included with the MPU6050 library and it will give you offsets to plug back into your future programs.

    • @josef.prosek
      @josef.prosek 7 років тому

      I have tried to find tutorial on how to calibrate it, but unfortunately with no succes. Internet is full of examples and tutorials how to calibrate this sensor in just one plane. So relative changes can be considered quite acurate for lot of projects, but if one want to measure absolute position and changes in all three planes it is not sutable.
      As far as I know there should be 3 times 3 matrix describing relation between all planes and offset should be calculated as "right side of matrix" (not sure if this if right term in english). But creating such a matrix is far beyond my knowledge of physics :/

    • @Dastardlylabs
      @Dastardlylabs  7 років тому

      I never needed to calibrate beyond using the IMU_Zero sketch. Detecting my simple gestures doesn't require a great degree of precision.
      Perhaps one of these MPU6050 projects might help get you closer to what you need?
      hackaday.com/2016/09/13/bewegungsfelder-is-a-wireless-imu-motion-capturing-system/
      hackaday.io/project/9165-2-axis-stabilization-w-6dof-mpu6050-and-arduino

  • @irweezyy
    @irweezyy 5 років тому

    When I open the graph there is no actual rectangle graphs for the data to show, it is just a grey line and a second grey line beside the first one. Anything I am doing wrong? All installs and commands have performed as instructed, but nothing showing for graphs.

  • @brettbecker7979
    @brettbecker7979 6 років тому +1

    I am using COM4 and was getting blank graphs. Hard setting the port to COM4 in public/index.html and public/main.js fixed my issue.

    • @Dastardlylabs
      @Dastardlylabs  6 років тому

      Brett Becker I've been meaning to update the project to allow passing in the serial port number as a command switch or environment variable instead of hard coding. Just haven't gotten to it yet.

  • @jorenjoly6488
    @jorenjoly6488 3 роки тому

    Looks like serial node from Emerging Technology advisors is down. Is there a way to get around that? Every time I do the npm install it fails ...

  • @redonlacaj6281
    @redonlacaj6281 7 років тому

    You previously did some videos about using hc-05 with HID to send physical keyboard and mouse commands. What about using HC-05 to send MPU6050 gestures as commands to the computer as HID? For example, turn hand upwards to scroll up, hand downwards to scroll down, mouse movement data, etc. It would be awesome if you would suggest me some way how to do this. Awesome videos btw

    • @Dastardlylabs
      @Dastardlylabs  7 років тому

      That's really interesting. It's certainly possible. The way I'm currently implementing gestures is kinda bone-headed though, they all need to be rigidly pre-defined in the arduino code. So FYI, If you wanted to be able to add/record gestures on the fly, my current technique wouldn't handle it. That said, it shouldn't be very hard at all to, for instance, fire a "page-up" key when lifting your hand instead of flashing the LED.
      Once you have the HC-05 wired in, it's just waiting for serial data to send to the host machine. All you have to do is add some lines to the gesture detecting function where you use Serial.write to send the keystroke.
      Something like this:
      Serial.write((uint8_t)0xFE); // BT-HID: Start Byte (shorthand version)
      Serial.write((uint8_t)0x02); // BT-HID: Data Length
      Serial.write((uint8_t)0x00); // BT-HID: no modifiers
      Serial.write((uint8_t)0x4B); // BT-HID: Page-Up
      Serial.write((uint8_t)0x00); // BT-HID: optional second keystroke

  • @Tutoritutorial
    @Tutoritutorial 4 роки тому

    when i run the "node acc_serial_socket.js -l" command, i get stuck on listening on 8080

  • @jtleaming
    @jtleaming 7 років тому

    Just a heads up, the acc_serial_socket does not work with npm_serialport version 5.0.0.

  • @crysise94
    @crysise94 6 років тому

    something is really strange I opened index.html and it shows nothing upon inspecting I suspect the html file is missing some code could any one verify and tell ,all i get is two dashed lines using chrome

  • @i3130002
    @i3130002 5 років тому

    Now days there is a plot monitor on Arduino ide > tools

  • @orkunvemosi
    @orkunvemosi 6 років тому

    Thanks for the code mate! I am making a calorie tracker for a skateboard and wish to know the road slope in order to calculate calorie expenditure. How would you suggest I deal with the false readings I get due to vibration?

    • @Dastardlylabs
      @Dastardlylabs  6 років тому

      Can't say how effective it might be for your particular use case, but in my situation the raw data was similarly noisy. I smoothed out the graph by taking an average of the previous N raw values. Don't recall what count I used, but It's likely very dependent on your sampling rate. You'll need to experiment, keeping in mind that values of N too high will over-smooth your graph and be practically useless.

  • @idontknowwhoisthis8346
    @idontknowwhoisthis8346 6 років тому

    i need to connect 5 mpu9250 to ardino . What to do?

  • @dominicdienst5315
    @dominicdienst5315 6 років тому

    How did you work out the running average? Did you use MATlab or another type of signal processing software?

    • @Dastardlylabs
      @Dastardlylabs  6 років тому

      No this was pretty simple and done in the code (on the arduino if I recall correctly, though it could just as easily be performed in the js app). I maintained an array of the previous N raw values per axis, and took their average for displaying the smoothed graph.

  • @kumareshj7741
    @kumareshj7741 6 років тому

    i just need 10 values each after 3 sec wat changes i have to make in the code

  • @razakshafthar3520
    @razakshafthar3520 6 років тому

    I am getting stuck on the graph part. My serial is working on the Arduino IDE but no pattern(blank) is showing in the accelerometer graph in chrome. .

    • @Dastardlylabs
      @Dastardlylabs  6 років тому

      Razak Shafthar it could be that your serial port number is different than my hard coded default of com3. If you know your port number there's only 1 or 2 places it needs to be updated.

  • @oldsilenthill1
    @oldsilenthill1 6 років тому

    nice work!!!, i cant find the smooth mpu6050 ino code, how you smooth the raw data?

  • @navyanshmalhotra7161
    @navyanshmalhotra7161 7 років тому

    Hi - My serial on the Arduino IDE is working but the graph running on chrome, edge is blank.
    When I run; node acc_serial_socket.js -l
    I get:
    COM6
    USB\VID_2A03&PID_0043\55338343539351117191
    Arduino Srl (www.arduino.org).
    Not a FTDI
    Thank you in advance

  • @PerchEagle
    @PerchEagle 5 років тому +1

    I'm confused now, all accelerometer, gyroscope and magnetometer look they do the same job which detect tilt effects! What is the actual difference between these modules?

  • @siddharthasen5677
    @siddharthasen5677 6 років тому

    can you please help me fix a code for a arduino seismograph? will remain ever grateful

  • @simkopat61
    @simkopat61 6 років тому

    i want to make gyroscope joystick controller and butons with arduino uno are you can help me thx

  • @happygunawan4072
    @happygunawan4072 7 років тому

    when i open port using cmd, the arduino stop working and give me message "port is busy" and when i close cmd, the arduino work again, any solution ?

    • @Dastardlylabs
      @Dastardlylabs  7 років тому

      That will happen if your Arduino IDE is still listening to the serial port, or the command is listening to the wrong port. Check the port number in the Arduino software and be sure to kill any Serial Monitor windows that are active.
      Finally in the command, you can specify the port number with -p (as shown at 4:30 )

    • @happygunawan4072
      @happygunawan4072 7 років тому

      still didnt work thou,, when i install npm i get some warn like :
      npm WARN enoent ENOENT: no such file or directory, open 'D:\SerIOGrapher-master\package.json'
      npm WARN SerIOGrapher-master No description
      npm WARN SerIOGrapher-master No repository field.
      npm WARN SerIOGrapher-master No README data
      npm WARN SerIOGrapher-master No license field.
      is it the problem ? and can i use this to get the mpu data into C# ?

    • @Dastardlylabs
      @Dastardlylabs  7 років тому

      It looks like the you may not have typed the complete install command. It should look like this (all in the same line):
      npm install command-line-args serialport socket.io socket.io-serialport

    • @chriswes4746
      @chriswes4746 7 років тому

      Hey, i have the same error. Did you find a solution?

  • @Alify652
    @Alify652 6 років тому

    why the HTML file is not displaying nothing
    just blank page

    • @Alify652
      @Alify652 6 років тому

      solved thank you

    • @milestodzo3279
      @milestodzo3279 6 років тому

      also same problem. how did you solve?

  • @KeithWhittingham
    @KeithWhittingham 5 років тому

    After messing around for quite some time trying to get this working on OSX it suddenly struck me that it's easier to use the Serial Monitor that comes with the Arduino IDE.

  • @Music-lv8xf
    @Music-lv8xf 5 років тому

    Hi, Is there any possible way to record certain gesture? not in the hard coded way? I mean the gesture you suppose to record is limited from flat to vertical? I mean can you make like waving hands and so on that is not limited to the condition that you do in this video.

  • @bigd0102294
    @bigd0102294 5 років тому

    Forgive my ignorance but what are the units on that vertical graph once you got it recording real time?

  • @MikeMcRoberts
    @MikeMcRoberts 7 років тому

    How many different gestures do you have?

    • @Dastardlylabs
      @Dastardlylabs  7 років тому

      Currently it's just the one gesture, going from horizontal to vertical (with the timing constraints to avoid false positives). Eventually I'm going to incorporate it into my Sword of Omens prop in order to trigger some pulsing lights and if I can figure it out, maybe a sound effect as well.

    • @RagefangDK
      @RagefangDK 6 років тому

      Im very interested in your sword of omens prop project, will you make a guide/video on more and advanced gestures ?

  • @Saadzahidkhan
    @Saadzahidkhan 7 років тому

    great video very well explained, im working on a project where we need to decode gestures into text for people who use sign language and we needed something like this, i have a few questions to ask if u can give me ur email itll be great thanks

  • @J3Bait3d
    @J3Bait3d 5 років тому

    On my screen, range of the mapping for the graphs are just at the 20K. How can I expand it to 40k just like yours?

  • @amancheepa5510
    @amancheepa5510 6 років тому

    If i use adxl345 its stil work or not

    • @Dastardlylabs
      @Dastardlylabs  6 років тому

      I'm not familiar with that accelerometer. In theory, yes, but the arduino code will be very different as your module depends on different libraries. I'd recommend working through Adafruit's guide to get the arduino set up for this acc. Once that's working, I think you should just be able to modify the serial.print statements to match the ones used in my arduino code. The node.js part should work without modification.

  • @rohitupadhyay7194
    @rohitupadhyay7194 7 років тому

    Bro can you please help me to connect two mpu6050 to single arduino

  • @pgi5124913
    @pgi5124913 5 років тому

    it doesn't work..

  • @adrienzubcevic4625
    @adrienzubcevic4625 5 років тому

    Interesting content well explained. Great video! Thanks for sharing your knowledge.