#MPU-6050 library
Explore tagged Tumblr posts
electricalinsightsdaily · 8 months ago
Text
MPU-6050: Features, Specifications & Important Applications
The MPU-6050 is a popular Inertial Measurement Unit (IMU) sensor module that combines a gyroscope and an accelerometer. It is commonly used in various electronic projects, particularly in applications that require motion sensing or orientation tracking.
Features of MPU-6050
The MPU-6050 is a popular Inertial Measurement Unit (IMU) that combines a 3-axis gyroscope and a 3-axis accelerometer in a single chip.
Here are the key features of the MPU-6050:
Gyroscope:
3-Axis Gyroscope: Measures angular velocity around the X, Y, and Z axes. Provides data on how fast the sensor is rotating in degrees per second (°/s).
Accelerometer:
3-Axis Accelerometer: Measures acceleration along the X, Y, and Z axes. Provides information about changes in velocity and the orientation of the sensor concerning the Earth's gravity.
Digital Motion Processor (DMP):
Integrated DMP: The MPU-6050 features a Digital Motion Processor that offloads complex motion processing tasks from the host microcontroller, reducing the computational load on the main system.
Communication Interface:
I2C (Inter-Integrated Circuit): The MPU-6050 communicates with a microcontroller using the I2C protocol, making it easy to interface with a variety of microcontrollers.
Temperature Sensor:
Onboard Temperature Sensor: The sensor includes an integrated temperature sensor, providing information about the ambient temperature.
Programmable Gyroscope and Accelerometer Range:
Configurable Sensitivity: Users can adjust the full-scale range of the gyroscope and accelerometer to suit their specific application requirements.
Low Power Consumption:
Low Power Operation: Designed for low power consumption, making it suitable for battery-powered and energy-efficient applications.
Read More: MPU-6050
0 notes
visionsgreys · 2 years ago
Text
Signal path reset for recalibration
Tumblr media
#Signal path reset for recalibration software
#if I2CDEV_IMPLEMENTATION = I2CDEV_ARDUINO_WIRE Arduino Wire library is required if I2Cdev I2CDEV_ARDUINO_WIRE implementation for both classes must be in the include path of your project I2Cdev and MPU6050 must be installed as libraries, or else the.
#Signal path reset for recalibration software
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, IN NO EVENT SHALL THEĪUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,įITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR The above copyright notice and this permission notice shall be included inĪll copies or substantial portions of the Software. To use, copy, modify, merge, publish, distribute, sublicense, and/or sellĬopies of the Software, and to permit persons to whom the Software isįurnished to do so, subject to the following conditions: In the Software without restriction, including without limitation the rights Of this software and associated documentation files (the "Software"), to deal Permission is hereby granted, free of charge, to any person obtaining a copy I2Cdev device library code is placed under the MIT license I2C device class (I2Cdev) demonstration Arduino sketch for MPU6050 class To use this sketch, you will need to have the “ MPU6050” and the “ I2Cdev” libraries installed. It is based on the “Teapot” example sketch which comes with the MPU-6050 Motion Apps library. Here is the code that I used to get the yaw, pitch and roll sensor data.
Tumblr media
1 note · View note
bobsweepmop · 8 years ago
Text
Lynxmotion Quadrino Nano – Raw Sensor Values
The Lynxmotion Quadrino Nano Flight Controller (with GPS) was originally designed as a flight controller for drones but, it also has awesome applications for robotic rovers too. Composed of an ATmega2560 (Arduino Mega Chipset), a collection of sensors, GPS and a host of I/O options it is an ideal “sensor ball” for navigation, positioning and more.
Lynxmotion Quadrino Nano
In this tutorial we’ll be working with a small Arduino program that will give us data from:
the MPU-9150 (gyroscope, accelerometer, magnetometer)
the MS5611 (barometer)
the Venus838FLP (GPS module)
based on the serial command we send to the Arduino. This will give us a starting point for understanding and utilizing the Quadrino Nano’s sensors. In future tutorials we will reference this one as we put this unit to work!
Requirements
Arduino IDE
Lynxmotion Quadrino Nano Flight Controller (with GPS)
The Quadrino-Nano-sensor files (github)
Helpful Experience
This tutorial is targeted at beginners, but some experience with the the Arduino IDE and C++ files (.cpp and .h) is helpful but, not required.
Download and open the files
First, download the files. Second, navigate to the Arduino IDE and go to “Sketch/Include Library/Add .ZIP Library and select ZIP file you just downloaded.
(if you need any help with this step see http://ift.tt/2osKOkd).
Arduino IDE – Library Install
  Then navigate to your Arduino Examples folder. Towards the bottom of the list you will see an item called “QuadrinoNano_SensorDataLibrary”, navigate there and click the “QuadrinoNano_SensorData” item.
  Arduino IDE – Quadrino Example
Upload files to the Quadrino Nano
Next we’re going to upload the files to the Quadrino Nano and work with the code before we dive into the specifics.
Lynxmotion Quadrino Nano – USB Connection
First we need to plug the Quadrino Nano into our computer. Once we have the unit plugged into the computer we need to do two things before we can upload the code.
Arduino IDE – Board
First select the correct Arduino “Board” for the Quadrino Nano from the “Tools” menu. As we discussed above, the Quadrino Nano is an ATmega2560 at heart so we need to select either be the “Arduino/Genuino Mega or 26560” or the “Arduino Mega ADK” depending on your configuration (I had more success uploading with “Arduino Mega ADK”).
Arduino IDE – Port
Second select the appropriate port for your Arduino. If you’re on Windows this may be “COM” followed by a number, on Mac it may be “tty” or something even wilder (like the picture shows below).
Arduino IDE – Upload
Once we have the port and board selected we’re ready to upload the sketch. To upload the sketch, you can press the arrow as shown in the image below or go to “Sketch/Upload” in the menu bar.
Arduino IDE – Uploaded
After uploading you should see a message like the one below without any orange error messages.
If you do have errors, there’s a few things to check:
Make sure the Quadrino Nano is plugged in (this happens to me all the time)
Make sure the proper “Board” is selected from the tools menu
Make sure the proper “Port” is selected from the tools menu
Copy the error message and paste it in Google, often there will be a blog article or a Stack Overflow question about the issue
Check the official Arduino site especially the troubleshooting section
Run some commands
Arduino IDE – Serial Monitor
Now that we have everything uploaded, its time to run some commands. In order to do that we need to open the serial port by pressing the little magnifying glass icon as illustrated in the image below.
Arduino IDE – Serial Settings
Often when we open the Serial Monitor we just see garbage (as you can see in the image below), this usually means we need to set the baud rate to match our project. The baud rate needs to be set to “57600” and line endings should be set to “Both CL & NL”. Use the diagram below to find and set these settings.
Arduino IDE – Serial Commands
Now that all our settings are correct you should see the printout like the image below (if you see some garbage at the very top of the Serial Monitor, don’t worry, that happens when the serial port still has data in it that hasn’t been cleared out).
When you type in a number and press return, the Quadrino Nano starts reading that sensor and will keep reporting its value at a predefined interval until you press enter to stop reading from the sensors (barometer and temperature only read once and stop).
After you’ve had a chance to experiment, we’ll look into some of the details of how we get data from these different sensors.
Diving into the sensor commands
Probably the best way to get an understanding of how we read and interact with the Quadrino Nano’s sensors is to take a look at the code itself. The function names are fairly self explanatory and the included notes by the original developers and myself attempt to make these files as readable as possible. That said, we will take a little time to look at the basics of each sensor below.
MPU-9150 commands and function files
The MPU-9150 is an Accelerometer, Gyroscope and Compass in a single chip. From the manufacturers (InvenSense) website:
The MPU-9150 is a System in Package (SiP) that combines two chips: the MPU-6050, which contains a 3-axis gyroscope, 3-axis accelerometer, and an onboard Digital Motion Processor™ (DMP™) capable of processing complex MotionFusion algorithms; and the AK8975, a 3-axis digital compass. The part’s integrated 6-axis MotionFusion algorithms access all internal sensors to gather a full set of sensor data.
We communicate with it via I2C using the Arduino Wire Library. We read data from the accelerometer, gyroscope and compass in the same way by using a predefined function and predefined register addresses (often doing a two byte read, once for the low byte and again for the high byte).
/* Example - Read the value of the compass X-axis and save the value to a floating point variable called "compass_x_axis_value" MPU9150_readSensor(low_byte,high_byte) MPU9150_CMPS_XOUT_L = Compass X-axis low byte MPU9150_CMPS_XOUT_H = Compass X-axis high byte */ float compass_x_axis_value = MPU9150_readSensor(MPU9150_CMPS_XOUT_L,MPU9150_CMPS_XOUT_H);
All of these register addresses are defined in “MPU9150.h” (included with the sketch). Below is a list of useful functions for reading the basics of the MPU-9150 when used in conjunction with “MPU9150.h”.
// Clear the 'sleep' bit to start the sensor. MPU9150_writeSensor(MPU9150_PWR_MGMT_1, 0); // Start the compass MPU9150_setupCompass(); // Read the Accelerometer MPU9150_readSensor(MPU9150_ACCEL_XOUT_L,MPU9150_ACCEL_XOUT_H); // X-Axis MPU9150_readSensor(MPU9150_ACCEL_YOUT_L,MPU9150_ACCEL_YOUT_H); // Y-Axis MPU9150_readSensor(MPU9150_ACCEL_ZOUT_L,MPU9150_ACCEL_ZOUT_H); // Z-Axis // Read the Gyroscope MPU9150_readSensor(MPU9150_GYRO_XOUT_L,MPU9150_GYRO_XOUT_H); // X-Axis MPU9150_readSensor(MPU9150_GYRO_YOUT_L,MPU9150_GYRO_YOUT_H); // Y-Axis MPU9150_readSensor(MPU9150_GYRO_ZOUT_L,MPU9150_GYRO_ZOUT_H); // Z-Axis // Read the Compass MPU9150_readSensor(MPU9150_CMPS_XOUT_L,MPU9150_CMPS_XOUT_H); // X-Axis MPU9150_readSensor(MPU9150_CMPS_YOUT_L,MPU9150_CMPS_YOUT_H); // Y-Axis MPU9150_readSensor(MPU9150_CMPS_ZOUT_L,MPU9150_CMPS_ZOUT_H); // Z-Axis
With these commands and the “MPU9150.h” you can easily get accelerometer, gyroscope and compass data from the MPU09150.
NOTE:The source of the “MPU9150.h” file is http://ift.tt/2oIzDzM. Additional details about the file are available there.
MS5611 commands and function files
The MS5611 chip gives us altitude, barometric pressure and temperature. Like the MPU-9150, we communicate with it via I2C. There are a few basic commands defined in MS5611.h and MS5611.cpp that we use to get the readings from the chip (everything else in these files deals with I2C communications). The function names do a good job of explaining what each of these functions does.
uint32_t readRawTemperature(void); uint32_t readRawPressure(void); double readTemperature(bool compensation = false); int32_t readPressure(bool compensation = false); double getAltitude(double pressure, double seaLevelPressure = 101325);
The MS5611 chip is very easy to use:
Simply including the MS5611.h and MS5611.cpp files in your Arduino sketch
Include Wire.h
Start Wire in “void setup()"
Execute one of the functions listed above, and that’s it
That’s it!
NOTE:The source of the MS5611 library is http://ift.tt/2oIGKIv. Additional details about the library are available there.
Venus838FLP commands and function files
The Venus 838FLP GPS module was the most difficult to find a simple working library for. After some research, I decided to start with the MultiWii drone software and delete as much of the unnecessary functionality as I could to give us the leanest GPS library possible. There may be ways to further optimize the code, but I’ve tried to leave it robust and useful for as wide an array of applications as possible.
The Venus communicates via Serial unlike our other two sensors which use I2C. In our sketch, we’re doing three things to get data from the GPS module:
Include the Venus838FLP.h file in our sketch
Start the module by executing “GPSModuleInit()" and “GPSConfigureDefaults()" in our “void setup()"
Run “VenusReadAndPrint(2000)" whenever we want a reading.
"VenusReadAndPrint(2000)" reads the data from the GPS module with a timeout of 2000ms. This is a function I created to display the data and is defined at the bottom of the Venus838FLP.h file. “VenusReadAndPrint()" calls a function “VenusDispatchMessage(int result)"  (defined right above “VenusReadAndPrint()") that looks like this:
void VenusDispatchMessage(int result){ //f.GPS_FIX = venus_ctx.location.fixmode >=2; Serial.print("Latitude: "); Serial.print(float(venus_ctx.location.latitude/10000000.000000),6); // With 1.9 now we have real 10e7 precision Serial.print("\t Longitude: "); Serial.print(float(venus_ctx.location.longitude/10000000.000000),6); Serial.print("\t Altitude: "); Serial.print(float(venus_ctx.location.sealevel_alt /100)); Serial.print("m \t Satelite Count: "); Serial.println(venus_ctx.location.sv_count); //GPS_coord[LON] = venus_ctx.location.longitude; //GPS_altitude = venus_ctx.location.sealevel_alt /100; // altitude in meter //GPS_numSat = venus_ctx.location.sv_count; // note: the following vars are currently not used in nav code -- avoid retrieving it to save time // also, Venus8 doesnt provide these in a way that we can easily calculate without taking cpu cycles //GPS_speed = venus_ctx.location.ground_speed; // in m/s * 100 == in cm/s //GPS_ground_course = venus_ctx.location.ground_course/100; //in degrees }
This function contains all the variables and values you would need to create almost any application that uses GPS. Feel free to modify “VenusReadAndPrint" and “VenusDispatchMessage" to create your own functions that store the GPS data to global variables or return values for setting local variables and more.
NOTE: The MultiWii source is availble here: http://ift.tt/1hkZOHk.
Conclusion
As we can see, the Lynxmotion Quadrino Nano Flight Controller (with GPS) is an ideal “sensor ball” for all kinds of sensor intensive projects. The sample code has a fairly small footprint (6% of memory and 47% of dynamic memory) and could easily be optimized further by removing variables and trimming the libraries/sensor functions to include only the exact code your specific application needs (we included the seemingly redundant functions in order to facilitate the greatest range of applications that readers of this tutorial may wish to create).
Happy making!
Continued reading
Library/Sensor Function Sources
MultiWii Source http://ift.tt/1hkZOHk
MS5611 Source http://ift.tt/2oIGKIv
MPU9510 Source http://ift.tt/2oIzDzM
Quadrino Nano Useful Links (RobotShop)
Quadrino Nano Useful Links (Lynxmotion)
          Related Stories
Lynxmotion Quadrino Nano – Sensor Calibration
Lynxmotion Quadrino Nano – MultiWii & LED Ring
Lynxmotion Quadrino Nano – MultiWii Data Logging
  from RobotShop Blog Feed http://ift.tt/2osC51q via IFTTT
0 notes
Text
Lynxmotion Quadrino Nano – Raw Sensor Values
The Lynxmotion Quadrino Nano Flight Controller (with GPS) was originally designed as a flight controller for drones but, it also has awesome applications for robotic rovers too. Composed of an ATmega2560 (Arduino Mega Chipset), a collection of sensors, GPS and a host of I/O options it is an ideal “sensor ball” for navigation, positioning and more.
Lynxmotion Quadrino Nano
In this tutorial we’ll be working with a small Arduino program that will give us data from:
the MPU-9150 (gyroscope, accelerometer, magnetometer)
the MS5611 (barometer)
the Venus838FLP (GPS module)
based on the serial command we send to the Arduino. This will give us a starting point for understanding and utilizing the Quadrino Nano’s sensors. In future tutorials we will reference this one as we put this unit to work!
Requirements
Arduino IDE
Lynxmotion Quadrino Nano Flight Controller (with GPS)
The Quadrino-Nano-sensor files (github)
Helpful Experience
This tutorial is targeted at beginners, but some experience with the the Arduino IDE and C++ files (.cpp and .h) is helpful but, not required.
Download and open the files
First, download the files. Second, navigate to the Arduino IDE and go to “Sketch/Include Library/Add .ZIP Library and select ZIP file you just downloaded.
(if you need any help with this step see http://ift.tt/2osKOkd).
Arduino IDE – Library Install
  Then navigate to your Arduino Examples folder. Towards the bottom of the list you will see an item called “QuadrinoNano_SensorDataLibrary”, navigate there and click the “QuadrinoNano_SensorData” item.
  Arduino IDE – Quadrino Example
Upload files to the Quadrino Nano
Next we’re going to upload the files to the Quadrino Nano and work with the code before we dive into the specifics.
Lynxmotion Quadrino Nano – USB Connection
First we need to plug the Quadrino Nano into our computer. Once we have the unit plugged into the computer we need to do two things before we can upload the code.
Arduino IDE – Board
First select the correct Arduino “Board” for the Quadrino Nano from the “Tools” menu. As we discussed above, the Quadrino Nano is an ATmega2560 at heart so we need to select either be the “Arduino/Genuino Mega or 26560” or the “Arduino Mega ADK” depending on your configuration (I had more success uploading with “Arduino Mega ADK”).
Arduino IDE – Port
Second select the appropriate port for your Arduino. If you’re on Windows this may be “COM” followed by a number, on Mac it may be “tty” or something even wilder (like the picture shows below).
Arduino IDE – Upload
Once we have the port and board selected we’re ready to upload the sketch. To upload the sketch, you can press the arrow as shown in the image below or go to “Sketch/Upload” in the menu bar.
Arduino IDE – Uploaded
After uploading you should see a message like the one below without any orange error messages.
If you do have errors, there’s a few things to check:
Make sure the Quadrino Nano is plugged in (this happens to me all the time)
Make sure the proper “Board” is selected from the tools menu
Make sure the proper “Port” is selected from the tools menu
Copy the error message and paste it in Google, often there will be a blog article or a Stack Overflow question about the issue
Check the official Arduino site especially the troubleshooting section
Run some commands
Arduino IDE – Serial Monitor
Now that we have everything uploaded, its time to run some commands. In order to do that we need to open the serial port by pressing the little magnifying glass icon as illustrated in the image below.
Arduino IDE – Serial Settings
Often when we open the Serial Monitor we just see garbage (as you can see in the image below), this usually means we need to set the baud rate to match our project. The baud rate needs to be set to “57600” and line endings should be set to “Both CL & NL”. Use the diagram below to find and set these settings.
Arduino IDE – Serial Commands
Now that all our settings are correct you should see the printout like the image below (if you see some garbage at the very top of the Serial Monitor, don’t worry, that happens when the serial port still has data in it that hasn’t been cleared out).
When you type in a number and press return, the Quadrino Nano starts reading that sensor and will keep reporting its value at a predefined interval until you press enter to stop reading from the sensors (barometer and temperature only read once and stop).
After you’ve had a chance to experiment, we’ll look into some of the details of how we get data from these different sensors.
Diving into the sensor commands
Probably the best way to get an understanding of how we read and interact with the Quadrino Nano’s sensors is to take a look at the code itself. The function names are fairly self explanatory and the included notes by the original developers and myself attempt to make these files as readable as possible. That said, we will take a little time to look at the basics of each sensor below.
MPU-9150 commands and function files
The MPU-9150 is an Accelerometer, Gyroscope and Compass in a single chip. From the manufacturers (InvenSense) website:
The MPU-9150 is a System in Package (SiP) that combines two chips: the MPU-6050, which contains a 3-axis gyroscope, 3-axis accelerometer, and an onboard Digital Motion Processor™ (DMP™) capable of processing complex MotionFusion algorithms; and the AK8975, a 3-axis digital compass. The part’s integrated 6-axis MotionFusion algorithms access all internal sensors to gather a full set of sensor data.
We communicate with it via I2C using the Arduino Wire Library. We read data from the accelerometer, gyroscope and compass in the same way by using a predefined function and predefined register addresses (often doing a two byte read, once for the low byte and again for the high byte).
/* Example - Read the value of the compass X-axis and save the value to a floating point variable called "compass_x_axis_value" MPU9150_readSensor(low_byte,high_byte) MPU9150_CMPS_XOUT_L = Compass X-axis low byte MPU9150_CMPS_XOUT_H = Compass X-axis high byte */ float compass_x_axis_value = MPU9150_readSensor(MPU9150_CMPS_XOUT_L,MPU9150_CMPS_XOUT_H);
All of these register addresses are defined in “MPU9150.h” (included with the sketch). Below is a list of useful functions for reading the basics of the MPU-9150 when used in conjunction with “MPU9150.h”.
// Clear the 'sleep' bit to start the sensor. MPU9150_writeSensor(MPU9150_PWR_MGMT_1, 0); // Start the compass MPU9150_setupCompass(); // Read the Accelerometer MPU9150_readSensor(MPU9150_ACCEL_XOUT_L,MPU9150_ACCEL_XOUT_H); // X-Axis MPU9150_readSensor(MPU9150_ACCEL_YOUT_L,MPU9150_ACCEL_YOUT_H); // Y-Axis MPU9150_readSensor(MPU9150_ACCEL_ZOUT_L,MPU9150_ACCEL_ZOUT_H); // Z-Axis // Read the Gyroscope MPU9150_readSensor(MPU9150_GYRO_XOUT_L,MPU9150_GYRO_XOUT_H); // X-Axis MPU9150_readSensor(MPU9150_GYRO_YOUT_L,MPU9150_GYRO_YOUT_H); // Y-Axis MPU9150_readSensor(MPU9150_GYRO_ZOUT_L,MPU9150_GYRO_ZOUT_H); // Z-Axis // Read the Compass MPU9150_readSensor(MPU9150_CMPS_XOUT_L,MPU9150_CMPS_XOUT_H); // X-Axis MPU9150_readSensor(MPU9150_CMPS_YOUT_L,MPU9150_CMPS_YOUT_H); // Y-Axis MPU9150_readSensor(MPU9150_CMPS_ZOUT_L,MPU9150_CMPS_ZOUT_H); // Z-Axis
With these commands and the “MPU9150.h” you can easily get accelerometer, gyroscope and compass data from the MPU09150.
NOTE:The source of the “MPU9150.h” file is http://ift.tt/2oIzDzM. Additional details about the file are available there.
MS5611 commands and function files
The MS5611 chip gives us altitude, barometric pressure and temperature. Like the MPU-9150, we communicate with it via I2C. There are a few basic commands defined in MS5611.h and MS5611.cpp that we use to get the readings from the chip (everything else in these files deals with I2C communications). The function names do a good job of explaining what each of these functions does.
uint32_t readRawTemperature(void); uint32_t readRawPressure(void); double readTemperature(bool compensation = false); int32_t readPressure(bool compensation = false); double getAltitude(double pressure, double seaLevelPressure = 101325);
The MS5611 chip is very easy to use:
Simply including the MS5611.h and MS5611.cpp files in your Arduino sketch
Include Wire.h
Start Wire in “void setup()"
Execute one of the functions listed above, and that’s it
That’s it!
NOTE:The source of the MS5611 library is http://ift.tt/2oIGKIv. Additional details about the library are available there.
Venus838FLP commands and function files
The Venus 838FLP GPS module was the most difficult to find a simple working library for. After some research, I decided to start with the MultiWii drone software and delete as much of the unnecessary functionality as I could to give us the leanest GPS library possible. There may be ways to further optimize the code, but I’ve tried to leave it robust and useful for as wide an array of applications as possible.
The Venus communicates via Serial unlike our other two sensors which use I2C. In our sketch, we’re doing three things to get data from the GPS module:
Include the Venus838FLP.h file in our sketch
Start the module by executing “GPSModuleInit()" and “GPSConfigureDefaults()" in our “void setup()"
Run “VenusReadAndPrint(2000)" whenever we want a reading.
"VenusReadAndPrint(2000)" reads the data from the GPS module with a timeout of 2000ms. This is a function I created to display the data and is defined at the bottom of the Venus838FLP.h file. “VenusReadAndPrint()" calls a function “VenusDispatchMessage(int result)"  (defined right above “VenusReadAndPrint()") that looks like this:
void VenusDispatchMessage(int result){ //f.GPS_FIX = venus_ctx.location.fixmode >=2; Serial.print("Latitude: "); Serial.print(float(venus_ctx.location.latitude/10000000.000000),6); // With 1.9 now we have real 10e7 precision Serial.print("\t Longitude: "); Serial.print(float(venus_ctx.location.longitude/10000000.000000),6); Serial.print("\t Altitude: "); Serial.print(float(venus_ctx.location.sealevel_alt /100)); Serial.print("m \t Satelite Count: "); Serial.println(venus_ctx.location.sv_count); //GPS_coord[LON] = venus_ctx.location.longitude; //GPS_altitude = venus_ctx.location.sealevel_alt /100; // altitude in meter //GPS_numSat = venus_ctx.location.sv_count; // note: the following vars are currently not used in nav code -- avoid retrieving it to save time // also, Venus8 doesnt provide these in a way that we can easily calculate without taking cpu cycles //GPS_speed = venus_ctx.location.ground_speed; // in m/s * 100 == in cm/s //GPS_ground_course = venus_ctx.location.ground_course/100; //in degrees }
This function contains all the variables and values you would need to create almost any application that uses GPS. Feel free to modify “VenusReadAndPrint" and “VenusDispatchMessage" to create your own functions that store the GPS data to global variables or return values for setting local variables and more.
NOTE: The MultiWii source is availble here: http://ift.tt/1hkZOHk.
Conclusion
As we can see, the Lynxmotion Quadrino Nano Flight Controller (with GPS) is an ideal “sensor ball” for all kinds of sensor intensive projects. The sample code has a fairly small footprint (6% of memory and 47% of dynamic memory) and could easily be optimized further by removing variables and trimming the libraries/sensor functions to include only the exact code your specific application needs (we included the seemingly redundant functions in order to facilitate the greatest range of applications that readers of this tutorial may wish to create).
Happy making!
Continued reading
Library/Sensor Function Sources
MultiWii Source http://ift.tt/1hkZOHk
MS5611 Source http://ift.tt/2oIGKIv
MPU9510 Source http://ift.tt/2oIzDzM
Quadrino Nano Useful Links (RobotShop)
Quadrino Nano Useful Links (Lynxmotion)
          Related Stories
Lynxmotion Quadrino Nano – Sensor Calibration
Lynxmotion Quadrino Nano – MultiWii & LED Ring
Lynxmotion Quadrino Nano – MultiWii Data Logging
  from RobotShop Blog Feed http://ift.tt/2osC51q via IFTTT
0 notes
planetarduino · 8 years ago
Text
This device converts gestures into keystrokes
Tweet
Tumblr media
Engineering student Federico Terzi has built an impressive computer interface device reminiscent of a Wiimote.
When talking in person,  you can express meaning using facial expressions, and your hands. Usually this acts to add emphasis to a statement or perhaps to point out a certain object, but what if you could actually type letters based on how your hands move?
Terzi’s aptly named “Gesture Keyboard” does just this, using an Arduino Pro Micro, an MPU-6050 accelerometer, and an HC-06 Bluetooth module for sending signals to his laptop. A Python library using Scikit-learn’s SVM (Support Vector Machine) algorithm then translates the motion readings into characters that appear on the screen.
You can find the code and more information on Terzi’s GitHub page.
youtube
Bookmark It
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
Hide Sites
$$('div.d').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) });
This device converts gestures into keystrokes was originally published on PlanetArduino
0 notes